Data leakage is future or unavailable information reaching a backtest before it was actually available, making the result better than live trading would deliver. It appears in forms such as look-ahead bias, survivorship bias, and inadvertently using revised data.
How it works
Leakage happens through timing: a figure used too early, a membership applied too soon, or a survivor-only dataset hiding the failures.
It is prevented by strict availability discipline: every input enters the test only when it was knowable.
Why it matters
Leakage inflates results and hides until the strategy fails live, which is the most expensive way to learn about it.
Checking for leakage is part of the standard overfitting validation: date every input, verify the dataset covers failures, and test on periods the strategy never saw.
A simple market example
A dataset only includes companies still listed today, so a backtest never sees the ones that failed. The result looks better because the failures were quietly removed, which is survivorship leakage.
Common mistakes
Using revised figures as if they were available earlier than they were.
Trusting a survivor-only dataset that has removed the failures that most dragged down historical results.
Frequently asked questions
Is data leakage the same as look-ahead bias?
Look-ahead bias is one form of leakage. Leakage is the broader term covering any future or unavailable information reaching the test.
How do I check for leakage?
Date every input by availability, confirm the dataset includes failures, and test on unseen periods.
Does leakage always show up as an obvious error?
No. It is often quiet, which is why it is a standard check rather than a visible mistake.
Educational content only. Definitions describe common market usage and may vary by jurisdiction, instrument, or institution.