Definition

  • Expanding Window is a time series validation method.
  • The training set grows (expands) over time, while the test set always uses the next time period.
  • Always respects the rule: train on the past → predict the future.
  • Once data is included in training, it remains in all future training windows.

How It Works

  1. Order the dataset chronologically.
  2. Start with an initial training period.
  3. Train on that period → validate on the next period.
  4. Expand the training window to include more past data → validate on the following period.
  5. Repeat until the end of the dataset.

Example

Dataset: 2020–2024

  1. Train = 2020 → Test = 2021
  2. Train = 2020–2021 → Test = 2022
  3. Train = 2020–2022 → Test = 2023
  4. Train = 2020–2023 → Test = 2024

Training keeps expanding, test always moves forward.


Expanding vs. Rolling Window

  • Expanding Window
    • Training set keeps growing with all historical data.
    • Useful when older data is still relevant.
  • Rolling (Sliding) Window
    • Training set size is fixed.
    • As new data enters, oldest data is dropped.
    • Useful when recent data is more important (trends, seasonality).

When to Use

  • Expanding window → cumulative learning (finance, macroeconomic forecasting).
  • Rolling window → recent data focus (stock trading, demand forecasting).

Summary
Expanding Window = a time series CV method where the training set expands with time, and the test set always comes after it.

  • Past → Future always respected.
  • Differs from rolling window since old data is never dropped.