Skip to content
All library documents

Daily Backtest Timing and Use of Closing Prices

Article BigQuant

Summary

A platform forum exchange addresses whether a daily backtest that predicts a five-day return using the current day’s closing price can access that day’s prediction before the close is available. The response explains that, in the described daily setup, the main strategy function or data handler runs at the close of each bar. Since the model also makes its prediction from daily prices, the prediction associated with that date is available at that bar’s closing time.

The answer therefore says this setup does not, as described, involve look-ahead bias. Its conclusion is narrow: it depends on the backtest’s bar timing and on the model using information available at that point. The exchange offers no code, platform-specific verification, or treatment of intraday scheduling and order execution timing, so users should confirm those details in their own environment.

Key ideas

  • The question concerns a daily prediction that uses the same day’s closing price.
  • The response says daily strategy callbacks occur at the current bar’s close.
  • Under that timing assumption, the prediction for the date is available at the close.
  • The conclusion about look-ahead bias is limited to the described daily setup.

Tags

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