Skip to content
LeetQuant
E10 Volatility Forecasting

E10 · Volatility Forecasting · Lesson 2 of 4

GARCH-Family Models

Asymmetric GARCH (GJR and EGARCH) and the leverage effect, news impact curves, the HAR model for realised volatility, maximum-likelihood estimation on simulated data with honest sampling error, and forecast term structures.

19 min

Objective

GARCH(1,1) treats a 3% fall and a 3% rally identically, and it only sees daily squared returns. Equity volatility responds more to falls, and with intraday data you can do better than squared returns. This lesson covers the two standard fixes: asymmetric GARCH (GJR and EGARCH) and the HAR regression on realised volatility. It assumes GARCH(1,1), its long-run variance and its multi-step forecast from the Time Series module.

The leverage effect and the news impact curve

In equities, volatility rises more after negative returns than after positive ones of the same size. Two stories, not mutually exclusive:

  • Leverage: a falling share price raises the firm's debt-to-equity ratio, making equity riskier.
  • Volatility feedback: an increase in expected volatility raises required returns, which pushes prices down now. Here causality runs from volatility to returns.

The leverage story is too small quantitatively to explain the asymmetry in index data, and the effect is weak or reversed in FX and some commodities. Either way the empirical fact is what matters for forecasting. The news impact curve plots σt+12\sigma_{t+1}^2 against rtr_t holding σt2\sigma_t^2 fixed: a parabola for GARCH, a lopsided parabola for GJR, and an asymmetric exponential for EGARCH.

GJR-GARCH

Glosten, Jagannathan and Runkle add a term that switches on for negative returns:

σt+12=ω+(α+γ 1{rt<0}) rt2+β σt2.\sigma_{t+1}^2 = \omega + \big(\alpha + \gamma\,\mathbf 1\{r_t < 0\}\big)\,r_t^2 + \beta\,\sigma_t^2 .

With γ>0\gamma > 0, bad news has impact α+γ\alpha + \gamma and good news α\alpha. If the innovations are symmetric, E[1{rt<0} rt2]=12σt2\mathbb{E}\big[\mathbf 1\{r_t < 0\}\,r_t^2\big] = \tfrac12\sigma_t^2, so the persistence and long-run variance are

p=α+γ2+β,VL=ω1−p,p = \alpha + \tfrac{\gamma}{2} + \beta, \qquad V_L = \frac{\omega}{1 - p} ,

and the multi-step forecast has the same shape as GARCH(1,1): Et[σt+h2]=VL+ph−1(σt+12−VL)\mathbb{E}_t[\sigma_{t+h}^2] = V_L + p^{h-1}(\sigma_{t+1}^2 - V_L). A common mistake is to use α+γ+β\alpha + \gamma + \beta as the persistence, which can make a stationary model look explosive. Typical daily equity-index fits have α\alpha near zero, γ\gamma around 0.1–0.15 and β\beta around 0.9: almost all of the reaction to news comes from down days.

EGARCH

Nelson's EGARCH models the log variance, with standardised shocks zt=rt/σtz_t = r_t / \sigma_t:

ln⁡σt+12=ω+βln⁡σt2+α(∣zt∣−E∣zt∣)+γzt,\ln\sigma_{t+1}^2 = \omega + \beta\ln\sigma_t^2 + \alpha\big(|z_t| - \mathbb{E}|z_t|\big) + \gamma z_t ,

where E∣z∣=2/π≈0.798\mathbb{E}|z| = \sqrt{2/\pi} \approx 0.798 for normal shocks. Three differences from GJR:

  • No positivity constraints. The log is always defined, so the optimiser has no boundaries to hit.
  • Leverage is γ<0\gamma < 0. A negative zz changes log variance by α(∣z∣−E∣z∣)−γ∣z∣\alpha(|z| - \mathbb{E}|z|) - \gamma|z|, a positive one by α(∣z∣−E∣z∣)+γ∣z∣\alpha(|z| - \mathbb{E}|z|) + \gamma|z|.
  • Persistence is β\beta, acting on the log variance. Shocks enter through zz, not r2r^2, so a huge return moves variance by a multiplicative factor that grows like ec∣z∣e^{c|z|} rather than quadratically, which tends to be more robust to outliers.

The cost: multi-step forecasts of σ2\sigma^2 have no simple closed form, because E[eX]≠eEX\mathbb{E}[e^X] \ne e^{\mathbb{E}X}, so they are usually simulated.

Worked example

GJR news impact and term structure

A daily GJR-GARCH has ω=2×10−6\omega = 2 \times 10^{-6}, α=0.02\alpha = 0.02, γ=0.12\gamma = 0.12, β=0.90\beta = 0.90. Today's conditional variance is 1.5×10−41.5 \times 10^{-4}. Compute the persistence, long-run volatility and shock half-life. Then compare tomorrow's volatility after a −2%-2\% day and after a +2%+2\% day, and the annualised volatility the model implies for the next month (21 days) and year (252 days) in each case.

Show solution

Persistence and long run. p=0.02+0.06+0.90=0.98p = 0.02 + 0.06 + 0.90 = 0.98, so VL=2×10−6/0.02=10−4V_L = 2 \times 10^{-6}/0.02 = 10^{-4}: 1% daily, 15.9%15.9\% annualised. Half-life ln⁡0.5/ln⁡0.98≈34\ln 0.5 / \ln 0.98 \approx 34 days.

Tomorrow. After −2%-2\%: σ2=2×10−6+0.14×4×10−4+0.90×1.5×10−4=(0.2+5.6+13.5)×10−5=1.93×10−4\sigma^2 = 2 \times 10^{-6} + 0.14 \times 4 \times 10^{-4} + 0.90 \times 1.5 \times 10^{-4} = (0.2 + 5.6 + 13.5) \times 10^{-5} = 1.93 \times 10^{-4}, i.e. 1.39%1.39\%. After +2%+2\%: (0.2+0.8+13.5)×10−5=1.45×10−4(0.2 + 0.8 + 13.5) \times 10^{-5} = 1.45 \times 10^{-4}, i.e. 1.20%1.20\%. The same-sized rally actually lowers volatility slightly (today's was 1.22%1.22\%), because α\alpha is too small to offset the decay.

Horizon volatility. Total variance over hh days is hVL+1−ph1−p(σt+12−VL)hV_L + \frac{1 - p^h}{1 - p}(\sigma_{t+1}^2 - V_L); divide by hh, multiply by 252, take the root:

1 day21 days252 days
after −2%-2\%22.1%21.1%17.3%
after +2%+2\%19.1%18.6%16.6%

Both curves slope down toward 15.9%15.9\%, and the down-day curve sits about 2.5 vol points higher at one month. This is the GARCH analogue of the implied-volatility term structure steepening after a sell-off.

Estimation by maximum likelihood

Conditional on σ12\sigma_1^2, the Gaussian log-likelihood is

ℓ(θ)=−12∑t(ln⁡(2πσt2)+rt2σt2),\ell(\theta) = -\tfrac12 \sum_{t} \Big(\ln(2\pi\sigma_t^2) + \frac{r_t^2}{\sigma_t^2}\Big),

where σt2\sigma_t^2 is built recursively from the parameters. There is no closed form: you run the recursion inside a numerical optimiser. Practicalities that matter more than the optimiser:

  • Scale. Work in percent returns. In decimals ω\omega is around 10−610^{-6} and most optimisers handle it badly.
  • Constraints. Enforce ω>0\omega > 0, α,β≥0\alpha, \beta \ge 0, α+γ≥0\alpha + \gamma \ge 0 and p<1p < 1, or reparametrise (e.g. EGARCH needs none).
  • Initialisation. Starting σ12\sigma_1^2 at the sample variance is standard; its effect dies out at rate pp.
  • Quasi-MLE. The Gaussian likelihood gives consistent estimates even with fat-tailed shocks, but the standard errors must be the robust (sandwich) ones. A Student-t likelihood is more efficient if the tails really are t.
import numpy as np
from scipy.optimize import minimize

def gjr_var(r, omega, alpha, gamma, beta):
    s2 = np.empty(len(r))
    s2[0] = r.var()                          # a common initialisation
    for t in range(1, len(r)):
        a = alpha + gamma * (r[t - 1] < 0)
        s2[t] = omega + a * r[t - 1] ** 2 + beta * s2[t - 1]
    return s2

def neg_loglik(theta, r):
    omega, alpha, gamma, beta = theta
    if omega <= 0 or alpha < 0 or beta < 0 or alpha + gamma < 0 or alpha + gamma / 2 + beta >= 1:
        return 1e10                          # outside the allowed region
    s2 = gjr_var(r, *theta)
    return 0.5 * np.sum(np.log(2 * np.pi * s2) + r**2 / s2)

def simulate(theta, T, rng):
    omega, alpha, gamma, beta = theta
    r, s2 = np.empty(T), omega / (1 - alpha - gamma / 2 - beta)
    for t in range(T):
        r[t] = np.sqrt(s2) * rng.standard_normal()
        s2 = omega + (alpha + gamma * (r[t] < 0)) * r[t] ** 2 + beta * s2
    return r

true = (0.02, 0.02, 0.12, 0.90)              # returns in percent: omega = 2e-6 in decimals
r = simulate(true, 4000, np.random.default_rng(7))
fit = minimize(neg_loglik, x0=[0.05, 0.05, 0.05, 0.85], args=(r,), method="Nelder-Mead",
               options={"xatol": 1e-6, "fatol": 1e-6, "maxiter": 4000})
omega, alpha, gamma, beta = fit.x
p = alpha + gamma / 2 + beta
print("estimate (omega, alpha, gamma, beta):", np.round(fit.x, 3))
print(f"persistence {p:.3f}, long-run daily vol {np.sqrt(omega / (1 - p)):.2f}%")

Output:

estimate (omega, alpha, gamma, beta): [0.025 0.009 0.129 0.897]
persistence 0.971, long-run daily vol 0.93%

Sixteen years of daily data from the true model, and the estimates are close but not exact. Repeating the fit on 100 independent simulated samples gives the honest picture:

T=1,000T = 1{,}000 (4 years)T=4,000T = 4{,}000 (16 years)
sd of α^\hat\alpha (true 0.02)0.0150.009
sd of γ^\hat\gamma (true 0.12)0.0270.015
sd of p^\hat p (true 0.98)0.0110.005
90% range of long-run vol (true 1%)0.85%–1.29%0.91%–1.11%

With four years of data you cannot tell α=0.02\alpha = 0.02 from α=0\alpha = 0 or 0.050.05, and the long-run level, which drives every long-horizon forecast, is uncertain by roughly −15%-15\% to +30%+30\%. On real data, add model misspecification and structural breaks on top. The asymmetry γ\gamma is estimated more reliably than α\alpha, which is why it is rarely in doubt for equity indices.

HAR: forecasting realised volatility directly

Once you have daily realised variance RVt\text{RV}_t from intraday data, you can model it as an observed time series instead of a latent one. Its autocorrelations decay slowly, roughly hyperbolically (long memory), which a single AR(1) or GARCH(1,1) captures poorly. Corsi's heterogeneous autoregressive model regresses tomorrow's RV on averages over three horizons:

RVt+1=c+βd RVt+βw RVt(w)+βm RVt(m)+εt+1,\text{RV}_{t+1} = c + \beta_d\,\text{RV}_t + \beta_w\,\text{RV}^{(w)}_t + \beta_m\,\text{RV}^{(m)}_t + \varepsilon_{t+1},

where RVt(w)\text{RV}^{(w)}_t and RVt(m)\text{RV}^{(m)}_t are the means over the last 5 and 22 days. The story is traders with daily, weekly and monthly horizons; the mathematics is an AR(22) with step-shaped coefficients: the weight on lag 1 is βd+βw/5+βm/22\beta_d + \beta_w/5 + \beta_m/22, on lags 2–5 is βw/5+βm/22\beta_w/5 + \beta_m/22, and on lags 6–22 is βm/22\beta_m/22. Three parameters mimic long memory.

Why practitioners like it:

  • Estimated by OLS. No likelihood, no optimiser, no convergence problems. Use HAC standard errors, since the errors are heteroscedastic and, for multi-day targets, overlapping.
  • Multi-step forecasts come either by iterating the one-day model or, more robustly, by direct regression: regress the average RV over days t+1,…,t+ht+1, \dots, t+h on the same three regressors.
  • Variants. Fit in logs or square roots to tame the right skew of RV (then correct the bias when converting back); add a negative-return term (leverage HAR); split RV into continuous and jump parts (jumps are much less persistent).

Its long-run mean is c/(1−βd−βw−βm)c/(1 - \beta_d - \beta_w - \beta_m).

Worked example

a HAR forecast after a volatile day

A HAR fit on daily RV in percent squared gives c=0.10c = 0.10, βd=0.35\beta_d = 0.35, βw=0.35\beta_w = 0.35, βm=0.20\beta_m = 0.20. Yesterday's RV was 4.0, the 5-day average is 2.5 and the 22-day average is 1.5. Forecast tomorrow's RV and volatility. What is the long-run level, and what weight does the model put on yesterday's RV alone?

Show solution

Forecast. 0.10+0.35×4.0+0.35×2.5+0.20×1.5=0.10+1.40+0.875+0.30=2.6750.10 + 0.35 \times 4.0 + 0.35 \times 2.5 + 0.20 \times 1.5 = 0.10 + 1.40 + 0.875 + 0.30 = 2.675, so tomorrow's volatility is 2.675=1.64%\sqrt{2.675} = 1.64\% daily.

Long run. 0.10/(1−0.90)=1.00.10 / (1 - 0.90) = 1.0: 1% daily. The forecast sits between yesterday's 2% and the long-run 1%, and closer to the recent weekly level than either.

Weight on yesterday. Lag 1 enters through all three terms: 0.35+0.35/5+0.20/22=0.35+0.07+0.009=0.4290.35 + 0.35/5 + 0.20/22 = 0.35 + 0.07 + 0.009 = 0.429. Lags 2–5 get 0.0790.079 each and lags 6–22 get 0.0090.009 each. Compare EWMA with λ=0.94\lambda = 0.94, which puts 0.060.06 on yesterday and decays geometrically.

A minimal HAR fit on a simulated long-memory RV series (two AR(1) components in log variance, plus multiplicative measurement noise), trained on the first 2,000 days and tested on the rest:

import numpy as np

rng = np.random.default_rng(3)
T = 3000
# true log-variance: a slow and a fast AR(1) component (a cheap stand-in for long memory)
slow, fast = np.zeros(T), np.zeros(T)
for t in range(1, T):
    slow[t] = 0.995 * slow[t - 1] + 0.05 * rng.standard_normal()
    fast[t] = 0.80 * fast[t - 1] + 0.25 * rng.standard_normal()
true_var = np.exp(slow + fast)                       # daily variance in %^2, around 1
rv = true_var * np.exp(0.3 * rng.standard_normal(T) - 0.045)   # noisy but unbiased RV

def trailing_mean(x, k):                             # mean of x[t-k+1..t], aligned at t
    c = np.cumsum(np.insert(x, 0, 0.0))
    out = np.full(len(x), np.nan)
    out[k - 1:] = (c[k:] - c[:-k]) / k
    return out

d, w, m = rv, trailing_mean(rv, 5), trailing_mean(rv, 22)
X = np.column_stack([np.ones(T), d, w, m])[21:-1]    # regressors known at t
y = rv[22:]                                          # target: RV on day t+1
split = 2000
coef, *_ = np.linalg.lstsq(X[:split], y[:split], rcond=None)
pred = X[split:] @ coef
r2 = 1 - np.mean((y[split:] - pred) ** 2) / np.var(y[split:])
r2_naive = 1 - np.mean((y[split:] - X[split:, 1]) ** 2) / np.var(y[split:])
print("HAR coefficients (c, daily, weekly, monthly):", np.round(coef, 3))
print(f"out-of-sample R^2: HAR {r2:.3f}, yesterday's RV {r2_naive:.3f}")

Output:

HAR coefficients (c, daily, weekly, monthly): [0.202 0.415 0.305 0.15 ]
out-of-sample R^2: HAR 0.422, yesterday's RV 0.244

Note the alignment: the row for day tt uses RV up to and including tt and predicts t+1t+1. Shifting the target by one day the wrong way would be look-ahead, and it would show up as a suspiciously high R2R^2.

Knowledge check

A GJR-GARCH with symmetric innovations has α=0.03\alpha = 0.03, γ=0.10\gamma = 0.10, β=0.91\beta = 0.91. What is its persistence?

Knowledge check

In EGARCH, ln⁡σt+12=ω+βln⁡σt2+α(∣zt∣−E∣zt∣)+γzt\ln\sigma_{t+1}^2 = \omega + \beta\ln\sigma_t^2 + \alpha(|z_t| - \mathbb{E}|z_t|) + \gamma z_t, with α=0.15\alpha = 0.15 and γ=−0.08\gamma = -0.08. Holding everything else fixed, by roughly what factor does a zt=−2z_t = -2 shock raise next-day variance relative to a zt=+2z_t = +2 shock?

Knowledge check

Why is the HAR model typically estimated by OLS while GARCH needs maximum likelihood?

Saying it in an interview

Asked "how would you forecast volatility for a stock?", a strong answer is layered: "If I have intraday data, I would build 5-minute realised variance including the overnight return, and fit a HAR in logs, estimated by OLS and evaluated out of sample. Without it, a GJR-GARCH with t innovations, because equity volatility reacts more to falls. I would check that the fitted persistence is below one and stable across sub-periods, compare against EWMA and implied volatility as baselines, and score the forecasts with QLIKE against realised variance." That shows you know the models, their data requirements and how to validate them.

Key takeaways

  • GJR adds γr21{r<0}\gamma r^2\mathbf 1\{r<0\}; persistence is α+γ/2+β\alpha + \gamma/2 + \beta and forecasts keep the GARCH(1,1) shape. In equity indices γ\gamma dominates α\alpha.
  • EGARCH models log variance: no positivity constraints, leverage is γ<0\gamma < 0, persistence β\beta, multi-step forecasts by simulation.
  • HAR regresses RV on its daily, weekly and monthly averages: OLS, long-memory-like, hard to beat, and best fitted in logs or square roots.
  • MLE needs percent scaling, constraints and robust standard errors; even 16 years of data pins the long-run volatility only to about ±10%\pm 10\%.

Practice problems

Finished reading?

Answer the 3 knowledge checks to complete this lesson (0 done).