Diagnosing a Backtest Crash from NaN Bar Volume
Summary
This forum post records a failure during a BigQuant daily-bar backtest. The traceback reaches the slippage model while it calculates executable order volume from bar volume and a volume limit; converting the resulting NaN to an integer raises an error. The log also shows the strategy submitting an order during the backtest, but it does not identify which instrument or data row supplied the missing volume.
The trace therefore points to a data-quality or order-matching issue involving a non-finite bar-volume value. It does not include a confirmed diagnosis, a fix, or a follow-up showing that the strategy ran successfully. Readers can use the exception location to narrow debugging toward input volume data and the backtest's order execution path, but should verify the source of the NaN before changing slippage settings or strategy logic. No trading method or performance evidence is presented.
Key ideas
- The backtest fails when the slippage model tries to convert a NaN-derived trade volume to an integer.
- The traceback locates the failure in order matching, where bar volume is multiplied by the configured volume limit.
- The post does not identify the affected instrument or confirm the root cause.
- Inspecting bar-volume inputs and the order execution path would help localize the missing value.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.