Meeting Strategy Initialization History Requirements in Backtests
Summary
This forum exchange explains why a VeighNa strategy may remain outside its trading state during a backtest, leaving it unable to submit orders. The response says the backtest must load more historical data than the number of days requested by the strategy’s load_bar setting. That history is needed to complete strategy initialization before trading becomes active.
The post offers a direct configuration check: compare the backtest’s loaded data length with the strategy’s initialization lookback. It does not include code, a worked example, or a follow-up confirming that the adjustment fixed the issue. The advice is limited to this initialization-related cause and does not address other reasons a strategy might fail to place orders.
Key ideas
- A strategy may not enter its trading state until initialization finishes.
- The backtest needs more historical data than the strategy requests through load_bar.
- Insufficient loaded history can prevent the strategy from placing orders.
- The forum response does not cover other possible order-submission failures.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.