setup_backtest_for_universe#
- setup_backtest_for_universe(strategy_path, start_at, end_at, cycle_duration, initial_deposit, universe, routing_model, max_slippage=0.01, validate_strategy_module=False, candle_time_frame=None, allow_missing_fees=False)[source]#
High-level entry point for setting up a single backtest for a predefined universe.
The trading universe creation from the strategy is skipped, instead of you can pass your own universe e.g. synthetic universe. This is useful for running backtests against synthetic universes.
- Parameters:
cycle_duration (CycleDuration) – Override the default strategy cycle duration
allow_missing_fees – Legacy workaround
candle_time_frame (Optional[TimeBucket]) – Override the default strategy candle time bucket
strategy_path (Path) –
start_at (datetime) –
end_at (datetime) –
initial_deposit (int) –
universe (TradingStrategyUniverse) –
routing_model (BacktestRoutingModel) –