Preserved original teaching and transfer history, integrated with complete current on-site preparation. Independent human review/testing remain pending.
A forecast is a dated information claim
A forecast record needs more than a predicted value and an eventual outcome. Record the issue time, target period, horizon, information cutoff, method version and available predictor values. Without these, an analyst can accidentally compare a genuine advance forecast with a model that used data released after the decision. A month labeled March might refer to activity during March, publication in April or a corrected value available in June. Those distinctions determine whether a predictor could have been used at the forecast origin.
In rolling-origin evaluation, each origin uses only the prefix of observations available at that point, then predicts a later target. Advance the origin and repeat. If a model chooses transformations or tuning parameters, those choices must also use information available inside the training history. Applying a transformation selected from the entire series before splitting the data can leak later information even when the final fitted coefficients use only a prefix. A benchmark must receive the same admissible information set as the candidate.
This chapter uses a deterministic eight-period fixture so every one-step forecast is hand-checkable. It compares the last observed value with an expanding historical mean. The aim is to expose cutoff errors and model-selection consequences, not to prescribe either method universally. A short series cannot demonstrate dependable long-run superiority. In an operational setting, keep a final untouched evaluation period or conduct prospective monitoring after selection. Repeatedly choosing a new winner on the same small test set eventually uses that test set as training evidence.
Compute every origin before averaging the errors
The observed sequence is 100, 110, 120, 130, 140, 150, 160 and 170. Start with the first four periods as training. The targets are periods 5 through 8. The last-value method forecasts 130, 140, 150 and 160. Its actual-minus-forecast errors are 10, 10, 10 and 10, so MAE is 10 and RMSE is 10. Its bias under this sign convention is +10: it consistently underforecasts in this fixture.
The expanding-mean forecasts are 115, 120, 125 and 130. These use four, five, six and seven earlier observations respectively. Their errors are 25, 30, 35 and 40. MAE is 32.5; squared errors sum to 4350 and mean squared error is 1087.5, giving RMSE approximately 32.9773. Do not accidentally include the target in its own historical mean. The downloadable Python script asserts the entire forecast vectors, not merely the rounded average. That makes an off-by-one training cutoff visible even if two summary statistics happen to look similar.
The result supports a narrow comparison: last-value forecasts beat the expanding mean on these four one-step targets under both losses. It does not show that the last-value method captures the trend or that it is optimal. A simple drift extrapolation would predict this deliberately linear sequence exactly from an appropriate history, but its zero error here would reflect the construction of the fixture, not universal forecasting ability. The teaching point is that a valid comparison needs a clear benchmark and the full dated ledger. Report the example’s artificial regularity rather than implying that real business data will behave this cleanly.
A changed regime and an asymmetric decision can reverse the recommendation
Now keep the first four observations, but replace the later outcomes with 90, 90, 90 and 90. These are a separate changed-record scenario, not a correction silently substituted into the first evaluation. The last-value method predicts 130, 90, 90 and 90; its errors are -40, 0, 0 and 0, giving MAE 10 and RMSE 20. The expanding means are 115, 110, approximately 106.6667 and approximately 104.2857. Their absolute errors are 25, 20, approximately 16.6667 and approximately 14.2857, giving MAE approximately 18.9881. Their RMSE is approximately 19.4091. Last-value wins MAE, but expanding mean narrowly wins RMSE because that criterion penalizes the isolated large miss more heavily.
A business decision can impose different losses again. Suppose underforecasting costs 5 per unit and overforecasting costs 1. For a forecast f and actual y, use 5 times max(y-f,0) plus max(f-y,0), if those are the actual stipulated marginal costs. In the initial rising sequence, last-value costs 50 each period and expanding mean costs 125,150,175,200. In the changed low-demand sequence, all shown errors are overforecasts, so the mean losses equal the respective MAEs. Do not change the cost ratio after seeing which method it favors. Actual capacity, inventory expiry or service commitments may create nonlinear losses that this piecewise-linear example does not model.
Horizon matters too. If the operational decision commits two periods ahead, one-step errors do not directly validate it. Construct origins and targets at horizon two, and state whether the system reforecasts before the commitment becomes irreversible. A delayed input must be lagged according to its release time, not its convenient row label. A result that changes under a plausible corrected cutoff should lead to a revised recommendation, not selective reporting. Archive both ledgers, explain the defect and re-evaluate the candidate methods under the admissible information set.
Worked example
Use the eight-period rising sequence and four one-step origins. Compare last-value and expanding-mean forecasts, then repeat on [100,110,120,130,90,90,90,90].
Initial last-value errors are all 10, so MAE=RMSE=10. Initial expanding-mean errors are 25,30,35,40, so MAE=32.5 and RMSE=sqrt(1087.5)=32.9772648957. On the changed series last-value MAE=10 and RMSE=20. Expanding-mean MAE=18.9880952381 and RMSE is approximately 19.4091. Thus a single declared winner without naming the loss would conceal a reversal. The reproduction writes each origin’s training length, forecast, outcome and error, then independently checks both metric calculations.