Why the Validation Window Matters
A time-series forecast is made using information available at a particular time. Validation therefore requires more than selecting a set of observations to hold out: it requires a rule for which past observations are used whenever a forecast is made. An expanding window retains the full available history, while a fixed-width rolling window repeatedly removes the oldest observations. Those choices can produce different forecasts, especially when the process changes over time.
A validation comparison is informative only when its design matches the forecasting task. If a model will be updated as new observations arrive, validation should represent that process. The same evaluation dates and forecast horizons should generally be used when comparing window strategies or candidate models.
The observations after an origin are not part of that origin’s training set. For example, when forecasting \(y_{t+1}\), the value of \(y_{t+1}\) is unknown at time \(t\); it becomes an evaluation observation after the forecast is recorded. This ordering is essential. A procedure that uses information from after the origin is not a valid simulation of forecasting at that time.
Constructing the Two Window Schemes
Suppose the initial training period ends at \(m\), and validation uses one-step-ahead forecasts through time \(T\). The origins are \(m,m+1,\ldots,T-1\). The expanding training set grows by one observation at each successive origin. A rolling window with fixed width \(w\) keeps the number of training observations constant, dropping the oldest observation when a new one becomes available.
For a general fixed horizon \(h\), the target at origin \(t\) is \(y_{t+h}\). To keep that target within the observed series, origins must satisfy \(t+h\leq T\). The window definition concerns the observations used to fit the forecast procedure; the horizon specifies how far ahead the forecast reaches. These are separate design choices.
Worked Example: Listing Origins and Training Sets
A hypothetical monthly series has 10 observations. Validation begins after observation 4 and uses one-step-ahead forecasts through observation 10. List the origins, the expanding-window training sizes, and the training sets for a rolling window of width 4.
Method. A one-step forecast at origin \(t\) predicts \(y_{t+1}\). Since the first origin is 4 and the final target is \(y_{10}\), the origins are \(t=4,5,6,7,8,9\), giving six forecasts.
Expanding window. The training set at each origin contains every observation from \(y_1\) through \(y_t\). The sizes are 4, 5, 6, 7, 8, and 9. For example, origin 6 uses \(y_1,\ldots,y_6\), and its target is \(y_7\).
Rolling window. The width is 4, so origin \(t\) uses \(y_{t-3},\ldots,y_t\). The six training sets are \(y_1,\ldots,y_4\); \(y_2,\ldots,y_5\); \(y_3,\ldots,y_6\); \(y_4,\ldots,y_7\); \(y_5,\ldots,y_8\); and \(y_6,\ldots,y_9\). Each set has four observations.
Check. Both schemes produce the same six target dates, \(y_5\) through \(y_{10}\), but use different training observations after the first origin. The rolling set at origin 4 is \(y_1,\ldots,y_4\), so the two schemes coincide there.
How Window Choice Changes Forecasts
An expanding window can be useful when older observations remain relevant and more data improve estimation. It avoids discarding information and may give more stable estimates when the underlying process is reasonably consistent. Its limitation is that a long history can dilute evidence of a recent change. If the level or dynamics have shifted, observations from an earlier regime may pull the fitted model away from current behavior.
A rolling window emphasizes recent observations. It can respond more quickly to changing conditions because older data no longer affect the fit once they fall outside the window. The cost is that fewer observations are available, which can make estimates less stable. A narrow window may also omit useful seasonal patterns or other longer-term structure.
Neither strategy is universally superior. The decision depends on the forecasting setting: whether older data are still informative, how quickly the process may change, how much data the model needs, and how frequently forecasts will be updated. Window width should be selected as part of the validation design, rather than chosen after looking for whichever arrangement gives a preferred result.
Worked Example: A Recent Level Change
A hypothetical monthly claim-count index has observed values \(10,11,9,10,20,21,19,20\). At origin 8, compare the forecasts from two simple level rules: the mean of all observations in the training window, and the mean of the latest four observations. Each rule forecasts the next value by its training-window mean. What are the two forecasts, and what does their difference indicate?
Method. These are illustrative mean-level forecast rules. The all-history rule uses \(y_1,\ldots,y_8\); the rolling rule uses \(y_5,\ldots,y_8\). The values show a possible change in level, so the all-history mean should not automatically be interpreted as an estimate of a constant level that applies throughout the series.
All-history calculation. The sum is \(10+11+9+10+20+21+19+20=120\). Dividing by 8 gives the forecast \(120/8=15\).
Rolling calculation. The latest four values sum to \(20+21+19+20=80\). Dividing by 4 gives the forecast \(80/4=20\).
Interpretation and check. The rolling forecast is 5 index points higher because it excludes the four earlier, lower observations. If the level has genuinely risen and remains near 20, that recent window may be more representative. If the apparent rise is temporary or noisy, discarding the earlier observations could be unhelpful. The arithmetic checks: the all-history mean lies between the earlier and later levels, while the latest-four mean is exactly 20.
A Short Derivation: Updating an Expanding Mean
The expanding-window mean illustrates why each new observation changes an expanding estimate without removing any earlier data. At origin \(t\), let \(M_t\) be the arithmetic mean of \(y_1,\ldots,y_t\). By definition, the sum of those \(t\) values is \(tM_t\). When \(y_{t+1}\) arrives, the new sum is \(tM_t+y_{t+1}\), and there are \(t+1\) observations. Therefore,
This identity shows that the new mean moves from \(M_t\) toward the new observation. The adjustment is the difference \(y_{t+1}-M_t\), divided by \(t+1\), so an individual new value has a smaller effect when the expanding history is long. For a rolling mean of width \(w\), the corresponding update removes the oldest value and adds the newest:
Here \(R_t\) is the mean of \(y_{t-w+1},\ldots,y_t\). The rolling update follows because the new window’s sum equals the old window’s sum minus \(y_{t-w+1}\) plus \(y_{t+1}\), with the number of observations remaining \(w\). Unlike the expanding update, this change depends on both the incoming and departing observations. This calculation explains how window choice affects a simple estimate; fitted models with more parameters can respond differently, but the same inclusion and exclusion rule applies to their training data.
Comparing Forecast Procedures Fairly
To attribute a difference in validation results to window choice, keep the rest of the comparison controlled. In particular, use common forecast origins, common target observations, the same forecast horizon, and a clearly stated refitting rule. At each origin, fit or update the procedure using only the permitted training observations, then produce the forecast. A different initial training length may change both the first evaluation date and the number of forecasts, so those differences should be made explicit.
A rolling window need not mean that the model is estimated only once. The window specifies which observations are eligible for each fit. The model can be refitted at every origin, as in a rolling-origin evaluation, or an implementation may update its estimates as data arrive. Whatever computational method is used, it must produce the same estimates that the stated training set and fitting rule imply.
For a forecast horizon greater than one, the origin-target pairing must remain clear. For example, a three-step forecast at origin \(t\) is judged against \(y_{t+3}\), not against the next observation simply because it is the next value in the data table. If forecasts are made at consecutive origins, their target dates may overlap across horizons. That does not change the window definition, but it matters when interpreting the resulting comparison.
Worked Example: Same Targets, Different Training Histories
A hypothetical index has values \(4,5,4,5,12,13,12\). At origins 4, 5, and 6, compare two forecast rules under expanding and rolling windows of width 3: (A) forecast the mean of the training observations and (B) forecast the last observed value. The targets are \(y_5=12\), \(y_6=13\), and \(y_7=12\).
Method. Apply each rule separately to each stated training set. The expanding windows at origins 4, 5, and 6 contain observations 1–4, 1–5, and 1–6. The rolling windows contain observations 2–4, 3–5, and 4–6.
Origin 4. The expanding mean is \((4+5+4+5)/4=18/4=4.5\); its last observation is 5. The rolling mean is \((5+4+5)/3=14/3\), approximately 4.667; its last observation is also 5. Both forecasts target \(y_5=12\).
Origin 5. The expanding mean is \((4+5+4+5+12)/5=30/5=6\), and its last observation is 12. The rolling mean is \((4+5+12)/3=21/3=7\), and its last observation is 12. Both forecasts target \(y_6=13\).
Origin 6. The expanding mean is \((4+5+4+5+12+13)/6=43/6\), approximately 7.167, and its last observation is 13. The rolling mean is \((5+12+13)/3=30/3=10\), and its last observation is 13. Both forecasts target \(y_7=12\).
Interpretation and check. The last-observation rule gives the same forecast under both window schemes because the most recent value is included in both. The mean rule differs because the rolling window drops earlier low values. The target dates are identical, so a later assessment of forecast accuracy can compare like with like. The rounded mean forecasts are given to three decimal places; all calculations above retain the exact fractions.
Common Mistakes and Practical Choices
- Calling any repeated refit a rolling window. Refitting at each origin does not by itself make a window rolling. If the training data continue to include the entire history, the scheme is expanding.
- Changing the evaluation dates unnoticed. A rolling scheme may require a larger minimum history than an expanding scheme. If this changes the first origin, it may also change the targets being compared. Use common origins when the goal is a direct comparison, or explain why the periods differ.
- Assuming more recent data must be better. A rolling window can adapt to a real change, but it also discards valid information. Its shorter history may increase estimation variability.
- Assuming an expanding window is always safer. Retaining all history is not automatically beneficial when the older observations describe a different process.
- Using a future value to make an earlier forecast. At origin \(t\), the fitting procedure must not use observations after \(t\). In a multi-step forecast, values between \(t\) and the target are also unavailable unless the forecasting setup explicitly provides them.
Check Your Understanding
For each problem, identify the training observations or calculate the requested forecast quantities.
- A series has 15 observations. The initial training length is 6, and validation uses two-step-ahead forecasts through \(y_{15}\). How many forecast origins are there, and what are the expanding training sizes? (Answer: 8 origins, \(t=6,\ldots,13\); sizes 6 through 13.)
- At origin 6, the observations are \(8,9,8,9,15,16\). Find the all-history mean forecast and the rolling mean forecast with width 3. (Answer: \(65/6\approx10.833\) and \(40/3\approx13.333\), respectively.)
- Validation begins at origin 5 and ends with a three-step forecast whose target is \(y_{11}\). How many origins are available, and what is the first rolling training set for width 4? (Answer: 4 origins, \(t=5,6,7,8\); first rolling set is \(y_2,y_3,y_4,y_5\).)
- A hypothetical sequence is \(3,4,3,4,11,12,11,12\). At origin 8, calculate the forecast from the all-history mean and from the latest-four mean. (Answer: all-history mean \(60/8=7.5\); latest-four mean \(46/4=11.5\).)
- A candidate compares an expanding-window procedure evaluated on targets \(y_{10}\) through \(y_{20}\) with a rolling-window procedure evaluated on \(y_{13}\) through \(y_{20}\). What is the main design issue, and how can the comparison be made more direct? (Answer: the evaluation targets differ, so the comparison is not on identical dates; evaluate both procedures on common target dates, such as \(y_{13}\) through \(y_{20}\), with the same horizons.)