Objective
Comparing return forecasts is easy because the target is observed. Volatility forecasts are compared against a proxy for a quantity that is never observed, and the proxy is noisy: has a 141% relative error, 5-minute RV perhaps 15–30%. This lesson answers three questions: which loss function still ranks forecasts correctly when the target is noisy, how to test whether a forecast is unbiased, and how to tell whether one forecast is genuinely better than another.
Notation: is the true conditional variance, a forecast made at , and a proxy with (conditionally unbiased), such as or RV.
Loss functions robust to a noisy proxy
With the true every sensible loss ranks forecasts the same way in the limit. With a proxy, Patton (2011) showed that the ranking is preserved only for a specific family of losses. The two members everyone uses are
The test of robustness is simple: for a fixed true , which forecast minimises the expected loss when the proxy is noisy? Any conditionally unbiased proxy gives:
- MSE on variance: is minimised at . Robust.
- QLIKE: has derivative at . Robust.
Now the popular ones that are not robust, with proxy and :
| Loss | Minimising forecast | Bias |
|---|---|---|
| MSE on volatility, | ||
| MAE on variance, | median of | |
| MSE on log variance, |
(Using , the median of of , and .) Each of these rewards a forecast that is systematically too low, and the less precise the proxy, the bigger the reward. With RV the biases shrink but do not vanish.
MSE versus QLIKE. Both are valid; they weight errors differently. MSE depends on the absolute error, so a handful of high-volatility days dominate it, and its estimates are noisy. QLIKE depends only on the ratio , so every day counts equally, and it penalises under-prediction more than over-prediction, which matches the cost structure of risk management. QLIKE's tests usually have more power. Report both.
Worked example
QLIKE's asymmetry
The true variance is and the proxy is unbiased. Compare the expected excess loss (over the perfect forecast) of forecasting and , under QLIKE and under MSE on variance.
Show solutionHide solution
QLIKE. . Subtract the value at ; writing , the excess loss is , independent of the level and of the proxy's noise.
- : .
- : .
Forecasting half the variance costs about 60% more than forecasting double. For risk use, under-predicting volatility is the expensive error, and QLIKE agrees.
MSE on variance. The excess is : for and for . MSE punishes over-prediction four times harder here, and the loss scales with , so the same proportional error on a high-volatility day counts many times more.
Mincer–Zarnowitz regressions
A forecast is conditionally unbiased if . Test it by regressing the proxy on the forecast:
a joint Wald test with HAC standard errors (the errors are heteroscedastic, and serially correlated if horizons overlap). Because the proxy is on the left-hand side, its noise only inflates the residual variance; it does not bias or . Noise in the forecast would bias toward zero, but the forecast is what it is.
Do not read the as a quality score. Even the true variance has a low against . With exactly,
for normal shocks. If has mean 1 and standard deviation 0.5, and . A perfect forecast "explains" 9% of the variation in squared returns. With 5-minute RV as the proxy (relative noise variance ), the same perfect forecast reaches . The claim "volatility forecasts are useless, is only 5%" is a statement about the proxy.
Variants: regress in logs (more robust to outliers, but not a test of unbiasedness for the level) or add a competing forecast as a second regressor (encompassing): if the competitor's coefficient is significant, your forecast is missing information it contains.
Diebold–Mariano tests
To compare forecasts A and B, form the loss differential and test :
where is a Newey–West estimate of the long-run variance of . Points to know:
- The loss must be robust (MSE or QLIKE). Otherwise DM can significantly prefer the wrong forecast.
- Serial correlation. Loss differentials of volatility forecasts are autocorrelated (volatility clusters), and -step forecasts with overlapping horizons have MA() errors by construction. Use at least Newey–West lags.
- Nested models. Comparing a model with a restricted version of itself (HAR against AR(1) in RV, GJR against GARCH) makes the DM statistic non-normal under the null. Use the Clark–West adjustment, or the Giacomini–White framework, which tests forecasting methods (including the estimation window) rather than population models.
- Many models. Testing ten models against a benchmark and reporting the best is data snooping; use a model confidence set or a reality-check style test.
Worked example
is the improvement significant?
Over days, the QLIKE loss differential (benchmark minus new model) has mean , standard deviation and first-order autocorrelation , with negligible higher-order autocorrelation. Compute the DM statistic with one Newey–West lag, and without any HAC correction.
Show solutionHide solution
With one lag, the Bartlett weight is , so .
Not significant at 5% ( two-sided, one-sided). Without the correction, : still not significant, but closer, and with more autocorrelation the naive statistic can cross the line when the correct one does not. A full Newey–West weight on (a longer lag window) would give and .
Everything at once, in simulation
Simulate a GARCH(1,1) in percent returns, then score three forecasts against the noisy proxy : the true conditional variance, an EWMA, and a forecast deliberately shrunk to times the truth (close to the MSE-on-volatility optimum ).
import numpy as np
rng = np.random.default_rng(11)
T, omega, alpha, beta = 5000, 0.02, 0.08, 0.90 # returns in %, long-run variance 1
h, r = np.empty(T), np.empty(T)
h[0] = 1.0
for t in range(T):
r[t] = np.sqrt(h[t]) * rng.standard_normal()
if t + 1 < T:
h[t + 1] = omega + alpha * r[t] ** 2 + beta * h[t]
ewma = np.empty(T); ewma[0] = 1.0
for t in range(1, T):
ewma[t] = 0.94 * ewma[t - 1] + 0.06 * r[t - 1] ** 2
proxy = r**2 # noisy, unbiased proxy for h
losses = {
"MSE on variance": lambda f: (proxy - f) ** 2,
"QLIKE": lambda f: proxy / f - np.log(proxy / f) - 1,
"MSE on vol": lambda f: (np.sqrt(proxy) - np.sqrt(f)) ** 2,
}
forecasts = {"true h": h, "EWMA": ewma, "0.64 x true h": 0.64 * h}
print(f"{'':16s}" + "".join(f"{k:>15s}" for k in forecasts))
for name, L in losses.items():
print(f"{name:16s}" + "".join(f"{L(f).mean():15.4f}" for f in forecasts.values()))
def dm_stat(d, lags):
"""Diebold-Mariano t-stat with a Newey-West (Bartlett) long-run variance."""
u = d - d.mean()
lrv = u @ u / len(u)
for k in range(1, lags + 1):
lrv += 2 * (1 - k / (lags + 1)) * (u[k:] @ u[:-k]) / len(u)
return d.mean() / np.sqrt(lrv / len(d))
d = losses["QLIKE"](ewma) - losses["QLIKE"](h) # positive: EWMA is worse
print(f"DM (EWMA vs true h, QLIKE): {dm_stat(d, 5):.2f}")
for name in ["true h", "EWMA"]: # Mincer-Zarnowitz: r^2 on forecast
X = np.column_stack([np.ones(T), forecasts[name]])
b, *_ = np.linalg.lstsq(X, proxy, rcond=None)
r2 = 1 - np.mean((proxy - X @ b) ** 2) / proxy.var()
print(f"MZ {name:7s} a = {b[0]:.3f}, b = {b[1]:.3f}, R^2 = {r2:.3f}")
Output:
true h EWMA 0.64 x true h
MSE on variance 2.4125 2.4359 2.5404
QLIKE 1.2799 1.2925 1.3955
MSE on vol 0.3940 0.3961 0.3514
DM (EWMA vs true h, QLIKE): 3.78
MZ true h a = 0.083, b = 0.902, R^2 = 0.087
MZ EWMA a = 0.199, b = 0.790, R^2 = 0.082
What it shows:
- MSE on volatility ranks the deliberately biased forecast first, ahead of the truth. The two robust losses rank the truth first.
- QLIKE separates the truth from EWMA decisively (DM 3.78). The same comparison under MSE on variance gives a DM of about 2.2 on this sample: same ranking, less power, because a few high-variance days dominate the squared errors.
- Mincer–Zarnowitz with the true variance gives and . The slope is within sampling error of 1 (other seeds give 0.90–1.05) and the is at its ceiling: low, and not a sign of a bad forecast. EWMA's lower slope and positive intercept are the signature of a forecast that does not mean-revert: when it is high it is too high, when low too low.
Common mistakes
- Scoring volatility instead of variance, or using MAE or log errors: these reward under-forecasting under a noisy proxy.
- Using the noisiest proxy available. With intraday data, use RV (including the overnight return, or matching the forecast's window), not ; the rankings are the same in expectation but the tests have far more power.
- Mismatched windows and units. A forecast of close-to-close variance scored against open-to-close RV looks biased low. Annualisation conventions (252 versus 365, trading versus calendar days) must match between forecast and proxy.
- Look-ahead. The forecast for day must use data up to ; a rolling RV that includes day , or parameters fitted on the full sample, leaks the target.
- Ignoring overlap. Monthly forecasts made daily give 21-day overlapping errors; naive standard errors are far too small.
- Reading the MZ as accuracy, or rejecting because of a few extreme days without robust standard errors.
- Testing nested models with plain DM, or picking the best of many models and testing it as if it had been chosen in advance.
- Evaluating only in calm periods. A model that under-reacts looks fine until the first crisis; check performance in high-volatility subsamples separately.
Knowledge check
You score volatility forecasts by the mean squared error between the forecast volatility and the absolute daily return. Which forecast minimises the expected loss, if returns are conditionally normal?
Knowledge check
A Mincer–Zarnowitz regression of daily squared returns on your variance forecast gives a = 0.01, b = 0.97 and R² = 0.07. What is the right conclusion?
Knowledge check
You compare 21-day variance forecasts made every day against realised variance over the following 21 days, using a Diebold–Mariano test. What must you do differently from a one-day-ahead comparison?
Key takeaways
- With a conditionally unbiased proxy, only some losses rank forecasts correctly: use MSE on variance and QLIKE; MSE on volatility, MAE and log losses reward forecasts that are too low.
- QLIKE depends on the ratio of proxy to forecast, penalises under-prediction more, and usually gives more powerful tests than MSE.
- Mincer–Zarnowitz tests ; its is capped by proxy noise (about 9% for a perfect forecast against in a typical case) and is not a quality score.
- Diebold–Mariano on loss differentials needs HAC errors (at least lags for overlapping horizons), robust losses, and different tools for nested models or many models.
Practice problems
Finished reading?
Answer the 3 knowledge checks to complete this lesson (0 done).