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

Forecasting and Machine Learning: three-stage chain Define the task: Target, horizon and metric; Validate by time: Separate train, validation, test; Monitor drift: Post-launch error and distribution START Define the task Target, horizon and metric MECHANISM Validate by time Separate train, validation, test CHECK Monitor drift Post-launch error and distribution
Figure 1: a three-stage chain in Forecasting and Machine Learning — Define the task → Validate by time → Monitor drift. The three stages form a judgment chain, not the only path; labels come from the article text and carry no statistics. The sample is the article argument and units are marked in the text.
Split training, validation and test by time A left-to-right time axis with 2010–2019 for training, 2020–2021 for validation and 2022–2024 for testing; block widths are proportional to the 10, 2 and 3 years, in chronological order and never shuffled. train 2010–2019 (10 yrs) validate2020–21 test 2022–2024 (3 yrs) pastfuture Time moves forward: train, validate, test; never shuffle or use post-origin data.
Figure 2: This timeline splits training, validation and testing in chronological order; widths are proportional to the 10, 2 and 3 years (25.33 px per year). Random shuffling leaks future information into training; choose blocks around the forecast origin and cross-validate inside the training block. The years are teaching assumptions.

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.

Test-set MAE: baseline 0.133, model 0.067 On the 2022–2024 test set, baseline MAE is about 0.133 and model MAE about 0.067, a fall of about 0.066, or about 49.6% relative to the baseline. This is a point estimate without a confidence interval; it does not prove the model is stable in other periods or samples. Test MAE falls from 0.133 to 0.067, about −49.6% Baseline 0.133Model 0.067 Historical mean / simple ruleFeatures and model Fall of about 0.066 (about −49.6% vs baseline) Unit: mean absolute error in the target's unit; 2022–2024 test set; 0.133 and 0.067 are teaching examples.
Figure 3: On the 2022–2024 test set, baseline MAE is about 0.133 and model MAE about 0.067, a fall of about 0.066, or about −49.6% relative to the baseline. This is a point estimate without a confidence interval and does not prove stability in other periods or samples. Unit: the target's unit; figures are teaching examples.
From the forecast origin: leakage, baseline, and deployment First ask whether every feature was available at the forecast origin; if not, it is leakage and must be removed or replaced with the version available then. If yes, ask whether the model really beat the baseline out of sample; if not, do not deploy. If yes, still monitor drift and retrain. The time split and out-of-sample comparison are two different gates. Two gates: no leakage, then real value Gate 1 Was every feature available at the forecast origin? No → leakage: remove or use the then-available version not “available later” Yes ↓ Gate 2 Did it really beat the baseline out of sample? No → do not deploy: return to baseline or reframe same test period, same metric Yes ↓ May deploy, but monitor drift retrain and record failure conditions both gates passed is still one test-period result Time split stops peeking; out-of-sample beats prove use. Drift, sample selection and costs can still fail. A check process, not model selection or advice.
Figure 4: First ask whether every feature was available at the forecast origin; if not, it is leakage and must be removed or replaced with the then-available version. If yes, ask whether the model really beat the baseline out of sample; if not, do not deploy. If yes, still monitor drift and retrain. The time split answers “did it peek at the future”; beating the baseline answers “is it useful.” The two gates cannot replace each other. A check process, not model selection or investment advice.

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

  1. Concept check: explain why time series cannot be split randomly into train and test.
  2. Calculation: state a naive baseline and explain why it must precede a complex model.
  3. Conditions: give one data-leakage example and how to avoid it.
Reference answers
  1. 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.
  2. 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.
  3. 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

  1. 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)
  2. 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)
  3. Rob J. Hyndman and George Athanasopoulos. Forecasting: Principles and Practice, 3rd edition. OTexts, 2021. https://otexts.com/fpp3/ (accessed 2026-11-21)
  4. scikit-learn developers. Common pitfalls and recommended practices. scikit-learn documentation. https://scikit-learn.org/stable/common_pitfalls.html (accessed 2026-11-21)
  5. 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.

Back to station