ForecastingValidationML Systems

Avoiding Data Leakage in Recursive Forecasting

A practical note on preserving temporal integrity when lagged features depend on previous predictions.

Recursive forecasting breaks quickly when validation features accidentally see the future. A leakage-free setup recomputes lag and rolling features at each horizon step using only observed history and prior predictions.

The safest mental model is to treat validation like production: every feature must be available at the exact timestamp where the prediction is made.