strategy_module#

tradeexecutor.strategy.strategy_module Python module in Trading Strategy framework.

Module description#

Describe strategy modules and their loading.

Classes#

CreateTradingUniverseProtocol

A call signature protocol for user's create_trading_universe() functions.

DecideTradesProtocol

A call signature protocol for user's decide_trades() functions.

StrategyModuleInformation

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

Functions#

parse_strategy_module(path, ...[, source_code])

Parse a loaded .py module that describes a trading strategy.

pregenerated_create_trading_universe(universe)

Wrap existing trading universe, so it can be passed around for universe generators.

read_strategy_module(path)

Loads a strategy module and returns its factor function.