Set 6 Volatility Models
6.1 ARCH(1)
So far, we have focused our attention on models for stationary time series data. In these models, the conditional mean changes over time while the conditional variance stays constant. For example, for the AR(1) model,
\[\begin{align} E[x_t | x_{t-1}] &= \phi_1 x_{t-1} \\ Var[x_t | x_{t-1}] &= \sigma^2_w. \end{align}\]
What if the conditional variance also changes over time? That is a good case to use an ARCH model. In an ARCH model, used often in financial applications, our response variable is typically the return at time \(t\):
\[\begin{align} r_t = \frac{x_t - x_{t-1}}{x_{t-1}} \end{align}\]
Or, alternatively, the response may be \(r_t = \nabla log(x_t)\). the ARCH(1) model is:
\[\begin{align} r_t &= \sigma_t w_t \\ \sigma^2_t &= \omega + \alpha_1 r_{t-1}^2, \end{align}\]
where \(w_t \sim N(0,1)\).
6.1.1 Statistical Properties
We can show that the ARCH(1) model has the following properties:
\[\begin{align} E(r_t) &= 0 \\ Var(r_t | r_{t-1}) &= \omega + \alpha_1 r_{t-1}^2. \end{align}\]
So, \(r_{t}|r_{t-1} \sim N(0,\omega + \alpha_1 r_{t-1}^2)\). The conditional variance changes depending on the prior period return. This captures the characteristic that big return (loss) days tend to be followed by bit return (loss) days.
Furthermore, we can subtract the second equation from the square of the first to obtain,
\[\begin{align} r_t^2 &= \omega + \alpha_1 r_{t-1}^2 + v_t. \\ \end{align}\]
In this equation, \(v_t = \sigma_t^2 (w_t^2-1)\). Since \(w_t^2\) is the square of a N(0,1) random variable \(w_t^2-1\) is a shifted (mean 0) \(\chi^2_1\) random variable.
What model does this look like?
Using this model for \(r_t^2\), we can explore the unconditional variance of \(r_t\) since \(Var(r_t)= E(r_t^2) = \omega/(1-\alpha_1)\). And, furthermore, \(E(r_t r_{t-h}) = 0\) for all \(h>1\).
What model does \(r_t\) follow then?
6.2 GARCH(1,1)
An important extension of ARCH is the generalized ARCH (GARCH). The GARCH(1,1) can be written:
\[\begin{align} r_t &= \sigma_t w_t \\ \sigma^2_t &= \omega + \alpha_1 r_{t-1}^2 + \beta_1 \sigma^2_{t-1}, \end{align}\]
\(\alpha_1\) is the ARCH effect. This parameter represents the short-term reaction of volatility to new shocks. The other parameter, \(\beta_1\), captures the persistence of volatility. When this parameter is close to 1, volatility is more persistent.
In this case, the squared returns follows a non-Gaussian ARMA(1,1) model:
\[\begin{align} r_t^2 &= \omega + (\alpha_1+\beta_1)r_{t-1}^2 + v_t - \beta_1 v_{t-1} \\ \end{align}\]
6.3 fGarch::garchFit
# bitcoin data
btc = read.csv("https://tinyurl.com/3epw5n4z") %>%
mutate(timestamp = ymd(timestamp))
y = diff(log(btc$btc))
# ARCH(1)
m1 = fGarch::garchFit(data = y, formula = ~ garch(1,0)) # 4076
summary(m1)
predict(m1, n.ahead = 10, plot = T)
# Garch(1,1)
m2 = fGarch::garchFit(data = y, formula = ~ garch(1,1)) # 4076
summary(m2)
predict(m2, n.ahead = 10, plot = T)
# ARMA(0,1) + Garch(1,1)
m3 = fGarch::garchFit(data = y, formula = ~ arma(0,1) + garch(1,1)) # 4217
summary(m3)
predict(m3, n.ahead = 10, plot = T, crit.val = 1)
plot(m3, which = 5 )
6.4 Lab 5
Fit the ARCH(1), GARCH(1,1), and GARCH(1,1) + ARMA(0,1) to the log of the difference of the historical bitcoin data. Report the log likelihood for each model.
Plot the standardized residuals for each model (3 plots). Which one looks the best?
Generate predictions for each model for the next 14 days (2/5 - 2/18) and compare with the actual data:
recent = read.csv("https://raw.githubusercontent.com/dbreynol/admn510_data/refs/heads/main/btc_recent.csv")
For each of the 3 models, report the:
- mean squared prediction error (point estimate versus actual BTC price)
- Proportion of confidence intervals that contain the true BTC price using a critical value of 1.