Skip to content
All library documents

Why Daily Bars Cannot Simulate Same-Day Closing-Price Orders

Article vn.py community

Summary

A user asks how to buy or sell at the close when a strategy has only daily bars. The forum response explains that VeighNa's bar-based strategy simulation matches orders on the next bar to avoid using information from a bar before that bar has finished. With daily bars, an order generated from that day's data is therefore filled no earlier than the next day's bar, rather than at the close that produced the signal.

The reply presents this as a framework design rule intended to support fair and repeatable simulation. It does not offer an alternative execution method or discuss using intraday data, auction data, or live brokerage orders. The practical lesson is a data-resolution limitation: a backtest cannot reliably model a same-day closing fill from daily bars alone without relying on information unavailable at decision time. The response is brief and gives no empirical comparison of execution models.

Key ideas

  • The forum question concerns simulating trades at the same day's close with daily bars.
  • VeighNa's bar simulator matches an order on the next bar to avoid lookahead.
  • Daily data alone therefore cannot represent a signal generated and filled at that day's close in this framework.
  • The response does not assess alternative data or execution approaches.

Tags

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