SPB Git

spb/wp29_uqo

Public

# F3-conf-04 — Multi-horizon forecasts of Canadian quarterly CPI inflation

# Question

Across 40 rolling quarterly origins, 2015-10-01 to 2025-07-01 (n_origins, first_origin, last_origin), does a time-series model forecast Canadian quarterly CPI inflation better than the seasonal-naive forecast at horizons 1, 2 and 4? The inflation measure is 400·Δln of the quarterly-average CPI, not seasonally adjusted. At h = 4, is the mean squared-error loss differential different from zero once we allow for serial correlation from overlapping forecasts?

# Data and exclusions

  • data/cpi_quarterly.csv: 127 rows (n_input_rows). The SHA-256 matches the README. data/cpi_monthly.csv: 381 rows, read only for provenance. Recomputing the quarterly averages from the monthly file reproduces cpi_avg to within 3.3e-7 (see out/state/data_audit.md).
  • Exclusions (out/exclusions.csv): 1995Q1 is dropped because its inflation value is undefined, so 127 rows become 126 usable quarters. There were no gaps, duplicates or other missing values. Extreme quarters (2008Q4, 2020Q2, 2022Q2) are real data and are kept (data_issues).
  • The files run to 2026Q3, past the last origin. Each forecast uses only quarters dated ≤ its origin. Later quarters serve only as realised targets; the last target is 2026-07-01.

# Method

  • Baseline (snaive): the forecast for quarter t+h is the inflation value of quarter t+h−4.
  • Model (model_name = sar_aic): see model_description. At each origin, an OLS regression of inflation on a constant, three quarter dummies and p own lags. The lag order p ∈ {0,…,4} is chosen by AIC on a common sample, using only data up to the origin. The data window expands from 1995Q2. Forecasts for h = 2 and 4 are produced by iterating the fitted equation. AIC chose p = 2 for the first 25 origins and p = 1 for the last 15 (chosen_p_by_origin). The final estimation sample has 121 observations (n_analysed). No randomness is involved (random_seed = null).
  • Evaluation: RMSE and MAE of errors (actual − forecast) over the 40 origins.
  • h = 4 test: d_t = e²_snaive − e²_model, averaged over the 40 origins. The long-run variance uses a rectangular (uniform) kernel with truncation lag h−1 = 3 (hac_kernel_h4, hac_lags_h4), as in Diebold–Mariano (1995). I fixed this choice before seeing the results and planned to fall back to Bartlett if the variance estimate was not positive; no fallback was needed. The p-value is two-sided against N(0,1).

# Results

h RMSE snaive RMSE model MAE snaive MAE model 1 − RMSE ratio
1 2.849 (rmse_snaive_h1) 2.193 (rmse_model_h1) 2.137 (mae_snaive_h1) 1.519 (mae_model_h1) 0.230 (rel_improvement_rmse_h1)
2 2.847 (rmse_snaive_h2) 2.463 (rmse_model_h2) 2.126 (mae_snaive_h2) 1.553 (mae_model_h2) 0.135 (rel_improvement_rmse_h2)
4 2.882 (rmse_snaive_h4) 2.343 (rmse_model_h4) 2.181 (mae_snaive_h4) 1.597 (mae_model_h4) 0.187 (rel_improvement_rmse_h4)

All values are in percentage points of annualised inflation. In this sample the model has lower RMSE and MAE than seasonal-naive at every horizon. At h = 4 the mean loss differential is 2.818 squared pp (loss_diff_mean_h4), with a HAC SE of 1.698 (loss_diff_se_h4). That gives a DM statistic of 1.66 (dm_stat_h4) and a two-sided p-value of 0.097 (dm_pvalue_h4). The h = 4 improvement is therefore not statistically distinguishable from zero at the 5% level; it is significant only at the 10% level.

# Uncertainty

  • Sensitivity of the h = 4 test (sensitivity_h4): Bartlett L=3 gives p = 0.18; Bartlett L=4 gives p = 0.13; Bartlett L=6 gives p = 0.04. The Harvey–Leybourne–Newbold small-sample correction (rectangular L=3, compared with t(39)) gives p = 0.14. The loss differential has negative sample autocorrelation at lags 3–4 (−0.29, −0.41; out/state/checks.md), so the SE depends on the kernel and lag. Only one specification (Bartlett L=6, not pre-specified) falls below 5%. Overall, the evidence that the model beats seasonal-naive at h = 4 is weak.
  • A few periods dominate d_t. Origins in 2019–2022 (COVID and the 2022 inflation surge) contribute large positive and negative amounts (by origin year: 2020 +40.7, 2021 −45.7, 2022 +66.7). Excluding origins in 2021–2022 leaves the mean almost unchanged (2.87). These numbers come from the diagnostics in checks.md, not from results.json.
  • No formal tests were run at h = 1 or h = 2. The RMSE gains at those horizons are point estimates only.

# Limitations and open issues

  • Errors are measured on the current data vintage. The results make no claim about real-time performance.
  • With 40 overlapping forecasts the DM test is a rough approximation, and its outcome depends on the HAC choices (see Uncertainty).
  • Only one model specification was tried, so there is no data-snooping across models. The model class itself (seasonal-dummy AR) was chosen by me and was not tuned on the evaluation period.
  • The task is complete (feasibility = "complete").
Files · 452964ee0fbbaa40fbbed2c87a54ca798ffd6a85
Menu

Theme