First, the key terms.

Horizon
How far into the future a forecast extends.
Seasonality
A recurring pattern associated with a defined period.
Backtest
A historical simulation of forecasting using only information then available.

The idea, explained

Time order changes evaluation. A random split can train on the future while testing on the past, producing an unrealistic assessment. Trend, seasonality, irregular events and changing relationships require different treatments. Naïve forecasts, moving averages and exponential smoothing provide useful baselines; more elaborate models should demonstrate added value. Prediction intervals describe a model’s uncertainty about future observations and differ from intervals for a mean parameter. External inputs must themselves be available or forecast when the prediction is made.

STEP 1

Inspect the series before fitting

Check regular spacing, missing periods, unit changes and one-time disruptions. A weekly seasonal pattern differs from a long-run trend. Plot the original scale and investigate whether apparent structure is created by reporting changes.

STEP 2

Use a sensible baseline

For repeated weekly patterns, last week’s corresponding period can be a useful seasonal baseline. A moving average smooths noise but may lag a trend. Exponential smoothing weights observations according to its formulation. Compare candidate methods at the actual decision horizon.

STEP 3

Evaluate rolling forward

Train up to a cutoff, forecast the next interval, then move the cutoff forward. Aggregate relevant error measures and inspect bias, costly peaks and interval coverage. Percentage error measures can behave badly near zero; choose metrics that fit the data and decision.

Follow a worked example.

A fictional store sells 100, 120, 110 and 130 units in four consecutive weeks. A four-week moving-average forecast is 115 units. That simple calculation ignores seasonality, promotions and stockouts, so it is a baseline rather than a complete demand model.

Walk it through, one step at a time

  1. Choose the forecast origin: only those four weeks are available at that moment. Calculate (100 + 120 + 110 + 130) ÷ 4 = 115.
  2. After the next actual week arrives, measure its forecast error. Do not revise the original prediction using that new outcome before evaluating it.
  3. Repeat over multiple cutoffs and compare with a seasonal or other appropriate baseline. Record major event assumptions separately and communicate uncertainty.

Where people get stuck

A low average error can hide systematic underprediction during the highest-demand periods that matter most for capacity.

Now try it yourself.

Pause before opening each answer. Explain your reasoning in your own words.

1. Check the core idea

Why is a random train-test split often inappropriate for forecasting?

Reveal the answer & reasoning

It can expose the model to later observations or related future information, so the test no longer represents the information available at forecast time.

2. Apply what you learned

If next month’s promotion schedule is unknown, may a backtest use its actual realized values as forecast inputs?

Reveal the answer & reasoning

Not as though they were known. Model their availability realistically, supply forecast assumptions or label the result as a different conditional scenario.