示例#1
0
    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)
示例#2
0
    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)
 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)
    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)
 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)
示例#6
0
 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)
示例#7
0
 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
0
    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)
 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)
 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)
 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
0
 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
0
 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)
 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)
 def typecheck(self):
     from marketsim import rtti
     from marketsim.gen._out._ifunction._ifunctionfloat import IFunctionfloat
     from marketsim.gen._out._iorderbook import IOrderBook
     rtti.typecheck(float, self.initialValue)
     rtti.typecheck(IFunctionfloat, self.priceDistr)
     rtti.typecheck(IOrderBook, self.book)
示例#16
0
 def typecheck(self):
     from marketsim import rtti
     from marketsim.gen._out._ifunction._ifunctioniobservableiorder_from_ifunctionsideifunctionfloat import IFunctionIObservableIOrder_from_IFunctionSideIFunctionfloat
     from marketsim.gen._out._ifunction._ifunctionside import IFunctionSide
     rtti.typecheck(IFunctionIObservableIOrder_from_IFunctionSideIFunctionfloat, self.orderFactory)
     rtti.typecheck(int, self.initialSize)
     rtti.typecheck(IFunctionSide, self.side)
示例#17
0
    def typecheck(self):
        from marketsim import rtti
        from marketsim.gen._out.math._macd import macd

        rtti.typecheck(macd, self.x)
        rtti.typecheck(float, self.timeframe)
        rtti.typecheck(float, self.step)
示例#18
0
 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)
    def typecheck(self):
        from marketsim.gen._out._isingleassetstrategy import ISingleAssetStrategy
        from marketsim.gen._out._ifunction._ifunctioniaccount_from_isingleassetstrategy import (
            IFunctionIAccount_from_ISingleAssetStrategy,
        )
        from marketsim import listOf
        from marketsim.gen._out._ifunction._ifunctionifunctionfloat_from_iaccount import (
            IFunctionIFunctionfloat_from_IAccount,
        )
        from marketsim import rtti
        from marketsim.gen._out._ifunction._ifunctionifunctionlistoffloat_from_listoffloat import (
            IFunctionIFunctionlistOffloat_from_listOffloat,
        )
        from marketsim.gen._out._ifunction._ifunctionifunctionfloat_from_ifunctionfloat import (
            IFunctionIFunctionfloat_from_IFunctionfloat,
        )

        rtti.typecheck(listOf(ISingleAssetStrategy), self.strategies)
        rtti.typecheck(IFunctionIAccount_from_ISingleAssetStrategy, self.account)
        rtti.typecheck(IFunctionIFunctionfloat_from_IAccount, self.weight)
        rtti.typecheck(IFunctionIFunctionfloat_from_IFunctionfloat, self.normalizer)
        rtti.typecheck(IFunctionIFunctionlistOffloat_from_listOffloat, self.corrector)
示例#20
0
 def typecheck(self):
     from marketsim import rtti
     from marketsim.gen._out.strategy.price._marketmaker import MarketMaker
     from marketsim.gen._out._side import Side
     from marketsim.gen._out._iobservable._iobservableside import IObservableSide
     rtti.typecheck(MarketMaker, self.x)
     rtti.typecheck(IObservableSide, self.side)
     rtti.typecheck(float, self.sign)
 def typecheck(self):
     from marketsim import rtti
     from marketsim.gen._out.orderbook._iorderqueueimpl import IOrderQueueImpl
     from marketsim.gen._out._iorderbook import IOrderBook
     from marketsim.gen._out._ilink import ILink
     rtti.typecheck(IOrderQueueImpl, self.queue)
     rtti.typecheck(IOrderBook, self.book)
     rtti.typecheck(ILink, self.link)
 def typecheck(self):
     from marketsim import rtti
     from marketsim.gen._out._isingleassetstrategy import ISingleAssetStrategy
     from marketsim.gen._out._ifunction._ifunctioniaccount_from_isingleassetstrategy import IFunctionIAccount_from_ISingleAssetStrategy
     from marketsim.gen._out._ifunction._ifunctionifunctionfloat_from_iaccount import IFunctionIFunctionfloat_from_IAccount
     rtti.typecheck(ISingleAssetStrategy, self.inner)
     rtti.typecheck(IFunctionIAccount_from_ISingleAssetStrategy, self.account)
     rtti.typecheck(IFunctionIFunctionfloat_from_IAccount, self.performance)
示例#23
0
 def typecheck(self):
     from marketsim.gen._out._itwowaylink import ITwoWayLink
     from marketsim import listOf
     from marketsim.gen._out._itimeserie import ITimeSerie
     from marketsim import rtti
     from marketsim.gen._out._iorderbook import IOrderBook
     rtti.typecheck(IOrderBook, self.orderbook)
     rtti.typecheck(ITwoWayLink, self.link)
     rtti.typecheck(listOf(ITimeSerie), self.timeseries)
示例#24
0
 def typecheck(self):
     from marketsim import rtti
     from marketsim.gen._out.strategy.price._liquidityprovider import LiquidityProvider
     rtti.typecheck(LiquidityProvider, self.x)
示例#25
0
 def typecheck(self):
     from marketsim import rtti
     from marketsim.gen._out.math._moving import Moving
     rtti.typecheck(Moving, self.x)
示例#26
0
 def typecheck(self):
     from marketsim import rtti
     rtti.typecheck(float, self.alpha)
示例#27
0
 def typecheck(self):
     from marketsim import rtti
     from marketsim.gen._out.math._cumulative import Cumulative
     rtti.typecheck(Cumulative, self.x)
示例#28
0
 def typecheck(self):
     from marketsim import rtti
     from marketsim.gen._out._iorderqueue import IOrderQueue
     from marketsim.gen._out._iobservable._iobservablefloat import IObservablefloat
     rtti.typecheck(IOrderQueue, self.queue)
     rtti.typecheck(IObservablefloat, self.defaultValue)
示例#29
0
 def typecheck(self):
     from marketsim import rtti
     from marketsim.gen._out._iorderqueue import IOrderQueue
     from marketsim.gen._out._ifunction._ifunctionfloat import IFunctionfloat
     rtti.typecheck(IOrderQueue, self.queue)
     rtti.typecheck(IFunctionfloat, self.defaultValue)
示例#30
0
 def typecheck(self):
     from marketsim import rtti
     from marketsim.gen._out.math._rsi import RSI
     rtti.typecheck(RSI, self.x)
示例#31
0
 def typecheck(self):
     from marketsim import rtti
     from marketsim.gen._out._ifunction._ifunctionfloat import IFunctionfloat
     rtti.typecheck(IFunctionfloat, self.signedVolume)
示例#32
0
 def typecheck(self):
     from marketsim import rtti
     rtti.typecheck(float, self.currentTime)
示例#33
0
 def typecheck(self):
     from marketsim import rtti
     from marketsim.gen._out.strategy.price._liquidityprovider import LiquidityProvider
     from marketsim.gen._out._ifunction._ifunctionside import IFunctionSide
     rtti.typecheck(LiquidityProvider, self.x)
     rtti.typecheck(IFunctionSide, self.side)
示例#34
0
 def typecheck(self):
     from marketsim import rtti
     from marketsim.gen._out._iorderbook import IOrderBook
     rtti.typecheck(IOrderBook, self.book)
示例#35
0
 def typecheck(self):
     from marketsim import rtti
     from marketsim.gen._out.orderbook._iorderqueueimpl import IOrderQueueImpl
     rtti.typecheck(IOrderQueueImpl, self.queue)
示例#36
0
 def typecheck(self):
     from marketsim import rtti
     from marketsim.gen._out._isingleassetstrategy import ISingleAssetStrategy
     from marketsim.gen._out._ifunction._ifunctionbool import IFunctionbool
     rtti.typecheck(ISingleAssetStrategy, self.inner)
     rtti.typecheck(IFunctionbool, self.predicate)
示例#37
0
 def typecheck(self):
     from marketsim import rtti
     from marketsim.gen._out._iobservable._iobservablefloat import IObservablefloat
     rtti.typecheck(IObservablefloat, self.source)
     rtti.typecheck(float, self.timeframe)
示例#38
0
 def typecheck(self):
     from marketsim import rtti
     from marketsim.gen._out.strategy.side._pairtrading import PairTrading
     rtti.typecheck(PairTrading, self.x)
示例#39
0
 def typecheck(self):
     from marketsim import rtti
     from marketsim.gen._out._ifunction._ifunctioniobservableiorder_from_ifunctionfloat import IFunctionIObservableIOrder_from_IFunctionfloat
     from marketsim.gen._out._ifunction._ifunctionfloat import IFunctionfloat
     rtti.typecheck(IFunctionIObservableIOrder_from_IFunctionfloat, self.proto)
     rtti.typecheck(IFunctionfloat, self.lotSize)
示例#40
0
 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.y)
示例#41
0
 def typecheck(self):
     from marketsim import rtti
     from marketsim.gen._out.strategy.position._rsi_linear import RSI_linear
     rtti.typecheck(RSI_linear, self.x)
示例#42
0
 def typecheck(self):
     from marketsim import rtti
     from marketsim.gen._out.strategy.position._rsi_linear import RSI_linear
     rtti.typecheck(RSI_linear, self.x)
示例#43
0
 def typecheck(self):
     from marketsim import rtti
     from marketsim.gen._out.strategy.position._bollinger_linear import Bollinger_linear
     rtti.typecheck(Bollinger_linear, self.x)
示例#44
0
 def typecheck(self):
     from marketsim import rtti
     rtti.typecheck(int, self.x)
示例#45
0
 def typecheck(self):
     from marketsim import rtti
     from marketsim.gen._out.strategy.side._crossingaverages import CrossingAverages
     rtti.typecheck(CrossingAverages, self.x)
示例#46
0
 def typecheck(self):
     from marketsim import rtti
     rtti.typecheck(float, self.alpha)
     rtti.typecheck(float, self.timeframe)
     rtti.typecheck(float, self.threshold)
示例#47
0
 def typecheck(self):
     from marketsim import rtti
     from marketsim.gen._out._ifunction._ifunctionfloat import IFunctionfloat
     rtti.typecheck(IFunctionfloat, self.base)
     rtti.typecheck(IFunctionfloat, self.power)
示例#48
0
 def typecheck(self):
     from marketsim import rtti
     from marketsim.gen._out._iaccount import IAccount
     rtti.typecheck(IAccount, self.trader)
     rtti.typecheck(float, self.alpha)
示例#49
0
 def typecheck(self):
     from marketsim import rtti
     from marketsim.gen._out.math._ew import EW
     rtti.typecheck(EW, self.x)
示例#50
0
 def typecheck(self):
     from marketsim import rtti
     from marketsim.gen._out.math._macd import macd
     rtti.typecheck(macd, self.x)
示例#51
0
 def typecheck(self):
     from marketsim import rtti
     from marketsim.gen._out._ifunction._ifunctionfloat import IFunctionfloat
     rtti.typecheck(IFunctionfloat, self.x)
     rtti.typecheck(IFunctionfloat, self.elsePart)
示例#52
0
 def typecheck(self):
     from marketsim import rtti
     from marketsim.gen._out._ifunction._ifunctionfloat import IFunctionfloat
     rtti.typecheck(IFunctionfloat, self.side_distribution)
示例#53
0
 def typecheck(self):
     from marketsim import rtti
     from marketsim.gen._out._iorderbook import IOrderBook
     rtti.typecheck(IOrderBook, self.book)
示例#54
0
 def typecheck(self):
     from marketsim import rtti
     from marketsim.gen._out._iobservable._iobservablefloat import IObservablefloat
     rtti.typecheck(IObservablefloat, self.x)
     rtti.typecheck(IObservablefloat, self.elsePart)
 def typecheck(self):
     from marketsim import rtti
     from marketsim.gen._out._iaccount import IAccount
     rtti.typecheck(IAccount, self.trader)
示例#56
0
 def typecheck(self):
     from marketsim import rtti
     rtti.typecheck(object, self.source)
     rtti.typecheck(int, self.idx)
示例#57
0
 def typecheck(self):
     from marketsim import rtti
     from marketsim.gen._out._iorderqueue import IOrderQueue
     rtti.typecheck(IOrderQueue, self.queue)
     rtti.typecheck(float, self.volumeDelta)
     rtti.typecheck(int, self.volumeCount)
示例#58
0
 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)
示例#59
0
 def typecheck(self):
     from marketsim import rtti
     from marketsim.gen._out.strategy.side._crossingaverages import CrossingAverages
     rtti.typecheck(CrossingAverages, self.x)
示例#60
0
 def typecheck(self):
     from marketsim import rtti
     from marketsim.gen._out._isingleassetstrategy import ISingleAssetStrategy
     from marketsim import listOf
     rtti.typecheck(listOf(ISingleAssetStrategy), self.strategies)