コード例 #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)
コード例 #4
0
    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)
コード例 #10
0
 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)
コード例 #14
0
 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
0
 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)
コード例 #21
0
 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)
コード例 #22
0
 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
ファイル: _pricedistr.py プロジェクト: oizma/marketsimulator
 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
ファイル: _value.py プロジェクト: oizma/marketsimulator
 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
ファイル: _ticksize.py プロジェクト: oizma/marketsimulator
 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
ファイル: _suspendable.py プロジェクト: oizma/marketsimulator
 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
ファイル: _alpha.py プロジェクト: oizma/marketsimulator
 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
ファイル: _k.py プロジェクト: SemanticBeeng/marketsimulator
 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
ファイル: _alpha.py プロジェクト: oizma/marketsimulator
 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
ファイル: _Pow.py プロジェクト: oizma/marketsimulator
 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
ファイル: _value.py プロジェクト: oizma/marketsimulator
 def typecheck(self):
     from marketsim import rtti
     from marketsim.gen._out.math._macd import macd
     rtti.typecheck(macd, self.x)
コード例 #51
0
ファイル: _ifdefined.py プロジェクト: oizma/marketsimulator
 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
ファイル: _ifdefined.py プロジェクト: oizma/marketsimulator
 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)
コード例 #55
0
 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
ファイル: _array.py プロジェクト: oizma/marketsimulator
 def typecheck(self):
     from marketsim import rtti
     from marketsim.gen._out._isingleassetstrategy import ISingleAssetStrategy
     from marketsim import listOf
     rtti.typecheck(listOf(ISingleAssetStrategy), self.strategies)