Get startedGet started for free

The GARCH equation for volatility prediction

1. GARCH models: The way forward

Rolling estimates of volatility are backward looking: they tell you what volatility has been in the past. Optimal investing requires to be forward looking. You can do that by using GARCH models to predict the volatility of the future return.

2. Inventors of GARCH models

These models were invented by Nobel prize winner Robert Engle and his student Tim Bollerslev. In the next slides you will learn the notation needed to understand a GARCH model.

3. Notation (i)

A GARCH analysis starts with a time series of returns. Each return is observed at a regular frequency, like daily or weekly.

4. Notation (ii)

Assume that at time t-1 you want to predict the next return Rt. For this, you use the information set consisting of all the past and current returns available at time t-1.

5. Notation (iii)

Based on the information set, you can compute the expected return. This is the mean prediction denoted by mu_t. The prediction is of course not perfect. There is a prediction error e_t equal to the difference between the actual return and the predicted return.

6. Notation (iv)

Based on the information at time t-1 you can also predict the variance. The predicted variance equals the expected squared deviation of the return from the mean. Its square root is the volatility.

7. From theory to practice: Models for the mean

To make those predictions in practice, you need an equation to replace the expectation in the formula. For the mean, you can take the rolling average of the past M returns, or use a time series model like ARMA.

8. From theory to practice: Models for the variance

For the variance, you can take the average of the M most recently observed squared prediction errors. Note that you then give the same weight to all M observations, irrespective of when they have been observed.

9. ARCH(p) model: Autoregressive Conditional Heteroscedasticity

Since the future variance is more affected by the more recent events than by the distant ones, you can achieve a higher forecasting accuracy by giving more weight to the most recent observations. This leads to the ARCH equation in which the predicted variance equals a constant omega plus a weighted sum of the p most recently observed squared prediction errors.

10. GARCH(1,1) model: Generalized ARCH

In practice, most researchers don't use ARCH. They use the GARCH(1,1) model. They set p equal to one and use also the previous variance prediction to obtain the next one. You can see that under the GARCH(1,1) model the predicted variance equals the parameter omega + the parameter alpha multiplying the previous squared prediction error plus the parameter beta multiplying the previous variance prediction.

11. Parameter restrictions

You further need two types of parameter restrictions. First, the omega, alpha and beta should be positive such that the GARCH variance is always positive. Second, the sum of alpha and beta has to be less than one such that, after a shock, the GARCH variance always returns to its long run value. The variance is then mean reverting with long run variance equal to the ratio between omega and 1-alpha-beta.

12. R implementation - Specify the inputs

To get some intuition, you see here a R script that computes the GARCH variances for the daily S&P 500 returns. The alpha parameter multiplying the squared error is set to 0-point-1. The beta parameter multiplying the previous variance prediction is set to 0-point-8. The value of omega is such that the long run variance equals the sample variance. The prediction errors e are defined as the returns minus their mean.

13. R implementation - compute predicted variances

Since the GARCH process is recursive you need a loop to compute the next variance based on the previous variance. The first variance is set to the sample variance. The next ones follow from the GARCH equation.

14. R implementation - Plot of GARCH volatilities

Note that the predicted volatility is defined as the square root of the GARCH variance. The script ends with comparing the predicted and unconditional volatility in a time series plot.

15. GARCH volatilities S&P 500

You can see that the volatility of the S&P 500 is mean reverting: periods of above average volatility are followed by periods of below average volatility.

16. Let's practice!

Please go ahead and program your first GARCH model in R.

Create Your Free Account

or

By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.