Warning: package 'ggplot2' was built under R version 4.3.2
ARCH models
We start by introducing the first parameteric volatility model, the AutoRegressive Conditional Hetereskedasticity model (ARCH). This model was first introduce by Engle (1982). When writing this, his article has 32 369 citations on Google Scholar, and Robert Engle was awarded the Nobel Memorial Prize in Economic Sciences in 2003 with Clive Granger for “for methods of analyzing economic time series with time-varying volatility (ARCH)” (see nobelprize.org).
ARCH(1)
Let denote the time series of interest, the volatility and . Then an ARCH(1) model can be written as where is denotes the time index. As you can see, the conditional squared volatility depends on the previous squared observations. This means if we get a large return, either positive or negative, the conditional variance will be large in the next time step. With a high conditional variance the we would expect to see a large return, in either direction, also for the next time step, leading to a volatility cluster. With only one lagged variable in the model, this can “die out” quite quickly, but we will use this simple model to do some more detailed calculations before extending the model.
Moments and stationarity
Note that we assume here that has zero expectation, because We thus have that the variance of is
Let’s assume that is stationary, implying that . We then have that Since , we get that That is, if is stationary the (unconditional) variance is , requiring . This is in fact a necessary and sufficient condition for being stationary.
ARCH vs AR
There is a strong link between ARCH models for volatility an AR models for the level. In fact, we can write a ARCH(1) model as an AR(1) model. By adding and subtracting , we get It is easy to show that and under certain conditions () will be a white noise process. We can then write Thus, we have written the squared ARCH(1) as an AR(1) time series with intercept.
The is often referred to as the innovations of the ARCH process, similar to innovation residuals in the fable environment. We can write a ARCH(1) only in terms of the parameters and the infinite past innovations. If we continue this iteration backwards, we end up with This representation is actually the MA representation corresponding to the AR(1). One can take expectations on both sides of this equation and derive the formula for the variance of a stationary ARCH(1) process.
ARCH(r)
Similar to the relationship between an AR(1) and an AR(p), we can set up a ARCH(r). We use to denote the order of the ARCH model to distinguish it from the p and q of ARIMA, but in the literature it is quite common to use p to denote the order of an ARCH model.
An ARCH(r) model can be set up as where
Including more lags, will make the ARCH model’s volatility more persistent, because a large return will stay in the model for some time. We could do similar calculations as above to show that the expectation of is zero and if is stationary the variance is given by You can also find an AR(r) representation of using the same approach and assumptions as above.
Simulation
Let us simulate an ARCH(1) model by basic R code, assuming Gaussian innovations.
library(fpp3)
library(tidyverse)
# Setting seed for reproduciblity
set.seed(12345)
= 1000
nT = 1.4
omg = 0.95
a1 # Initiating y and sigma
<- sig <- rep(sqrt(omg/(1-a1)),
y
nT)# Simulation:
for(t in 2:nT){
<- sqrt(omg+a1*y[t-1]^2)
sig[t] <- sig[t]*rnorm(1)
y[t]
}# tsibble object:
<- tsibble(
arch t = 1:nT,
y = y,
sig = sig,
index = t
) # Plotting:
%>% pivot_longer(-t) %>%
arch mutate(name = factor(name, levels = c("y","sig"))) %>%
ggplot(aes(x=t,y=value)) +
geom_line()+
facet_wrap(~name, scales = "free_y", nrow=2,
strip.position = "left")+
theme(axis.title =element_blank())
In the top panel you see the time series (think of the Microsoft returns from the previous chapter). When is high, you see high variation in . When is high, it stays high for some time, leading to volatility clusters.
Let’s look at the autocorrelation of the simulated time series and its squared values. We also do a qq-plot and a distribution plot.
%>% ACF(y) %>% autoplot() + labs(y = "ACF of y")
arch %>% ACF(y^2) %>% autoplot() + labs(y = "ACF of squared y")
arch %>% ggplot(aes(sample = y)) + geom_qq() +geom_qq_line()
arch %>% ggplot(aes(x = y)) + stat_density(fill = "blue", alpha = .2) arch
The patterns are very similar to the pattern we saw for Microsoft returns - as is the main goal of these models!
References
- Engle, R. F. (1982). Autoregressive conditional heteroscedasticity with estimates of the variance of United Kingdom inflation. Econometrica: Journal of the econometric society, 987-1007.