Mental Playbooks
Mental Models

Rolling-Origin Validation

Repeatedly fit or update a forecasting method at successive historical cutoffs, then score its predictions on later observations at the intended horizon.

A model can fit last year's history by learning from details that were unknown at the order deadline. Rolling tests reproduce the timing of the real choice.

A footbridge in section, showing the supports that carry its deck across a stream.

Could I have produced this exact prediction with the information on my desk that day?

A bookseller orders stock four weeks ahead. For each past Monday, forecast sales four weeks later using sales and promotion plans known by that Monday. Compare errors with a simple seasonal forecast. Randomly shuffling weeks could let a future promotion or holiday pattern enter training for an earlier decision.

  1. 1.Choose the forecast horizon and loss measure from the ordering decision.
  2. 2.Move the cutoff forward and recompute every learned transformation using only data then available.
  3. 3.Compare like-for-like forecasts with a simple baseline, including difficult periods.
  • ·Using revised historical data that was unavailable at the time can leak future information.
  • ·Overlapping forecast windows make errors dependent, so treat uncertainty estimates with care.

Should old data stay in every training window?

An expanding window uses all available history. A fixed-length sliding window can help when older behavior is less relevant. Test the rule in the same chronological evaluation.

Why compare with a simple seasonal rule?

An elaborate model must improve a realistic alternative, such as ordering from the same week last year, to justify extra effort.

scikit-learn user guide, Cross-validation of time series data