Data Leakage
Data leakage occurs when information from outside the training period, or from the target itself, contaminates a model's inputs, producing results that cannot be reproduced in live use. It is closely related to Look-Ahead Bias, Point-in-Time Data, Overfitting and Cross-Validation, each defined in the hedgewing.ai glossary.
Data leakage is the umbrella term for every way that a model can cheat without its builder noticing. Look-ahead bias is one form: a feature computed with future prices. Others include normalising features using the mean and standard deviation of the full dataset (which embeds future statistics into past rows), tuning hyperparameters on the test set, including the target variable or a transformation of it among the inputs, and overlapping training and testing windows in time-series cross-validation.
Leakage is insidious because it makes every metric look better and because the model will happily report high confidence on contaminated inputs. The telltale signs are accuracy that is too good to be true for a noisy domain like markets, feature importance dominated by a variable that should carry little information, and a steep drop in performance the moment the model is run forward in time rather than on a historical split.
Preventing leakage requires discipline in the pipeline rather than cleverness in the model: compute every feature from data strictly before the prediction timestamp, fit scalers only on training windows, and keep an untouched hold-out period. hedgewing.ai's feature pipeline is designed around these rules, and the platform's framing of its on-demand backtests as in-sample and illustrative is a deliberate acknowledgement that only forward, resolved predictions constitute real evidence.
FAQ
What is Data Leakage?
Data leakage occurs when information from outside the training period, or from the target itself, contaminates a model's inputs, producing results that cannot be reproduced in live use.
Which terms are related to Data Leakage?
Data Leakage is closely related to Look-Ahead Bias, Point-in-Time Data, Overfitting and Cross-Validation. Each has its own entry in the hedgewing.ai glossary.
Is this definition of Data Leakage investment advice?
No. This glossary entry explains what Data Leakage means. It is educational reference material, not personalised investment advice and not a recommendation to buy or sell any security.
Create a free Hedgewing account to try hedgewing.ai yourself.