Applying QLIKE to Forecasts of Log Realized Volatility
Summary
The document explains how to evaluate a volatility model that forecasts log realized volatility using QLIKE. The loss requires a positive variance forecast and a realized variance observation on the variance scale; a forecast of log variance cannot be inserted directly. The forecast must first be transformed back to levels, while the observed realized variance remains in levels.
The discussion also highlights a back-transformation issue: exponentiating a forecast of conditional mean log variance generally does not produce the conditional mean variance. Under a conditional lognormal assumption, adding half the forecast log variance’s conditional variance before exponentiating yields the conditional mean; other settings may call for a smearing or bias adjustment. These are guidance and modeling caveats rather than results from a reported empirical comparison. The document does not specify how to estimate the adjustment when the log forecast errors do not follow the stated assumption.
Key ideas
- QLIKE compares a positive variance forecast with realized variance, so both inputs must be on the variance scale.
- A forecast of log realized variance must be transformed back before QLIKE is calculated.
- Exponentiating the conditional mean of log variance generally does not recover the conditional mean variance.
- A conditional lognormal assumption implies a variance correction when back-transforming to estimate mean variance.
- Other forecast error distributions may require a different bias adjustment.
Tags
Full text
# QLIKE loss function to evaluate forecasting model of log(realized volatility)
# QLIKE loss function to evaluate forecasting model of log(realized volatility)
I use QLIKE as loss function to evaluate the forecasting performance of a RV realized volatility model.
QLIKE = log $h$ + $\frac{\hat{\sigma}^2}{h}$
where $h$ is volatility forecast and $\hat{\sigma}^2$ is the ex post value of volatility (realized volatility computed with intraday returns).
If I proxy volatility with log(RV), what are $h$ and $\hat{\sigma}^2$ in the QLIKE? The forecast and ex post value of log(RV) or the forecast and ex post value of RV? If I keep the logs, $h$ is sometimes negative and I have the problem of a log of a negative quantity. I'm not sure if I should come back to RV with exponential of the forecast of log(RV) or I should, for instance, replace log(RV) with log(1+RV).
## Answer by Summer_More_More_Tea (score 0)
https://quant.stackexchange.com/a/80151
You should recover the forecast to the variance level and apply the qlike loss.
## Answer by carry_and_pray (score 0)
https://quant.stackexchange.com/a/85610
In QLIKE, $h$ and $\hat{\sigma}_t^2$ should be on the variance/realized-variance scale and not on the log-scale.
The standard QLIKE loss is, $$ L_t^\text{QLIKE} (h_t, \hat{\sigma}_t^2) = \frac{\hat{\sigma}_t^2}{h_t} - \log \left( \frac{\hat{\sigma}_t^2}{h_t} \right) - 1, $$ which is equivalent up to an additive term that does not affect forecast ranking to, $$ L_t^\text{QLIKE} (h_t, \hat{\sigma_t}^2) = \log h_t + \frac{\hat{\sigma}_t^2}{h_t}. $$
Patton shows that QLIKE is the loss that depends only on the standardized forecast error $\hat{\sigma}_t^2 / h_t$ and Liu-Patton-Sheppard use it exactly with $\hat{\sigma}_t^2$ as quadratic variation or a proxy for it, and $h_t$ as the volatility forecast.
So if your model is for $y_t = \log(RV_t)$ then the output of the model is a forecast of $\log(RV_t)$, say $\hat{y}_t$. That is not what goes into QLIKE directly. Instead, QLIKE needs a positive forecast of $RV_t$ so you must back transform via $h_t = \exp(\hat{y}_t)$. In particular, you should not plug $\hat{y}_t$ itself into QLIKE because QLIKE needs $h_t > 0$ and log forecasts can be negative even when the underlying variance forecast is perfectly sensible.
There is one subtlety, that is, if $\hat{y}_t$ is a forecast of the conditional mean of log variance i.e., $\hat{y}_t \approx \mathbb{E}[ \log RV_t \mid \mathcal{F}_{t - 1} ]$ then $\exp(\hat{y}_t)$ is generally not the conditional mean of $RV_t$ because of Jensen's inequality. It is closer to a conditional median unless you make further assumptions.
If you want a forecast of the conditional mean $RV_t$ and you assume that $\log RV_t \mid \mathcal{F}_{t - 1} \sim N(m_t, s_t^2)$ then the appropriate back-transform is $h_t = \exp \left( m_t + \frac{1}{2} s_t^2 \right)$.
More generally, some bias correction or smearing adjustment is needed whenever you forecast logs but evaluate in levels (correction about back-transformation and not about QLIKE itself).Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.