StrategyModuleInformation#

tradeexecutor.strategy.strategy_module.StrategyModuleInformation class.

class StrategyModuleInformation[source]#

Bases: object

Describe elements that we need to have in a strategy module.

__init__(trading_strategy_engine_version, trading_strategy_type, trading_strategy_cycle, trade_routing, reserve_currency, decide_trades, create_trading_universe)#
Parameters
Return type

None

Methods

__init__(trading_strategy_engine_version, ...)

validate()

raise StrategyModuleNotValid

Attributes

trading_strategy_engine_version

trading_strategy_type

trading_strategy_cycle

trade_routing

reserve_currency

decide_trades

create_trading_universe

If execution_context.live_trading is true then this function is called for every execution cycle.

create_trading_universe: CreateTradingUniverseProtocol#

If execution_context.live_trading is true then this function is called for every execution cycle. If we are backtesting, then this function is called only once at the start of backtesting and the decide_trades need to deal with new and deprecated trading pairs.

validate()[source]#
Raises

StrategyModuleNotValid – If we could not load/parse strategy module for some reason

__init__(trading_strategy_engine_version, trading_strategy_type, trading_strategy_cycle, trade_routing, reserve_currency, decide_trades, create_trading_universe)#
Parameters
Return type

None