By the end of this article, you can split training, validation, and test sets around the forecast origin, read an MAE decline, and use two gates—were the features available at the time, and did the model beat the baseline out of sample—to check leakage and false gains.
Problem
Forecasting and machine learning address whether, given historical data and a time boundary, a testable prediction can be made about a future variable and when the model will fail. The core is not model complexity but task definition, baselines, validation and drift monitoring[1][3][4][5].
Inputs
Inputs include the target, forecast horizon (one-step or multi-step), timestamps of available information, feature definitions and update frequency, and the evaluation metric (error, directional accuracy or economic value). If inputs contain data only known in the future, the model is leaking[4].
Assumptions
Assumptions include that historical patterns remain usable for a period, the sample is representative, feature-target relationships are stable and error distributions support evaluation. Time series also assume order matters and cannot be randomly shuffled; structural breaks invalidate historical relationships.
Machine learning additionally assumes train and test are identically distributed; under drift, performance falls. Interpretability methods—feature importance, partial dependence—also carry assumptions and are not causal evidence[2][4].
Steps
Steps fall into four groups: define the task (target, horizon, metric and time boundary); build a naive baseline (last value or historical mean); validate by time (chronological splits, leakage-safe features, model selection and tuning, holdout evaluation); and monitor drift and error after deployment.
Example: train on 2010–2019, validate on 2020–2021, test on 2022–2024; every feature may use only information available at the forecast point. The baseline is “next month's inflation equals this month's”; any model must beat it first[3][4].
Figure
A teaching example: realised inflation in the test period is 2.0%, 2.2% and 2.1%. The naive last-value baseline predicts 1.9%, 2.0% and 2.2%, for MAE=(0.1+0.2+0.1)/3≈0.133 percentage points. A model predicts 2.0%, 2.1% and 2.0%, for MAE=(0+0.1+0.1)/3≈0.067 percentage points, roughly halving the error. If the model only cuts MAE to 0.12 percentage points while raising tail risk, maintenance cost or reducing interpretability, it is not worth replacing the baseline. The numbers are teaching assumptions, not any country’s inflation.
Figures in plain language
The first two figures cover the workflow and the time split; the next two put the test-set error reduction on a number line and use a decision tree to check whether the gain comes from future information or overfitting.
Interpreting results
Interpreting results should report out-of-sample error, its time distribution and directional accuracy, separating statistical significance from economic usefulness. Good test performance does not mean live or policy usefulness; trading costs, decision delays and threshold choices change outcomes[2][3].
Failure conditions
Failure conditions include data leakage (future information in features); random splits of time series; overfitting; repeated use of the test set for tuning; distribution drift and structural breaks; metrics inconsistent with the decision objective. Failure is often a task-definition and validation problem, not an algorithm problem[4][5].
Reproduction
Reproduction requires pinned data versions, feature code, random seeds and hyperparameters; saved train/validation/test splits; baseline comparisons and sensitivity. External validation—different periods or regions—exposes drift better than cross-validation within one sample[1][2][3][5].
Knowledge-point review
prediction tasks
Definition: A prediction task defines the target, horizon, loss function and acceptable errors, including regression, classification, ranking and probabilistic forecasting.
Mechanism: The target drives features, validation and evaluation; regression predicts continuous values, classification categories, probabilistic forecasts distributions, and loss shapes optimisation.
Example: For example, predicting next-month return is regression, default is classification, and default probability is probabilistic.
Boundary: A task is not model choice; target leakage, horizon and loss mismatch optimise the wrong thing, high accuracy may not be economically useful, and targets must fit decisions.
baselines
Definition: A baseline is a simple, transparent, reproducible reference forecast such as historical mean, naive extrapolation, random guess or linear model.
Mechanism: Baselines show whether complex models truly improve; high accuracy without one may reflect an easy task or leakage.
Example: For example, predicting tomorrow's price uses today's price as a baseline, and a complex model must beat it clearly.
Boundary: Baselines are not a formality; weak baselines overstate models, strong ones hide feasible gains, baselines need the same data and metrics, and time-series baselines are essential.
training, validation and test sets
Definition: Training fits the model, validation tunes and selects, and test evaluates once; time series must split by time.
Mechanism: Separation prevents overfitting; cross-validation uses more data, but time series cannot be shuffled randomly or future information leaks.
Example: For example, train on 2010-2018, validate 2019 and test 2020-2022 to avoid future information.
Boundary: Splitting is not mechanical; time leakage, overlapping samples and repeated testing invalidate the test set, repeated validation overfits, and drift makes historical tests unrepresentative.
features
Definition: Features are model inputs or transformations such as returns, valuations, macro indicators, text and interactions.
Mechanism: Feature engineering turns raw data into learnable signals; scaling, encoding, missing handling and selection matter, and features must be available at forecast time.
Example: For example, P/E, momentum and volatility are standardised and imputed as stock-selection features.
Boundary: More features are not better; leakage, collinearity, noise and curse of dimensionality reduce generalisation, importance can be unstable, and domain knowledge beats automatic generation.
interpretability
Definition: Interpretability explains why a model makes a prediction through feature importance, partial dependence, SHAP, rules and surrogates.
Mechanism: Global explanations show overall patterns, local ones single predictions; explanations should be stable, verifiable and consistent with domain mechanisms.
Example: For example, SHAP shows a default prediction driven mainly by leverage and past delinquencies.
Boundary: Interpretability is not causation; importance reflects correlation and scaling, surrogates can distort, explanations can rationalise, and interactions are hard to fully represent.
drift and evaluation
Definition: Drift is change in data distribution, relationships or targets over time, and evaluation uses accuracy, recall, calibration and economic value.
Mechanism: Data, concept and label drift change performance; monitoring, retraining and recalibration sustain it.
Example: For example, a rate regime shift breaks historical default models, requiring recalibration and new features.
Boundary: Evaluation is not one accuracy score; imbalance, asymmetric costs and time change distort metrics, drift detection lags, and retraining can add instability.
Related
| Knowledge ID | Title | Relation |
|---|---|---|
| RES-017 | Leads, Lags and Forecasting | Prerequisite |
| RES-013 | Introduction to Linear Regression | Recommended |
| RES-020 | Backtesting and Look-Ahead Bias | Recommended |
| RES-022 | Out-of-Sample Testing and Overfitting | Recommended |
Exercises
- Concept check: explain why time series cannot be split randomly into train and test.
- Calculation: state a naive baseline and explain why it must precede a complex model.
- Conditions: give one data-leakage example and how to avoid it.
Reference answers
- Adjacent observations in a time series are dependent and future values depend on the past; random splitting lets the model see information from before or after the test period and overstates performance. Use chronological blocks and a buffer.
- The baseline can be “next month equals this month” or a historical mean; it is the minimum reference and shows whether the model learned signal. A complex model that cannot beat it is not useful.
- An example is using revised GDP for the current month to predict the current market reaction when the revision was unavailable at the forecast origin. Avoid it with point-in-time snapshots, availability timestamps on every feature, and a timestamp audit in the pipeline.
Sources
- OpenStax. Introductory Statistics 2e, 12.5 Prediction. OpenStax, Rice University. https://openstax.org/books/introductory-statistics-2e/pages/12-5-prediction (accessed 2026-10-30)
- Davide Chicco; Giuseppe Jurman. The ABC recommendations for validation of supervised machine learning results in biomedical sciences. Frontiers in Big Data, 5, 979465. https://www.frontiersin.org/journals/big-data/articles/10.3389/fdata.2022.979465/full (accessed 2026-10-30)
- Rob J. Hyndman and George Athanasopoulos. Forecasting: Principles and Practice, 3rd edition. OTexts, 2021. https://otexts.com/fpp3/ (accessed 2026-11-21)
- scikit-learn developers. Common pitfalls and recommended practices. scikit-learn documentation. https://scikit-learn.org/stable/common_pitfalls.html (accessed 2026-11-21)
- D. Sculley et al. Machine Learning: The High-Interest Credit Card of Technical Debt. Google Research, 2014. https://research.google/pubs/machine-learning-the-high-interest-credit-card-of-technical-debt/ (accessed 2026-11-21)
Worked demo
Read-through check: can you say three things?
No recitation needed. Tick each sentence below and see whether you can explain the mechanism, one worked example and one boundary in your own words.
Ticked 0 / 3
The numbers are teaching assumptions that show relationships, not forecasts or investment advice.
This article has passed the current publication gate. Factual, calculation and translation revisions update both language versions together.