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 against holding 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:
With , bad news has impact and good news . If the innovations are symmetric, , so the persistence and long-run variance are
and the multi-step forecast has the same shape as GARCH(1,1): . A common mistake is to use as the persistence, which can make a stationary model look explosive. Typical daily equity-index fits have near zero, around 0.1–0.15 and 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 :
where 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 . A negative changes log variance by , a positive one by .
- Persistence is , acting on the log variance. Shocks enter through , not , so a huge return moves variance by a multiplicative factor that grows like rather than quadratically, which tends to be more robust to outliers.
The cost: multi-step forecasts of have no simple closed form, because , so they are usually simulated.
Worked example
GJR news impact and term structure
A daily GJR-GARCH has , , , . Today's conditional variance is . Compute the persistence, long-run volatility and shock half-life. Then compare tomorrow's volatility after a day and after a day, and the annualised volatility the model implies for the next month (21 days) and year (252 days) in each case.
Show solutionHide solution
Persistence and long run. , so : 1% daily, annualised. Half-life days.
Tomorrow. After : , i.e. . After : , i.e. . The same-sized rally actually lowers volatility slightly (today's was ), because is too small to offset the decay.
Horizon volatility. Total variance over days is ; divide by , multiply by 252, take the root:
| 1 day | 21 days | 252 days | |
|---|---|---|---|
| after | 22.1% | 21.1% | 17.3% |
| after | 19.1% | 18.6% | 16.6% |
Both curves slope down toward , 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 , the Gaussian log-likelihood is
where 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 is around and most optimisers handle it badly.
- Constraints. Enforce , , and , or reparametrise (e.g. EGARCH needs none).
- Initialisation. Starting at the sample variance is standard; its effect dies out at rate .
- 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:
| (4 years) | (16 years) | |
|---|---|---|
| sd of (true 0.02) | 0.015 | 0.009 |
| sd of (true 0.12) | 0.027 | 0.015 |
| sd of (true 0.98) | 0.011 | 0.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 from or , and the long-run level, which drives every long-horizon forecast, is uncertain by roughly to . On real data, add model misspecification and structural breaks on top. The asymmetry is estimated more reliably than , which is why it is rarely in doubt for equity indices.
HAR: forecasting realised volatility directly
Once you have daily realised variance 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:
where and 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 , on lags 2–5 is , and on lags 6–22 is . 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 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 .
Worked example
a HAR forecast after a volatile day
A HAR fit on daily RV in percent squared gives , , , . 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 solutionHide solution
Forecast. , so tomorrow's volatility is daily.
Long run. : 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: . Lags 2–5 get each and lags 6–22 get each. Compare EWMA with , which puts 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 uses RV up to and including and predicts . Shifting the target by one day the wrong way would be look-ahead, and it would show up as a suspiciously high .
Knowledge check
A GJR-GARCH with symmetric innovations has , , . What is its persistence?
Knowledge check
In EGARCH, , with and . Holding everything else fixed, by roughly what factor does a shock raise next-day variance relative to a 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 ; persistence is and forecasts keep the GARCH(1,1) shape. In equity indices dominates .
- EGARCH models log variance: no positivity constraints, leverage is , persistence , 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 .
Practice problems
Finished reading?
Answer the 3 knowledge checks to complete this lesson (0 done).