Diagnosing Missing Trades in a Portfolio Strategy Backtest
Summary
This brief forum exchange concerns a portfolio strategy whose backtest finishes without producing an apparent result, even though data loading succeeds. One participant suggests inserting print statements before order functions in the strategy’s bar callback to locate how far the execution logic proceeds. The original poster reports that the strategy completes, and another participant asks whether the backtesting engine’s trade collection contains executed trades. The exchange offers a narrow debugging sequence: trace whether the order path is reached, then inspect the engine’s recorded fills. It does not establish the cause of the missing output or report whether the suggested inspection resolved the issue. As a result, it is a troubleshooting hint for separating strategy execution from trade generation, rather than a general explanation of portfolio backtesting or a tested solution.
Key ideas
- A completed strategy run does not by itself confirm that orders were submitted or filled.
- Logging immediately before order calls can show whether strategy logic reaches the execution step.
- Inspecting the engine’s trade records can help determine whether any trades were generated.
- The discussion does not identify the root cause or confirm a resolution.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.