예제 #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)
예제 #3
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._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)
예제 #5
0
 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)
예제 #9
0
 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)
예제 #11
0
 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)
예제 #19
0
    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)