Using Premarket Data in Backtests and Live Trading
Summary
The discussion explains a timing mismatch between backtests and live simulation when a strategy uses the current day's opening price. In the platform's backtest premarket handler, the user says same-day data can be accessed, allowing an opening-price rule to guide trades later that day. The response clarifies that the live premarket handler does run, but future data is unavailable there and requests for it return empty.
The example rule avoids selling after a sufficiently strong open and avoids buying after a sufficiently weak one, with execution planned for the afternoon. The thread notes that daily bars make it difficult to reproduce this intraday decision in a backtest. It gives no validation results or detailed solution for matching intraday live behavior to historical testing, so the example should not be treated as evidence of profitability; reliable evaluation requires data and execution timing consistent with the live process.
Key ideas
- A live premarket handler runs, but it cannot access data that has not yet become available.
- Backtest access to the same day's open can support later trades only when the decision and execution timing are modeled correctly.
- The example uses opening-price thresholds to change afternoon buy or sell decisions.
- Daily bars may not capture intraday rules that depend on the open and later execution.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.