ARCH / GARCH — Volatility models
ARCH/GARCH model time-varying conditional variance — the volatility clustering phenomenon (periods of high volatility follow high volatility) that is pervasive in financial series (stock returns, exchange rates). Instead of assuming constant error variance, they let variance depend on the past.
When to use
Use when a series (usually returns) exhibits volatility clustering and you want to model/forecast risk (volatility). Often combined: mean by ARIMA + variance by GARCH.
Model specification
GARCH(1,1) for the conditional variance :
- (ARCH): reaction to the latest shock; (GARCH): persistence of volatility.
- ARCH(q) is the case . Stationarity condition: .
Running in EcoLab
- Modeling module → Univariate time series family → ARCH/GARCH.
- Choose the series (returns); declare the order and the mean equation (e.g. ARMA).
- Run; view the estimated + volatility forecast; export the replication code.
Replication code
- Stata
- R
- Python
* --- GARCH(1,1) ---
* Estimate GARCH(1,1) for return series
arch ret, arch(1) garch(1)
* Conditional variance
predict sigma2, variance
* Plot conditional volatility
tsline sigma2, title("Conditional Variance - GARCH(1,1)")
# --- GARCH(1,1) ---
library(rugarch)
# Specify GARCH(1,1) with constant mean
spec <- ugarchspec(
variance.model = list(model = "sGARCH", garchOrder = c(1, 1)),
mean.model = list(armaOrder = c(0, 0), include.mean = TRUE),
distribution.model = "std" # Student-t innovations
)
# Fit
fit <- ugarchfit(spec = spec, data = ret)
show(fit)
# Conditional volatility plot
plot(sigma(fit), type = "l", main = "Conditional Volatility")
from arch import arch_model
import matplotlib.pyplot as plt
# Estimate GARCH(1,1)
model = arch_model(ret, vol='Garch', p=1, q=1, dist='t')
result = model.fit(disp='off')
print(result.summary())
# Plot conditional volatility
fig, ax = plt.subplots()
ax.plot(result.conditional_volatility)
ax.set_title('Conditional Volatility — GARCH(1,1)')
plt.show()
Limitations
- Standard GARCH is symmetric (good/bad news have equal effect) ⇒ use EGARCH for the leverage effect.
- Sensitive to the error distribution (normal vs Student-t).