Look-ahead bias and repainting: when was a pattern known?

Updated 2026-10-09 Español·Deutsch·Русский·Italiano·Français·Türkçe·العربية

Look-ahead bias occurs when a historical decision uses information that only became available later. Repainting means that previously displayed values or labels change. The concepts overlap, but are not identical: an unfinished candle naturally changes, while hidden future information invalidates a historical test.

Available data

Available dataEvaluate only using data left of the boundary.. Do not use data after the decision time. [100, 103, 98, 106, 104, 110, 107]98110Now?Time →
  • Evaluate only using data left of the boundary.
  • Do not use data after the decision time.
Teaching diagrams with hypothetical numbers. They explain concepts, not the next price move.

One label, two times

Suppose a high occurs on Monday, but a rule needs two later completed bars with lower highs to confirm it. The label may be drawn on Monday to describe geometry. A simulated decision on Monday cannot use that confirmation: it was only available after Wednesday.

Confirmation delay is not necessarily a defect. Concealing the delay and treating a finished historical chart as contemporary knowledge is the problem.

Changes that are not automatically leakage

The current high, low and close update until a bar ends. A provisional interpretation can also change as new observations arrive. Its provisional status and earlier versions should remain distinguishable from the final result.

Backdating a final label without documenting its availability is different: the chart describes history, but does not establish timely actionability.

A pivot becomes known after confirmation, not at the extreme itself.

A pivot becomes known after confirmation, not at the extreme itself.L: 2; ✓: 4. The extreme marker and confirmation time differ.. Do not move later confirmation into the past. [100, 96, 90, 95, 98]90100L✓NowTime →
  • L: 2; ✓: 4
  • The extreme marker and confirmation time differ.
  • Do not move later confirmation into the past.
Teaching diagrams with hypothetical numbers. They explain concepts, not the next price move.

A reproducible check

  • Inspect successive prefixes of the data, adding new bars only after recording the earlier interpretation.
  • Record event time, data availability and confirmation time separately.
  • Model a decision based on the close no earlier than the moment that close is known.
  • Do not use the final daily high while that day is still developing.
  • Check revisions, corporate adjustments and changes of source.

This distinguishes causal information from retrospective illustration. It does not establish profitability; that requires independent testing.

See TradingView’s repainting documentation. The weekday example is hypothetical, not a detector specification.

Related questions