BacktestSetup#

tradeexecutor.backtest.backtest_runner.BacktestSetup Python class in Trading Strategy framework.

class BacktestSetup[source]#

Bases: object

Describe backtest setup, ready to run.

__init__(start_at, end_at, universe_options, cycle_duration, universe, wallet, state, pricing_model, routing_model, execution_model, sync_model, trading_strategy_engine_version, trade_routing, reserve_currency, decide_trades, create_trading_universe, data_preload=True, name='backtest', minimum_data_lookback_range=None)#
Parameters:
Return type:

None

Methods

__init__(start_at, end_at, universe_options, ...)

backtest_static_universe_strategy_factory(...)

Create a strategy description and runner based on backtest parameters in this setup.

Attributes

data_preload

minimum_data_lookback_range

name

Name for this backtest

start_at

Test start

end_at

Test end

universe_options

Override trading_strategy_cycle from strategy module

cycle_duration

Override trading_strategy_cycle from strategy module

universe

wallet

state

pricing_model

routing_model

execution_model

sync_model

trading_strategy_engine_version

trade_routing

reserve_currency

decide_trades

create_trading_universe

start_at: datetime.datetime | None#

Test start

end_at: datetime.datetime | None#

Test end

universe_options: UniverseOptions#

Override trading_strategy_cycle from strategy module

cycle_duration: Optional[CycleDuration]#

Override trading_strategy_cycle from strategy module

name: str = 'backtest'#

Name for this backtest

backtest_static_universe_strategy_factory(*ignore, execution_model, execution_context, sync_model, pricing_model_factory, valuation_model_factory, client, timed_task_context_manager, approval_model, **kwargs)[source]#

Create a strategy description and runner based on backtest parameters in this setup.

Parameters:
Return type:

StrategyExecutionDescription

__init__(start_at, end_at, universe_options, cycle_duration, universe, wallet, state, pricing_model, routing_model, execution_model, sync_model, trading_strategy_engine_version, trade_routing, reserve_currency, decide_trades, create_trading_universe, data_preload=True, name='backtest', minimum_data_lookback_range=None)#
Parameters:
Return type:

None