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
- Order the dataset chronologically.
- Start with an initial training period.
- Train on that period → validate on the next period.
- Expand the training window to include more past data → validate on the following period.
- Repeat until the end of the dataset.
Example
Dataset: 2020–2024
- Train = 2020 → Test = 2021
- Train = 2020–2021 → Test = 2022
- Train = 2020–2022 → Test = 2023
- 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.
