Avoid look-ahead bias: make the strategy wait for the evidence
A simulation must know only what could have been known at each moment. Check release times, revisions, finished price bars and the membership of your stock universe.
Ask what was knowable at the decision
Look-ahead bias enters a test when future information influences an earlier decision. It can happen without an obvious coding error. A clean spreadsheet may already contain revised financial figures or a company's current classification, even though those values were unavailable during the period being simulated.
QuantConnect's research guide recommends point-in-time data and explains why a reporting period's end is different from the date its figures became public. For every input, identify the event it describes and the time it became usable. If those timestamps are missing, document the limitation instead of assuming instant availability.
Wait until a price bar is complete
A daily bar contains the day's final high, low, close and volume. A decision at that day's opening cannot use those completed values. Similarly, a signal that depends on the closing price needs a fill rule consistent with learning that price. Automatically buying at the same close can create an execution assumption the strategy could not achieve.
QuantConnect's time-modeling documentation uses a data point's end time to determine when the algorithm receives it. The practical lesson is straightforward: calculate with information already available, then place the simulated order according to a stated trading rule. Keep the market timezone and the data timestamp aligned.
Do not let today's database rewrite yesterday
Suppose a report published in June corrects a figure originally released in March. A test making a decision in April should use the March version, if available. Giving it June's correction creates a more informed historical trader than could actually have existed. Custom data can introduce this problem even in an otherwise careful event-driven engine.
The same question applies to asset selection. Choosing today's surviving companies because they are easy to download can exclude businesses that disappeared. Selecting stocks because you already know they performed well also contaminates the experiment. Define the universe using information that was available at each historical selection date.
Inspect one decision from start to finish
Choose a sample trade and reconstruct its evidence trail: input value, source publication time, system availability time, signal time and order time. Each step should occur in a plausible order. For an insider-filing strategy, the reported transaction date cannot stand in for the later disclosure time.
Then run a deliberate delay test. Move eligible signals to a later session and see how much the result changes, while preserving the original run. A large change does not automatically disprove the strategy, but it identifies timing as a major assumption. Publish that sensitivity alongside the result rather than hiding it behind an impressive return.
Go back to the source.
Original guidance and documentation behind this note. Sources accessed 24 November 2026. External documents may change after this review.
Turn a better question into
a more thoughtful test.