setup_backtest_for_universe#

API documentation for tradeexecutor.backtest.backtest_runner.setup_backtest_for_universe Python function.

setup_backtest_for_universe(strategy, start_at, end_at, cycle_duration, initial_deposit, universe, routing_model=None, max_slippage=0.01, validate_strategy_module=False, candle_time_frame=None, allow_missing_fees=False, name=None, universe_options=None, create_indicators=None, parameters=None, indicator_storage=None, max_workers=None)[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: