Skip to content
All library documents

Handling Missing Price Data in Rolling Equity Calculations

Article BigQuant

Summary

This discussion describes a backtest problem caused by missing historical prices in a rolling maximum calculation. The author expected the portfolio to hold ten stocks, but in earlier periods it sometimes held only one or two. The suspected cause was that a missing value anywhere in a stock’s rolling price window caused the calculation to return an unusable result, excluding that stock from selection.

The post suggests allowing an explicit missing-value policy for the rolling calculation, such as substituting zero or carrying forward the last observed price. These choices can change the computed maximum and therefore which stocks qualify for a portfolio. The report is a brief user observation and feature request, not a tested resolution or a comparison of imputation methods. In practice, treating missing data as zero and carrying forward stale prices have different meanings and risks, so a backtest should choose handling rules that fit the source of the gap and avoid unintended selection effects.

Key ideas

  • A missing observation inside a rolling window can invalidate the calculated statistic and exclude a security.
  • Unexpectedly small historical holdings may indicate a data-handling issue rather than a deliberate selection result.
  • Possible missing-value policies include substituting zero or carrying forward the last observed price.
  • Imputation choices affect rolling calculations and can alter portfolio membership.
  • The post reports a suspected cause and requested option, without presenting a verified fix or comparative tests.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.