GARCH versus machine learning, scored honestly
Forecast h-day realized volatility and test whether XGBoost beats a well-specified GARCH(1,1) or HAR-RV out of sample, scored with QLIKE and a Hansen-SPA snooping control. It does not.
00Overview
Volatility is the one thing in finance that is genuinely predictable, which makes it the fair fight for machine learning against classical econometrics. This project forecasts h-day realized volatility with seven models and scores them with QLIKE under a leakage-free walk-forward, with a Hansen-SPA test to control for trying many models.
Out-of-sample QLIKE at h=1
01Method
- Seven models: GARCH(1,1), EGARCH, GJR-GARCH, HAR-RV, XGBoost, EWMA and a random walk.
- Anchored walk-forward; the scaler, GARCH parameters, HAR-RV OLS and XGBoost are all fit on the train slice only.
- Forward-only targets with an explicit gap, plus a purge and embargo sized to the horizon h.
- QLIKE loss, Diebold-Mariano pairwise tests, and Hansen-SPA for snooping control.
02The honest test
At every horizon a classical model wins or ties: HAR-RV takes h=1 and h=22, EGARCH takes h=5. XGBoost is never more than marginal, and Hansen-SPA does not crown ML a significant winner (p = 0.503 at h=1). This reproduces Hansen and Lunde (2005): GARCH(1,1) is hard to beat.