Skip to content
A hand using a fountain pen to review a paper document

How should scaling and missing-data treatment work in a time-series model?

Fit transformations inside the historical training window and treat missing observations as a data question, not only a software problem.

The key idea

Fit scaling, imputation and learned transformations using eligible training observations only, then apply those fitted objects to later data. A full-sample mean or median contains information about the future even when the final estimator is trained chronologically. Keep the preprocessing pipeline inside every validation fold and every simulated model update.

The model and its assumptions

Scaling changes how some algorithms interpret distances and penalties. Imputation changes the information supplied when a field is unavailable. These are model components, not neutral housekeeping. A missing quote, a not-yet-published financial statement and an instrument that does not trade are different economic situations and may need different treatment.

A training-only transformation also provides a useful operational contract: the saved model artifact includes the exact centring, scaling and fill rules needed at prediction time. Recalculating them from whatever data happens to be present in production can change the model without a documented retraining event.

A worked example

Suppose a hypothetical training feature has mean 10 and standard deviation 2. A later observation of 14 has a training-standardised value of (14−10)/2 = 2. If future observations raise the full-sample mean to 12 while the analyst keeps standard deviation 2 for illustration, the same historical observation is mapped to 1 instead. The past feature representation has changed using later evidence.

For imputation, imagine that an accounting field has training median 20 but a later downturn lowers the full-sample median to 12. Filling earlier missing records with 12 injects information about that downturn into the historical experiment.

Practical review and implementation

Define a preprocessing pipeline and fit it separately in each training window. Store parameters with the estimator. Distinguish absent values from genuine zeros, and retain missingness indicators when there is an economic reason for them. Validate any forward filling against the original publication process; carrying a value forward is not appropriate for every field.

Monitor missingness and feature ranges after deployment. A model can technically produce a prediction while receiving mostly imputed inputs. Decide in advance when that condition should stop predictions or trigger review rather than letting software completeness stand in for data quality.

Assumptions and limitations

Training-only imputation prevents leakage but does not prove that the missing-data mechanism is harmless. Missing values may be related to distress or to changes in vendor coverage. Some estimators do not require conventional scaling, and unnecessary transformations can complicate interpretation. Evaluate each preprocessing choice as part of the full forward policy rather than adopting one universal recipe.

Primary references

Further detail on the underlying concepts and data definitions: