本文整理汇总了Python中marketsim.deref_opt函数的典型用法代码示例。如果您正苦于以下问题:Python deref_opt函数的具体用法?Python deref_opt怎么用?Python deref_opt使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了deref_opt函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: getImpl
def getImpl(self):
from marketsim.gen._out.orderbook._lastprice import LastPrice_IOrderQueue as _orderbook_LastPrice_IOrderQueue
from marketsim.gen._out.orderbook._bestprice import BestPrice_IOrderQueue as _orderbook_BestPrice_IOrderQueue
from marketsim.gen._out._ifdefined import IfDefined_IObservableFloatFloat as _IfDefined_IObservableFloatFloat
from marketsim.gen._out._ifdefined import IfDefined_IObservableFloatIObservableFloat as _IfDefined_IObservableFloatIObservableFloat
from marketsim import deref_opt
return deref_opt(_IfDefined_IObservableFloatIObservableFloat(deref_opt(_orderbook_BestPrice_IOrderQueue(self.queue)),deref_opt(_IfDefined_IObservableFloatFloat(deref_opt(_orderbook_LastPrice_IOrderQueue(self.queue)),self.defaultValue))))
开发者ID:SemanticBeeng,项目名称:marketsimulator,代码行数:7,代码来源:_safesideprice.py
示例2: __init__
def __init__(self, orderFactory = None, eventGen = None):
from marketsim.gen._out.order._limit import Limit_SideFloatFloat as _order_Limit_SideFloatFloat
from marketsim import deref_opt
from marketsim.gen._out.event._every import Every_Float as _event_Every_Float
self.orderFactory = orderFactory if orderFactory is not None else deref_opt(_order_Limit_SideFloatFloat())
self.eventGen = eventGen if eventGen is not None else deref_opt(_event_Every_Float())
Generic_Impl.__init__(self)
开发者ID:SemanticBeeng,项目名称:marketsimulator,代码行数:7,代码来源:_generic.py
示例3: __init__
def __init__(self, alpha = None, k = None, trader = None):
from marketsim.gen._out._const import const_Float as _const_Float
from marketsim import deref_opt
from marketsim.gen._out.trader._singleproxy import SingleProxy_ as _trader_SingleProxy_
self.alpha = alpha if alpha is not None else 0.15
self.k = k if k is not None else deref_opt(_const_Float(0.5))
self.trader = trader if trader is not None else deref_opt(_trader_SingleProxy_())
开发者ID:SemanticBeeng,项目名称:marketsimulator,代码行数:7,代码来源:_bollinger_linear.py
示例4: __init__
def __init__(self, initialValue = None, priceDistr = None, book = None):
from marketsim.gen._out.math.random._lognormvariate import lognormvariate_FloatFloat as _math_random_lognormvariate_FloatFloat
from marketsim import deref_opt
from marketsim.gen._out.orderbook._oftrader import OfTrader_IAccount as _orderbook_OfTrader_IAccount
self.initialValue = initialValue if initialValue is not None else 100.0
self.priceDistr = priceDistr if priceDistr is not None else deref_opt(_math_random_lognormvariate_FloatFloat(0.0,0.1))
self.book = book if book is not None else deref_opt(_orderbook_OfTrader_IAccount())
开发者ID:SemanticBeeng,项目名称:marketsimulator,代码行数:7,代码来源:_liquidityprovider.py
示例5: __init__
def __init__(self, book = None, side = None):
from marketsim.gen._out.orderbook._oftrader import OfTrader_IAccount as _orderbook_OfTrader_IAccount
from marketsim import deref_opt
from marketsim.gen._out.side._sell import Sell_ as _side_Sell_
self.book = book if book is not None else deref_opt(_orderbook_OfTrader_IAccount())
self.side = side if side is not None else deref_opt(_side_Sell_())
Queue_Impl.__init__(self)
开发者ID:SemanticBeeng,项目名称:marketsimulator,代码行数:7,代码来源:_queue.py
示例6: __init__
def __init__(self, side=None, volume=None):
from marketsim.gen._out.side._sell import Sell_ as _side_Sell_
from marketsim import deref_opt
from marketsim.gen._out._constant import constant_Float as _constant_Float
self.side = side if side is not None else deref_opt(_side_Sell_())
self.volume = volume if volume is not None else deref_opt(_constant_Float(1.0))
开发者ID:xiaobozi,项目名称:marketsimulator,代码行数:7,代码来源:_price_limit.py
示例7: getImpl
def getImpl(self):
from marketsim.gen._out.math._value import Value_mathmacd as _math_Value_mathmacd
from marketsim.gen._out.math._avg import Avg_mathEW as _math_Avg_mathEW
from marketsim.gen._out.observable._oneverydt import OnEveryDt_FloatFloat as _observable_OnEveryDt_FloatFloat
from marketsim.gen._out.math._ew import EW_IObservableFloatFloat as _math_EW_IObservableFloatFloat
from marketsim import deref_opt
return deref_opt(_math_Avg_mathEW(deref_opt(_math_EW_IObservableFloatFloat(deref_opt(_observable_OnEveryDt_FloatFloat(deref_opt(_math_Value_mathmacd(self.x)),self.step)),(2/((self.timeframe+1)))))))
开发者ID:SemanticBeeng,项目名称:marketsimulator,代码行数:7,代码来源:_signal.py
示例8: __init__
def __init__(self, base = None, power = None):
from marketsim.gen._out._observable._observablefloat import Observablefloat
from marketsim.gen._out._constant import constant_Float as _constant_Float
from marketsim import deref_opt
Observablefloat.__init__(self)
self.base = base if base is not None else deref_opt(_constant_Float(1.0))
self.power = power if power is not None else deref_opt(_constant_Float(1.0))
开发者ID:SemanticBeeng,项目名称:marketsimulator,代码行数:7,代码来源:_Pow.py
示例9: getImpl
def getImpl(self):
from marketsim.gen._out.math._max import Max_FloatIObservableFloat as _math_Max_FloatIObservableFloat
from marketsim.gen._out._constant import constant_Float as _constant_Float
from marketsim.gen._out.ops._sub import Sub_IObservableFloatIObservableFloat as _ops_Sub_IObservableFloatIObservableFloat
from marketsim.gen._out.math._lagged import Lagged_IObservableFloatFloat as _math_Lagged_IObservableFloatFloat
from marketsim import deref_opt
return deref_opt(_math_Max_FloatIObservableFloat(deref_opt(_constant_Float(0.0)),deref_opt(_ops_Sub_IObservableFloatIObservableFloat(self.source,deref_opt(_math_Lagged_IObservableFloatFloat(self.source,self.timeframe))))))
开发者ID:SemanticBeeng,项目名称:marketsimulator,代码行数:7,代码来源:_upmovements.py
示例10: getImpl
def getImpl(self):
from marketsim.gen._out.side._sell import Sell_ as _side_Sell_
from marketsim.gen._out.strategy._combine import Combine_ISingleAssetStrategyISingleAssetStrategy as _strategy_Combine_ISingleAssetStrategyISingleAssetStrategy
from marketsim.gen._out.side._buy import Buy_ as _side_Buy_
from marketsim.gen._out.strategy.price._onesidestrategy import OneSideStrategy_strategypriceLiquidityProviderIEventSideFloatIObservableIOrderSide as _strategy_price_OneSideStrategy_strategypriceLiquidityProviderIEventSideFloatIObservableIOrderSide
from marketsim import deref_opt
return deref_opt(_strategy_Combine_ISingleAssetStrategyISingleAssetStrategy(deref_opt(_strategy_price_OneSideStrategy_strategypriceLiquidityProviderIEventSideFloatIObservableIOrderSide(self.x,self.eventGen,self.orderFactory,deref_opt(_side_Sell_()))),deref_opt(_strategy_price_OneSideStrategy_strategypriceLiquidityProviderIEventSideFloatIObservableIOrderSide(self.x,self.eventGen,self.orderFactory,deref_opt(_side_Buy_())))))
开发者ID:SemanticBeeng,项目名称:marketsimulator,代码行数:7,代码来源:_strategy.py
示例11: __init__
def __init__(self, inner = None, predicate = None):
from marketsim.gen._out.strategy.price._laddermm import LadderMM_SideFloatIObservableIOrderInt as _strategy_price_LadderMM_SideFloatIObservableIOrderInt
from marketsim import deref_opt
from marketsim.gen._out._false import false_ as _false_
self.inner = inner if inner is not None else deref_opt(_strategy_price_LadderMM_SideFloatIObservableIOrderInt())
self.predicate = predicate if predicate is not None else deref_opt(_false_())
Clearable_Impl.__init__(self)
开发者ID:SemanticBeeng,项目名称:marketsimulator,代码行数:7,代码来源:_clearable.py
示例12: getImpl
def getImpl(self):
from marketsim.gen._out.strategy.price._oneside import OneSide_strategypriceMarketMakerSideFloat as _strategy_price_OneSide_strategypriceMarketMakerSideFloat
from marketsim.gen._out.side._sell import Sell_ as _side_Sell_
from marketsim.gen._out.strategy._combine import Combine_ISingleAssetStrategyISingleAssetStrategy as _strategy_Combine_ISingleAssetStrategyISingleAssetStrategy
from marketsim.gen._out.side._buy import Buy_ as _side_Buy_
from marketsim import deref_opt
return deref_opt(_strategy_Combine_ISingleAssetStrategyISingleAssetStrategy(deref_opt(_strategy_price_OneSide_strategypriceMarketMakerSideFloat(self.x,deref_opt(_side_Sell_()),1.0)),deref_opt(_strategy_price_OneSide_strategypriceMarketMakerSideFloat(self.x,deref_opt(_side_Buy_()),-1.0))))
开发者ID:SemanticBeeng,项目名称:marketsimulator,代码行数:7,代码来源:_twosides.py
示例13: __init__
def __init__(self, x = None, y = None):
from marketsim.gen._out._observable._observablebool import Observablebool
from marketsim.gen._out._const import const_Float as _const_Float
from marketsim import deref_opt
Observablebool.__init__(self)
self.x = x if x is not None else deref_opt(_const_Float(1.0))
self.y = y if y is not None else deref_opt(_const_Float(1.0))
Greater_Impl.__init__(self)
开发者ID:SemanticBeeng,项目名称:marketsimulator,代码行数:8,代码来源:_Greater.py
示例14: __init__
def __init__(self, x = None, y = None):
from marketsim.gen._out._observable._observablebool import Observablebool
from marketsim.gen._out._observabletrue import observableTrue_ as _observableTrue_
from marketsim import deref_opt
Observablebool.__init__(self)
self.x = x if x is not None else deref_opt(_observableTrue_())
self.y = y if y is not None else deref_opt(_observableTrue_())
Or_Impl.__init__(self)
开发者ID:SemanticBeeng,项目名称:marketsimulator,代码行数:8,代码来源:_or.py
示例15: __init__
def __init__(self, signedVolume = None, price = None):
from marketsim.gen._out._iorder import IOrder
from marketsim.gen._out._observable._observableiorder import ObservableIOrder
from marketsim.gen._out._constant import constant_Float as _constant_Float
from marketsim import deref_opt
ObservableIOrder.__init__(self)
self.signedVolume = signedVolume if signedVolume is not None else deref_opt(_constant_Float(1.0))
self.price = price if price is not None else deref_opt(_constant_Float(100.0))
开发者ID:SemanticBeeng,项目名称:marketsimulator,代码行数:8,代码来源:_LimitSigned.py
示例16: getImpl
def getImpl(self):
from marketsim.gen._out.ops._div import Div_IObservableFloatIObservableFloat as _ops_Div_IObservableFloatIObservableFloat
from marketsim.gen._out._constant import constant_Int as _constant_Int
from marketsim.gen._out.trader._position import Position_IAccount as _trader_Position_IAccount
from marketsim.gen._out.trader._balance import Balance_IAccount as _trader_Balance_IAccount
from marketsim.gen._out.ops._sub import Sub_FloatIObservableFloat as _ops_Sub_FloatIObservableFloat
from marketsim import deref_opt
return deref_opt(_ops_Sub_FloatIObservableFloat(deref_opt(_constant_Int(0)),deref_opt(_ops_Div_IObservableFloatIObservableFloat(deref_opt(_trader_Balance_IAccount(self.trader)),deref_opt(_trader_Position_IAccount(self.trader))))))
开发者ID:SemanticBeeng,项目名称:marketsimulator,代码行数:8,代码来源:_pershareprice.py
示例17: getImpl
def getImpl(self):
from marketsim.gen._out.trader._pendingvolume import PendingVolume_IAccount as _trader_PendingVolume_IAccount
from marketsim.gen._out.trader._position import Position_IAccount as _trader_Position_IAccount
from marketsim.gen._out.strategy.position._trader import Trader_strategypositionRSI_linear as _strategy_position_Trader_strategypositionRSI_linear
from marketsim.gen._out.strategy.position._desiredposition import DesiredPosition_strategypositionRSI_linear as _strategy_position_DesiredPosition_strategypositionRSI_linear
from marketsim.gen._out.ops._sub import Sub_IObservableFloatIObservableFloat as _ops_Sub_IObservableFloatIObservableFloat
from marketsim import deref_opt
return deref_opt(_ops_Sub_IObservableFloatIObservableFloat(deref_opt(_ops_Sub_IObservableFloatIObservableFloat(deref_opt(_strategy_position_DesiredPosition_strategypositionRSI_linear(self.x)),deref_opt(_trader_Position_IAccount(deref_opt(_strategy_position_Trader_strategypositionRSI_linear(self.x)))))),deref_opt(_trader_PendingVolume_IAccount(deref_opt(_strategy_position_Trader_strategypositionRSI_linear(self.x))))))
开发者ID:SemanticBeeng,项目名称:marketsimulator,代码行数:8,代码来源:_position.py
示例18: __init__
def __init__(self, orderbook = None, link = None, timeseries = None):
from marketsim.gen._out.orderbook._local import Local_StringFloatIntListITimeSerie as _orderbook_Local_StringFloatIntListITimeSerie
from marketsim import deref_opt
from marketsim.gen._out.orderbook._twowaylink import TwoWayLink_ILinkILink as _orderbook_TwoWayLink_ILinkILink
self.orderbook = orderbook if orderbook is not None else deref_opt(_orderbook_Local_StringFloatIntListITimeSerie())
self.link = link if link is not None else deref_opt(_orderbook_TwoWayLink_ILinkILink())
self.timeseries = timeseries if timeseries is not None else []
Remote_Impl.__init__(self)
开发者ID:SemanticBeeng,项目名称:marketsimulator,代码行数:8,代码来源:_remote.py
示例19: __init__
def __init__(self, alpha = None, k = None, timeframe = None, trader = None):
from marketsim.gen._out._const import const_Float as _const_Float
from marketsim import deref_opt
from marketsim.gen._out.trader._singleproxy import SingleProxy_ as _trader_SingleProxy_
self.alpha = alpha if alpha is not None else (1.0/14.0)
self.k = k if k is not None else deref_opt(_const_Float(-0.04))
self.timeframe = timeframe if timeframe is not None else 1.0
self.trader = trader if trader is not None else deref_opt(_trader_SingleProxy_())
开发者ID:SemanticBeeng,项目名称:marketsimulator,代码行数:8,代码来源:_rsi_linear.py
示例20: getImpl
def getImpl(self):
from marketsim.gen._out.math._stddev import StdDev_mathCumulative as _math_StdDev_mathCumulative
from marketsim.gen._out.ops._sub import Sub_IObservableFloatFloat as _ops_Sub_IObservableFloatFloat
from marketsim.gen._out.math._source import Source_mathCumulative as _math_Source_mathCumulative
from marketsim.gen._out.ops._div import Div_IObservableFloatFloat as _ops_Div_IObservableFloatFloat
from marketsim.gen._out.math._avg import Avg_mathCumulative as _math_Avg_mathCumulative
from marketsim import deref_opt
return deref_opt(_ops_Div_IObservableFloatFloat(deref_opt(_ops_Sub_IObservableFloatFloat(deref_opt(_math_Source_mathCumulative(self.x)),deref_opt(_math_Avg_mathCumulative(self.x)))),deref_opt(_math_StdDev_mathCumulative(self.x))))
开发者ID:SemanticBeeng,项目名称:marketsimulator,代码行数:8,代码来源:_relstddev.py
注:本文中的marketsim.deref_opt函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论