BacktestSetup#

tradeexecutor.backtest.backtest_runner.BacktestSetup class.

class BacktestSetup[source]#

Bases: object

Describe backtest setup, ready to run.

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

None

Methods

__init__(start_at, end_at, cycle_duration, ...)

backtest_static_universe_strategy_factory(...)

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

Attributes

data_preload

name

Name for this backtest

start_at

Test start

end_at

Test end

cycle_duration

Override trading_strategy_cycle from strategy module

candle_time_frame

Override trading_strategy_cycle from strategy module

universe

wallet

state

pricing_model

routing_model

execution_model

sync_method

trading_strategy_engine_version

trade_routing

reserve_currency

decide_trades

create_trading_universe

start_at: datetime#

Test start

end_at: datetime#

Test end

cycle_duration: Optional[CycleDuration]#

Override trading_strategy_cycle from strategy module

candle_time_frame: Optional[TimeBucket]#

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_method, 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, cycle_duration, candle_time_frame, universe, wallet, state, pricing_model, routing_model, execution_model, sync_method, trading_strategy_engine_version, trade_routing, reserve_currency, decide_trades, create_trading_universe, data_preload=True, name='backtest')#
Parameters
Return type

None