1

How do GARCH and GJR-GARCH models (as implemented in rugarch or in EViews) calculate the in-sample MSE if they use the time series of daily returns as the input and don't use a time series of daily variances: How do these models compute the realized volatility every day? Or are they using another measure of the actual volatility on day t that is then compared to the output of the model on day t?

BillB
  • 89
  • 6
  • 1
    Could you give more details on how the in-sample MSE is defined? MSE of what? – Richard Hardy May 16 '20 at 10:00
  • @RichardHardy Thank you for considering this question, Richard. When I use EViews to fit a GJR-GARCH model, the output has the values for the "standard error of regression" and "sum of squared residuals", both of which could be converted to MSE. So it is MSE describing the fit of the GARCH model in-sample. – BillB May 16 '20 at 21:09

1 Answers1

1

Recall that a GARCH(1,1) model is a model of the conditional distribution of $x_t$. The model contains equations specifying the conditional mean, conditional variance by conditional standardized distribution:

\begin{aligned} x_t &= \mu_t+\varepsilon_t, \\ \varepsilon_t &= \sigma_t z_t, \\ \sigma^2_t &= \omega + \alpha \varepsilon^2_{t-1} + \beta\sigma^2_{t-1}, \\ z_t &\sim D(0,1), \end{aligned}

where $\mu_t$ is the conditional mean of $x_t$ (e.g. a constant or some autoregressive and/or moving-average terms) and $D$ is some distribution with mean $0$ and variance $1$. This can be extended to GARCH(p,q) or GJR-GARCH(p,q) without changing the essence of the argument that follows.

So $x_t$ is the original time series, $\hat x_t$ are fitted values of $x_t$ and (if I understand your question correctly) $\text{MSE}=\frac{1}{n}\sum_{t=1}^n (x_t-\hat x_t)$ (or maybe $\text{MSE}=\frac{1}{n-p}\sum_{t=1}^n (x_t-\hat x_t)$ where $p$ is the number of parameters in the model). $\hat x_t$ are obtained from the fitted model, so calculating the $\text{MSE}$ is not a problem.

As you can see, there is no realized variance anywhere, while daily conditional variances are part of the model and their fitted values can be obtained if needed. Does this exposition help answer your question?

Richard Hardy
  • 54,375
  • 10
  • 95
  • 219
  • This helps a lot. In my application, I would like to use an evolutionary computation technique to forecast volatility of returns. I found a paper that uses a different technique to forecast volatility of returns. In that paper, the authors use GARCH(1,1) model as their benchmark. They compare MSE corresponding to GARCH to MSE corresponding to the novel technique. I thought I could fit a GARCH model using EViews and then use the reported MSE values as my benchmark. – BillB May 18 '20 at 08:51
  • It looks like I ought to use the GARCH expression for variance with the parameter values estimated in EViews to generate daily forecast of volatility and find the sum of squared distances between volatility forecasts and realized volatility. This will allow me to have the MSE value to use as my benchmark. Does the setup above sound reasonable to you? – BillB May 18 '20 at 08:59
  • {In my comment above, I plan to use the 5-minute return data to compute the daily realized volatility} I would like to model Mu_t in your answer above as a constant. Would it be ok to set Mu_t equal to the average return value computed using the in-sample data (but not the data that I will be trying to forecast)? Thank you for your kind help, Richard! – BillB May 18 '20 at 09:04
  • 1
    @BillB, how good an approximation $\mu_t=\mu$ is depends on your data, but for asset returns I would expect that to be reasonable. Regarding comparing the quality of variance forecasts, this can be a little tricky. See Patton ["Evaluating Volatility and Correlation Forecasts"](https://link.springer.com/chapter/10.1007/978-3-540-71297-8_36) (2009) and the literature that followed that as well as Laurent ["Volatility forecasts evaluation and comparison"](https://onlinelibrary.wiley.com/doi/abs/10.1002/wics.190) (2012). Also mind the fact that realized volat. is an imperfect measure of variance. – Richard Hardy May 18 '20 at 10:05
  • 1
    @BillB, Elliott & Timmermann ["Economic Forecasting"](https://press.princeton.edu/books/hardcover/9780691140131/economic-forecasting) (2016) is a very nice textbook that likely includes some relevant points, too, perhaps even a summary of what you find in the papers I have cited above. – Richard Hardy May 18 '20 at 10:08
  • Thank you, Richard! Now it is a little more clear what I have to learn before I can proceed. – BillB May 19 '20 at 08:26
  • Just to double check, to compute epsilon in your specification above, if we assume that Mu_t = Mu = constant, epsilon_t-1 = (return on day t-1) minus M, right? – BillB May 19 '20 at 08:27
  • 1
    @BillB, if $\mu_t=\mu$, then $\varepsilon_{t-1} = x_{t-1}-\mu$ where $x_{t-1}$ is return on day $t-1$. – Richard Hardy May 19 '20 at 09:50
  • Regarding your comment above, would you know the following: when EViews estimates GARCH, how many observations is the software using to compute mu? Is it basing it on the entire sample, or on a rolling window, and if it's the latter, do we know how large is the window? If you are not sure of the answer, do any keywords come to mind that I could attempt to use to answer this question? Thank you, Richard! – BillB May 21 '20 at 08:25
  • 1
    @BillB, I have never used EViews for GARCH, and it has been some 10 years since I used EViews for anything, so I really don't know. Is it not possible to look this up in an EViews manual or something like that? My guess would be that if you want to use a rolling window, you have to explicitly specify that (including the window size) or use a specific function. This should not be happening silently. – Richard Hardy May 21 '20 at 08:33
  • Thank you for your reply and for your kind help, Richard. It looks like this project will finally get me to switch to R to provide me with more control. – BillB May 22 '20 at 02:45
  • 1
    @BillB, the R package `rugarch` has a comprehensive suite of functions for GARCH models. Some other packages like `fGarch` or `garchx` are also available to choose from. The latter is the fastest and facilitates proper hypothesis testing (despite the appearance of the other package's capability of that) but has limited model selection and functionality otherwise. – Richard Hardy May 22 '20 at 05:55