Skip to main content

Note 18: GARCH(p,q) Modeling, Persistence & Volatility Forecasting

Module 4: Volatility Modeling

Learning Objectives

After completing this note, you will be able to:

  • Explain how Bollerslev’s \(\text{GARCH}(p, q)\) achieves parsimony over high-order \(\text{ARCH}(q)\) models.
  • Derive the unconditional variance, volatility persistence \(\alpha_1 + \beta_1\), shock half-life, and multi-step variance forecast mean-reversion formula for \(\text{GARCH}(1, 1)\).
  • Estimate joint \(\text{ARMA}(p, q)\text{-GARCH}(1, 1)\) models directly on returns in rugarch without double-filtering mean dynamics.
  • Diagnose standardized residuals \(\hat{z}_t = \hat{\varepsilon}_t / \hat{\sigma}_t\) for both mean and variance adequacy and plot multi-step annualized volatility forecasts.

1. From High-Order ARCH to Parsimonious GARCH(p, q)

As seen in Note 17, tracking volatility shocks that persist for weeks requires a large lag order \(q\) in \(\text{ARCH}(q)\), estimating many noisy parameters under non-negativity constraints. Just as \(\text{ARMA}(1, 1)\) represents an infinite \(\text{MA}(\infty)\) parsimoniously, Tim Bollerslev’s Generalized ARCH model, \(\text{GARCH}(p, q)\), adds lagged conditional variances to the variance equation:

\[ \sigma_t^2 = \omega + \sum_{i=1}^{q} \alpha_i \varepsilon_{t-i}^2 + \sum_{j=1}^{p} \beta_j \sigma_{t-j}^2. \]

In applied finance, the workhorse specification is \(\text{GARCH}(1, 1)\):

\[ \sigma_t^2 = \omega + \alpha_1 \varepsilon_{t-1}^2 + \beta_1 \sigma_{t-1}^2, \]

where \(\omega > 0\), \(\alpha_1 \ge 0\), \(\beta_1 \ge 0\), and weak stationarity requires \(\alpha_1 + \beta_1 < 1\). Repeatedly substituting \(\sigma_{t-1}^2\) reveals that \(\text{GARCH}(1, 1)\) is equivalent to an \(\text{ARCH}(\infty)\) model with geometrically decaying weights \(\alpha_1 \beta_1^{k-1}\) using only three variance parameters: \(\alpha_1\) governs the immediate reaction to new shocks, while \(\beta_1\) governs volatility memory.

Unconditional Variance, Persistence, Half-Life, and Multi-Step Forecasts

To derive the unconditional variance \(\sigma^2 = \mathbb{E}[\sigma_t^2]\), apply the law of iterated expectations to \(\varepsilon_{t-1} = \sigma_{t-1} z_{t-1}\) (where \(z_{t-1}\) is independent of \(\mathcal{F}_{t-2}\) with \(\mathbb{E}[z_{t-1}^2] = 1\)):

\[ \mathbb{E}[\varepsilon_{t-1}^2] = \mathbb{E}\!\left[\mathbb{E}[\sigma_{t-1}^2 z_{t-1}^2 \mid \mathcal{F}_{t-2}]\right] = \mathbb{E}\!\left[\sigma_{t-1}^2 \cdot 1\right] = \mathbb{E}[\sigma_{t-1}^2] = \sigma^2. \]

Taking expectations of both sides of \(\sigma_t^2 = \omega + \alpha_1 \varepsilon_{t-1}^2 + \beta_1 \sigma_{t-1}^2\) then yields \(\sigma^2 = \omega + (\alpha_1 + \beta_1)\sigma^2\), so

\[ \sigma^2 = \frac{\omega}{1 - \alpha_1 - \beta_1}. \]

The sum \(\psi = \alpha_1 + \beta_1 \in [0, 1)\) is the volatility persistence. Writing \(\sigma_t^2 - \sigma^2 = \alpha_1(\varepsilon_{t-1}^2 - \sigma_{t-1}^2) + (\alpha_1 + \beta_1)(\sigma_{t-1}^2 - \sigma^2)\) and iterating conditional expectations forward \(h\) steps gives the exact multi-step variance forecast:

\[ \mathbb{E}_t[\sigma_{t+h}^2] = \sigma^2 + (\alpha_1 + \beta_1)^{h-1}\left(\sigma_{t+1}^2 - \sigma^2\right), \qquad h \ge 1. \]

Because \(0 \le \alpha_1 + \beta_1 < 1\), multi-step volatility forecasts revert monotonically toward the long-run unconditional variance \(\sigma^2\). The shock half-life (the number of periods required for a volatility spike above \(\sigma^2\) to decay by half) solves \((\alpha_1 + \beta_1)^{h_{1/2}} = 0.5\):

\[ h_{1/2} = \frac{\ln(0.5)}{\ln(\alpha_1 + \beta_1)}. \]

2. Joint ARMA-GARCH Estimation on Alphabet Returns

Always estimate the conditional mean and conditional variance jointly by maximum likelihood directly on the return series \(r_t\). Never fit an ARIMA model first, extract its residuals, and then fit an ARMA(1,1)-GARCH(1,1) on those already-filtered residuals (double-fitting the mean equation biases standard errors and creates redundant ARMA roots).

We fit a joint \(\text{AR}(1)\text{-sGARCH}(1, 1)\) model to Alphabet’s percentage log returns from data/google.csv.

goog <- readr::read_csv("data/google.csv", show_col_types = FALSE) |>
  arrange(Date) |>
  mutate(ret = 100 * log(Close / lag(Close))) |>
  filter(!is.na(ret)) |>
  mutate(day = row_number())

spec_g11 <- ugarchspec(
  variance.model = list(model = "sGARCH", garchOrder = c(1, 1)),
  mean.model     = list(armaOrder = c(1, 0), include.mean = TRUE)
)

fit_g11 <- ugarchfit(spec_g11, data = goog$ret)

as_tibble(fit_g11@fit$matcoef, rownames = "term") |>
  rename_with(trimws) |>
  fmt_tbl(digits = 4, caption = "Joint AR(1)-sGARCH(1,1) parameter estimates for Alphabet daily percentage returns.")
Joint AR(1)-sGARCH(1,1) parameter estimates for Alphabet daily percentage returns.
term Estimate Std. Error t value Pr(>|t|)
mu 0.1113 0.0478 2.330 0.0198
ar1 -0.0489 0.0311 -1.575 0.1154
omega 0.2229 0.0867 2.571 0.0101
alpha1 0.0722 0.0201 3.599 0.0003
beta1 0.8699 0.0391 22.248 0.0000

From the estimated variance parameters (\(\hat{\omega} = 0.2229\), \(\hat{\alpha}_1 = 0.0722\), \(\hat{\beta}_1 = 0.8699\)), we compute persistence, shock half-life, and both daily and annualized unconditional volatility (using \(\sqrt{252}\) trading days per year):

cf <- coef(fit_g11)
pers <- unname(cf["alpha1"] + cf["beta1"])
hl <- log(0.5) / log(pers)
uncond_sd_daily <- sqrt(unname(cf["omega"]) / (1 - pers))

tibble(
  Persistence = pers,
  Half_Life_Days = hl,
  Uncond_Daily_SD_Pct = uncond_sd_daily,
  Uncond_Annual_Vol_Pct = uncond_sd_daily * sqrt(252)
) |>
  fmt_tbl(digits = 3, caption = "Volatility persistence, half-life, and unconditional volatility for Alphabet.")
Volatility persistence, half-life, and unconditional volatility for Alphabet.
Persistence Half_Life_Days Uncond_Daily_SD_Pct Uncond_Annual_Vol_Pct
0.942 11.63 1.962 31.15

The persistence \(\hat{\alpha}_1 + \hat{\beta}_1 = 0.942\) implies a shock half-life of 11.6 trading days (just over two trading weeks) and a long-run annualized volatility of 31.2%. Notice also that sGARCH(1,1) achieves a better AIC (4.118) than \(\text{ARCH}(5)\) (4.124) while using fewer variance parameters.

3. Validating Standardized Residuals

If the joint mean-variance model is well specified, the standardized residuals \(\hat{z}_t = \hat{\varepsilon}_t / \hat{\sigma}_t\) should resemble i.i.d. draws from the assumed innovation distribution:

  • No remaining serial correlation in \(\hat{z}_t\) (adequate conditional mean).
  • No remaining serial correlation in \(\hat{z}_t^2\) (adequate conditional variance; ARCH effects removed).
  • Quantiles matching the assumed distribution (here, Gaussian) in a QQ-plot.
z_hat <- as.numeric(residuals(fit_g11, standardize = TRUE))

tibble(
  Diagnostic = c("Ljung-Box on z_t (lag 12, dof = 1)", "Ljung-Box on z_t^2 (lag 12)"),
  Statistic = c(
    unname(Box.test(z_hat, lag = 12, type = "Ljung-Box", fitdf = 1)$statistic),
    unname(Box.test(z_hat^2, lag = 12, type = "Ljung-Box")$statistic)
  ),
  p_value = c(
    Box.test(z_hat, lag = 12, type = "Ljung-Box", fitdf = 1)$p.value,
    Box.test(z_hat^2, lag = 12, type = "Ljung-Box")$p.value
  )
) |>
  fmt_tbl(digits = 4, caption = "Standardized residual checks for AR(1)-sGARCH(1,1) on Alphabet.")
Standardized residual checks for AR(1)-sGARCH(1,1) on Alphabet.
Diagnostic Statistic p_value
Ljung-Box on z_t (lag 12, dof = 1) 15.189 0.1740
Ljung-Box on z_t^2 (lag 12) 4.297 0.9775

Both Ljung-Box tests pass cleanly (\(p = 0.174\) on \(\hat{z}_t\) and \(p = 0.977\) on \(\hat{z}_t^2\)), confirming that both linear mean dynamics and volatility clustering have been captured. Now we inspect the ACF of \(\hat{z}_t\), ACF of \(\hat{z}_t^2\), and a normal QQ-plot in ggplot2.

z_ts <- tibble(day = seq_along(z_hat), z = z_hat, z2 = z_hat^2) |>
  as_tsibble(index = day)

p1 <- z_ts |> ACF(z, lag_max = 20) |> autoplot() +
  labs(title = TeX(r"(ACF of $z_t$)", bold = TRUE), x = "Lag", y = "ACF")
p2 <- z_ts |> ACF(z2, lag_max = 20) |> autoplot() +
  labs(title = TeX(r"(ACF of $z_t^2$)", bold = TRUE), x = "Lag", y = "ACF")
p3 <- ggplot(tibble(z = z_hat), aes(sample = z)) +
  stat_qq(color = ts_pal["navy"], alpha = 0.55, size = 1.3) +
  stat_qq_line(color = ts_pal["crimson"], linewidth = 0.8) +
  labs(title = TeX(r"(Normal QQ-Plot of $z_t$)", bold = TRUE),
       x = "Theoretical Normal", y = TeX(r"(Sample $z_t$)"))

(p1 | p2 | p3) +
  plot_layout(guides = "collect") +
  plot_annotation(
    title = "AR(1)-sGARCH(1,1) Standardized Residual Diagnostics (GOOG)",
    subtitle = TeX(r"(White-noise ACFs for $z_t$ and $z_t^2$; heavy tails in the Gaussian QQ-plot)"),
    theme = theme_ts()
  ) &
  theme(legend.position = "bottom")
Figure 1: Diagnostics of AR(1)-sGARCH(1,1) standardized residuals: clean ACFs for z_t and z_t^2, alongside heavy-tailed departures in the Gaussian QQ-plot.

Look at the right panel of Figure 1: while \(\text{GARCH}(1, 1)\) eliminates volatility clustering completely, the extreme tails of \(\hat{z}_t\) still bend away from the Gaussian reference line, motivating Student-\(t\) innovations in Note 19.

4. Multi-Step Volatility Forecasting and Mean Reversion

Using ugarchforecast(), we forecast daily conditional volatility 20 trading days ahead and annualize by \(\sqrt{252}\). Because Alphabet ended December 2023 in a relatively calm regime (\(\hat{\sigma}_{T+1} \approx 1.57\%\) daily, or 25.0% annualized), the forecast path climbs smoothly back toward the unconditional annualized volatility (31.2%).

fc_g11 <- ugarchforecast(fit_g11, n.ahead = 20)

fc_vol <- tibble(
  horizon = 1:20,
  ann_vol = as.numeric(sigma(fc_g11)) * sqrt(252)
)

ggplot(fc_vol, aes(horizon, ann_vol)) +
  geom_line(color = ts_pal["navy"], linewidth = 1) +
  geom_point(color = ts_pal["teal"], size = 2) +
  geom_hline(yintercept = uncond_sd_daily * sqrt(252), linetype = "dashed", color = ts_pal["crimson"]) +
  annotate("text", x = 19.8, y = uncond_sd_daily * sqrt(252) + 0.35, hjust = 1,
           label = "Unconditional volatility", color = ts_pal["crimson"], size = 3.3, fontface = "bold") +
  expand_limits(y = uncond_sd_daily * sqrt(252) + 0.8) +
  labs(
    title = "Alphabet (GOOG): 20-Day Annualized Volatility Forecast",
    subtitle = "Calm end-of-sample volatility reverts smoothly toward long-run equilibrium",
    x = TeX(r"(Forecast horizon $h$ (trading days))"),
    y = TeX(r"(Annualized Volatility $\hat{\sigma}_t$ (%))")
  )
Figure 2: 20-day ahead annualized volatility forecast for Alphabet from AR(1)-sGARCH(1,1), illustrating monotonic mean reversion toward the long-run unconditional volatility.

Practice Exercises

Exercise 1. Fit both a constant-mean sGARCH(1, 1) (armaOrder = c(0, 0)) and a joint AR(1)-sGARCH(1, 1) (armaOrder = c(1, 0)) to 100 * as.numeric(astsa::nyse). Compute volatility persistence and half-life for the joint model, and compare the Ljung-Box tests on \(\hat{z}_t\) and \(\hat{z}_t^2\) (lag 12) across both models.

Solution
nyse <- 100 * as.numeric(astsa::nyse)

sp0 <- ugarchspec(
  variance.model = list(model = "sGARCH", garchOrder = c(1, 1)),
  mean.model     = list(armaOrder = c(0, 0), include.mean = TRUE)
)
sp1 <- ugarchspec(
  variance.model = list(model = "sGARCH", garchOrder = c(1, 1)),
  mean.model     = list(armaOrder = c(1, 0), include.mean = TRUE)
)

f0 <- ugarchfit(sp0, data = nyse)
f1 <- ugarchfit(sp1, data = nyse)

z0 <- as.numeric(residuals(f0, standardize = TRUE))
z1 <- as.numeric(residuals(f1, standardize = TRUE))
p1 <- unname(coef(f1)["alpha1"] + coef(f1)["beta1"])

tibble(
  Model = c("ARMA(0,0)-sGARCH(1,1)", "AR(1)-sGARCH(1,1)"),
  Persistence = c(unname(coef(f0)["alpha1"] + coef(f0)["beta1"]), p1),
  Half_Life = c(log(0.5) / log(unname(coef(f0)["alpha1"] + coef(f0)["beta1"])), log(0.5) / log(p1)),
  LB_z_p = c(Box.test(z0, lag = 12, type = "Ljung-Box")$p.value,
             Box.test(z1, lag = 12, type = "Ljung-Box", fitdf = 1)$p.value),
  LB_z2_p = c(Box.test(z0^2, lag = 12, type = "Ljung-Box")$p.value,
              Box.test(z1^2, lag = 12, type = "Ljung-Box")$p.value)
) |>
  fmt_tbl(digits = 4)
Model Persistence Half_Life LB_z_p LB_z2_p
ARMA(0,0)-sGARCH(1,1) 0.9201 8.319 0.0025 0.9841
AR(1)-sGARCH(1,1) 0.9229 8.644 0.9545 0.9851

With armaOrder = c(0, 0), squared standardized residuals pass (LB_z2_p = 0.984) but raw standardized residuals fail (LB_z_p = 0.0025), signaling unmodeled short-run return autocorrelation. Estimating AR(1)-sGARCH(1,1) jointly (\(\hat{\phi}_1 = 0.108\), persistence 0.923, half-life 8.65 trading days) clears both checks cleanly (LB_z_p = 0.955, LB_z2_p = 0.985).

Exercise 2. Why must standardized residuals \(\hat{z}_t = \hat{\varepsilon}_t / \hat{\sigma}_t\) pass Ljung-Box tests on both \(\hat{z}_t\) and \(\hat{z}_t^2\), and what goes wrong if you fit an ARMA(1,1)-GARCH(1,1) model to residuals already extracted from a prior ARIMA(1,0,1) fit?

Solution
  1. Both mean and variance checks are required: Passing only the \(\hat{z}_t^2\) check confirms that volatility clustering has been modeled, yet leaves open mean misspecification (as seen in Exercise 1 on nyse), which biases \(\hat{\varepsilon}_t = r_t - \hat{\mu}_t\) and corrupts volatility estimates. Conversely, passing only the \(\hat{z}_t\) check ignores remaining conditional heteroskedasticity.
  2. No double-filtering: Applying armaOrder = c(1, 1) to pre-extracted ARIMA residuals fits a second ARMA filter to an already-whitened series, introducing redundant canceling AR/MA parameters, inconsistent two-stage standard errors, and degraded out-of-sample forecasts. Always specify the full armaOrder and garchOrder jointly on the returns.

Key Takeaways

  • \(\text{GARCH}(1, 1)\) captures persistent, geometrically decaying volatility memory with just three variance parameters (\(\omega > 0\), \(\alpha_1 \ge 0\), \(\beta_1 \ge 0\), \(\alpha_1 + \beta_1 < 1\)).
  • Because \(\mathbb{E}[\varepsilon_{t-1}^2] = \mathbb{E}[\sigma_{t-1}^2]\), the unconditional variance is \(\sigma^2 = \omega / (1 - \alpha_1 - \beta_1)\) and multi-step variance forecasts revert geometrically at rate \((\alpha_1 + \beta_1)^{h-1}\) with half-life \(\ln(0.5)/\ln(\alpha_1 + \beta_1)\).
  • Always estimate ARMA-GARCH jointly directly on returns rather than fitting ARMA-GARCH to pre-extracted ARIMA residuals.
  • Validate standardized residuals \(\hat{z}_t = \hat{\varepsilon}_t / \hat{\sigma}_t\) with Ljung-Box tests on both \(\hat{z}_t\) and \(\hat{z}_t^2\), plus a QQ-plot to inspect tail adequacy.
Back to top