Handling Missing Bars in Multi-Instrument Portfolio Backtests
Summary
A short forum exchange addresses an error that occurs when a portfolio backtest combines instruments, even though testing each instrument individually works. The reply attributes the problem to a data update that lacks a bar for the JD9999 symbol and suggests adjusting the strategy logic to handle that condition.
The exchange points to a practical issue in multi-instrument backtesting: synchronized updates may not contain data for every symbol at every step. A strategy that assumes each instrument always has a bar can fail when data is absent. The post offers no code, detailed diagnosis, or alternative handling method, and it does not establish whether the missing bar is the only possible cause. It is a brief troubleshooting hint rather than a complete guide to portfolio backtest design.
Key ideas
- A portfolio backtest may fail even when each instrument runs successfully on its own.
- The response identifies a missing bar for JD9999 during an update as the reported cause.
- Strategy logic may need to account for updates that lack data for one instrument.
- The exchange does not provide implementation details or confirm broader causes.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.