本文整理汇总了Python中marketsim.rtti.typecheck函数的典型用法代码示例。如果您正苦于以下问题:Python typecheck函数的具体用法?Python typecheck怎么用?Python typecheck使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了typecheck函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: typecheck
def typecheck(self):
from marketsim import rtti
from marketsim.gen._out._iobservable._iobservablefloat import IObservablefloat
from marketsim.gen._out._ifunction._ifunctionfloat import IFunctionfloat
rtti.typecheck(IObservablefloat, self.x)
rtti.typecheck(IFunctionfloat, self.elsePart)
示例2: typecheck
def typecheck(self):
from marketsim import rtti
from marketsim.gen._out._iorder import IOrder
from marketsim.gen._out._iobservable._iobservableiorder import IObservableIOrder
from marketsim.gen._out._ievent import IEvent
rtti.typecheck(IObservableIOrder, self.orderFactory)
rtti.typecheck(IEvent, self.eventGen)
示例3: typecheck
def typecheck(self):
from marketsim import rtti
rtti.typecheck(str, self.ticker)
rtti.typecheck(str, self.start)
rtti.typecheck(str, self.end)
rtti.typecheck(float, self.delta)
rtti.typecheck(float, self.volume)
示例4: typecheck
def typecheck(self):
from marketsim import rtti
from marketsim.gen._out._iorder import IOrder
from marketsim.gen._out._iobservable._iobservableiorder import IObservableIOrder
from marketsim.gen._out._ifunction._ifunctionfloat import IFunctionfloat
rtti.typecheck(IObservableIOrder, self.proto)
rtti.typecheck(IFunctionfloat, self.maxloss)
示例5: typecheck
def typecheck(self):
from marketsim import rtti
from marketsim.gen._out._ifunction._ifunctioniobservableiorder_from_ifunctionside import (
IFunctionIObservableIOrder_from_IFunctionSide,
)
rtti.typecheck(IFunctionIObservableIOrder_from_IFunctionSide, self.proto)
示例6: typecheck
def typecheck(self):
from marketsim import rtti
from marketsim.gen._out._ifunction._ifunctionside import IFunctionSide
from marketsim.gen._out._ifunction._ifunctionfloat import IFunctionfloat
rtti.typecheck(IFunctionSide, self.side)
rtti.typecheck(IFunctionfloat, self.volume)
示例7: typecheck
def typecheck(self):
for obj in self._id2obj.itervalues():
for p in rtti.properties(obj):
try:
rtti.typecheck(p.type, getattr(obj, p.name))
except exception.Constraint, err:
print err
print ' at ', repr(obj), '.', p.name
示例8: typecheck
def typecheck(self):
from marketsim import listOf
from marketsim.gen._out._imultiassetstrategy import IMultiAssetStrategy
from marketsim.gen._out._itimeserie import ITimeSerie
from marketsim import rtti
from marketsim.gen._out._isingleassettrader import ISingleAssetTrader
rtti.typecheck(listOf(ISingleAssetTrader), self.traders)
rtti.typecheck(IMultiAssetStrategy, self.strategy)
rtti.typecheck(str, self.name)
rtti.typecheck(float, self.PnL)
rtti.typecheck(listOf(ITimeSerie), self.timeseries)
示例9: typecheck
def typecheck(self):
from marketsim import rtti
from marketsim.gen._out._ifunction._ifunctionfloat import IFunctionfloat
rtti.typecheck(float, self.initialValue)
rtti.typecheck(IFunctionfloat, self.deltaDistr)
rtti.typecheck(IFunctionfloat, self.intervalDistr)
rtti.typecheck(str, self.name)
示例10: typecheck
def typecheck(self):
from marketsim import rtti
from marketsim.gen._out._iorderbook import IOrderBook
rtti.typecheck(float, self.alpha_1)
rtti.typecheck(float, self.alpha_2)
rtti.typecheck(float, self.threshold)
rtti.typecheck(IOrderBook, self.book)
示例11: typecheck
def typecheck(self):
from marketsim import rtti
from marketsim.gen._out._iobservable._iobservablefloat import IObservablefloat
from marketsim.gen._out._isingleassettrader import ISingleAssetTrader
rtti.typecheck(float, self.alpha)
rtti.typecheck(IObservablefloat, self.k)
rtti.typecheck(float, self.timeframe)
rtti.typecheck(ISingleAssetTrader, self.trader)
示例12: typecheck
def typecheck(self):
from marketsim import rtti
from marketsim.gen._out._itimeserie import ITimeSerie
from marketsim import listOf
rtti.typecheck(str, self.name)
rtti.typecheck(float, self.tickSize)
rtti.typecheck(int, self._digitsToShow)
rtti.typecheck(listOf(ITimeSerie), self.timeseries)
示例13: typecheck
def typecheck(self):
from marketsim import rtti
from marketsim.gen._out._iobservable._iobservableobject import IObservableobject
from marketsim.gen._out._igraph import IGraph
rtti.typecheck(IObservableobject, self.source)
rtti.typecheck(IGraph, self.graph)
rtti.typecheck(int, self._digitsToShow)
rtti.typecheck(int, self._smooth)
示例14: typecheck
def typecheck(self):
from marketsim import rtti
from marketsim.gen._out._ievent import IEvent
from marketsim.gen._out._ifunction._ifunctioniobservableiorder_from_ifunctionsideifunctionfloat import IFunctionIObservableIOrder_from_IFunctionSideIFunctionfloat
from marketsim.gen._out.strategy.price._liquidityprovider import LiquidityProvider
from marketsim.gen._out._ifunction._ifunctionside import IFunctionSide
rtti.typecheck(LiquidityProvider, self.x)
rtti.typecheck(IEvent, self.eventGen)
rtti.typecheck(IFunctionIObservableIOrder_from_IFunctionSideIFunctionfloat, self.orderFactory)
rtti.typecheck(IFunctionSide, self.side)
示例15: typecheck
def typecheck(self):
from marketsim import rtti
from marketsim.gen._out.strategy.price._marketdata import MarketData
from marketsim.gen._out._ifunction._ifunctionside import IFunctionSide
rtti.typecheck(MarketData, self.x)
rtti.typecheck(IFunctionSide, self.side)
rtti.typecheck(float, self.sign)