Forecast a time series with honest validation

8 steps · about 5 h 5 min · Intermediate

  1. Represent a time series (guide, statsmodels documentation, 35 min)

    Preserve the time index, interval and measured variable before deriving any features.

  2. Inspect trend and seasonality (guide, Wikipedia, 40 min)

    Recognise structure that determines which baseline and validation windows are credible.

  3. Establish naive baselines (guide, Wikipedia, 35 min)

    Require a learned model to beat simple last-value, mean or seasonal forecasts.

  4. Create time-ordered splits (reference, scikit-learn documentation, 35 min)

    Train only on observations that occur before each evaluation window and preserve expanding history.

  5. Build lagged features safely (guide, scikit-learn documentation, 45 min)

    Convert past observations and calendar signals into predictors without including unavailable future values.

  6. Choose forecast error measures (reference, scikit-learn documentation, 40 min)

    Compare scale-dependent errors while keeping the business meaning of mistakes visible.

  7. Quantify uncertainty (guide, scikit-learn documentation, 35 min)

    Report a range of plausible future values and state the assumptions behind its coverage.

  8. Review errors across horizons (reference, statsmodels documentation, 40 min)

    Compare horizon behaviour, trend, seasonality and residual structure before accepting the model.