Statistical / ML for QuantsTime SeriesARIMAGARCHVolatility Forecasting

Time Series for Quants: ARIMA and GARCH

Module 2 of 422 min readLevel: Medium

Setup

Why Time Series Models Matter in Quant Finance

Time series methods appear in two distinct roles on a quant desk:

  1. Return prediction: Can past prices or returns predict future ones? ARIMA provides a rigorous framework for modelling serial dependence in levels and returns — and usually confirms that equity daily returns have almost none.
  2. Volatility forecasting: Volatility is serially correlated even when returns are not. GARCH models capture volatility clustering — the empirical observation that large moves tend to cluster in time — and are essential for option pricing under stochastic vol, VaR estimation, and risk-adjusted sizing.

Conventions throughout. All rates of return are continuously compounded: rt=ln(Pt/Pt1)r_t = \ln(P_t / P_{t-1}). Volatility σt\sigma_t is annualised unless stated otherwise. Daily returns assumed to have 252 trading days per year. All series assumed to be observed at equally spaced intervals.


Theory

1. Stationarity

A time series (rt)tZ(r_t)_{t \in \mathbb{Z}} is weakly stationary (covariance stationary) if:

  1. E[rt]=μ<\mathbb{E}[r_t] = \mu < \infty for all tt,
  2. Var(rt)=σ2<\text{Var}(r_t) = \sigma^2 < \infty for all tt,
  3. Cov(rt,rtk)=γ(k)\text{Cov}(r_t, r_{t-k}) = \gamma(k) depends only on lag kk, not on tt.

Why it matters. Statistical inference on time series requires stationarity: parameter estimates have no asymptotic meaning for non-stationary series. Log-prices lnPt\ln P_t are typically non-stationary (unit root); log-returns rt=ΔlnPtr_t = \Delta \ln P_t are typically stationary.

Unit root test. The Augmented Dickey-Fuller (ADF) test tests H0H_0: unit root present (non-stationary) against HAH_A: stationary. Reject H0H_0 at the 5% level if the ADF test statistic is below the critical value (approximately 2.86-2.86 for no constant, 3.43-3.43 for constant and trend).

2. ARMA Models

AR(pp) — Autoregressive. The series depends linearly on its own past pp values:

rt=c+ϕ1rt1++ϕprtp+εt,εtiid(0,σ2).r_t = c + \phi_1 r_{t-1} + \cdots + \phi_p r_{t-p} + \varepsilon_t, \qquad \varepsilon_t \overset{\text{iid}}{\sim} (0, \sigma^2).

Using the lag operator LL (Lkrt=rtkL^k r_t = r_{t-k}), write as Φ(L)rt=c+εt\Phi(L) r_t = c + \varepsilon_t where Φ(z)=1ϕ1zϕpzp\Phi(z) = 1 - \phi_1 z - \cdots - \phi_p z^p. The process is stationary iff all roots of Φ(z)=0\Phi(z) = 0 lie outside the unit circle.

MA(qq) — Moving Average. The series is a linear combination of current and past shocks:

rt=μ+εt+θ1εt1++θqεtq=μ+Θ(L)εt.r_t = \mu + \varepsilon_t + \theta_1 \varepsilon_{t-1} + \cdots + \theta_q \varepsilon_{t-q} = \mu + \Theta(L)\varepsilon_t.

An MA(qq) process is always stationary. It is invertible (representable as an infinite AR) iff all roots of Θ(z)=0\Theta(z) = 0 lie outside the unit circle.

ARMA(p,qp, q): Φ(L)rt=c+Θ(L)εt.\Phi(L) r_t = c + \Theta(L) \varepsilon_t.

ARIMA(p,d,qp, d, q): Apply differencing dd times before fitting ARMA(p,qp, q). For d=1d=1: model applies to Δrt=rtrt1\Delta r_t = r_t - r_{t-1}. For daily equity returns, d=0d=0 is appropriate (returns are already stationary). For log-prices, d=1d=1 produces returns.

Model selection. Use information criteria:

  • AIC: 2(θ^)+2k-2\ell(\hat{\theta}) + 2k, where \ell is log-likelihood and kk is number of parameters.
  • BIC: 2(θ^)+klnT-2\ell(\hat{\theta}) + k\ln T.

BIC penalises complexity more heavily and is preferred when the true model is parsimonious. Inspect ACF (autocorrelation function) and PACF (partial ACF) to guide pp and qq choices.

3. GARCH: Generalised ARCH

Motivation. Equity returns rtr_t are approximately serially uncorrelated (ACF of rtr_t near zero), but rt2r_t^2 has significant positive autocorrelation at many lags. This is volatility clustering — Mandelbrot (1963) observed that "large changes tend to be followed by large changes, of either sign." ARCH/GARCH models this explicitly.

GARCH(p,qp, q) — Bollerslev (1986). Decompose the return as:

rt=μ+εt,εt=σtzt,ztiid(0,1),r_t = \mu + \varepsilon_t, \qquad \varepsilon_t = \sigma_t z_t, \qquad z_t \overset{\text{iid}}{\sim} (0,1),

where the conditional variance σt2\sigma_t^2 follows:

σt2=ω+i=1qαiεti2+j=1pβjσtj2.\sigma_t^2 = \omega + \sum_{i=1}^q \alpha_i \varepsilon_{t-i}^2 + \sum_{j=1}^p \beta_j \sigma_{t-j}^2.

Parameters and constraints.

  • ω>0\omega > 0, αi0\alpha_i \geq 0, βj0\beta_j \geq 0 — ensures σt2>0\sigma_t^2 > 0 a.s.
  • Stationarity: i=1qαi+j=1pβj<1\sum_{i=1}^q \alpha_i + \sum_{j=1}^p \beta_j < 1 ensures the variance process is covariance stationary.
  • Unconditional variance: E[σt2]=σˉ2=ω/(1αiβj)\mathbb{E}[\sigma_t^2] = \bar{\sigma}^2 = \omega / (1 - \sum \alpha_i - \sum \beta_j), which exists only when the stationarity condition holds.

GARCH(1,1) is the workhorse: σt2=ω+αεt12+βσt12.\sigma_t^2 = \omega + \alpha \varepsilon_{t-1}^2 + \beta \sigma_{t-1}^2.

Typical estimated values for daily equity returns: α0.08\alpha \approx 0.08, β0.90\beta \approx 0.90, giving α+β0.98\alpha + \beta \approx 0.98 — high persistence. The half-life of a variance shock is ln(0.5)/ln(α+β)34\ln(0.5) / \ln(\alpha + \beta) \approx 34 days for these parameters.

Volatility mean-reversion. Write σt2=σˉ2+(α+β)(σt12σˉ2)+α(εt12σt12)\sigma_t^2 = \bar{\sigma}^2 + (\alpha + \beta)(\sigma_{t-1}^2 - \bar{\sigma}^2) + \alpha(\varepsilon_{t-1}^2 - \sigma_{t-1}^2). The term (α+β)h(\alpha + \beta)^h governs mean-reversion speed; for α+β<1\alpha + \beta < 1 it decays geometrically.

Maximum likelihood estimation. Assume ztN(0,1)z_t \sim \mathcal{N}(0,1). The log-likelihood is:

(θ)=12t=1T[ln(2π)+lnσt2+εt2σt2].\ell(\theta) = -\frac{1}{2}\sum_{t=1}^T \left[\ln(2\pi) + \ln \sigma_t^2 + \frac{\varepsilon_t^2}{\sigma_t^2}\right].

The full lesson requires Premium

The complete derivation, the C++ / Python implementation, the validation tables, the quiz, and the interview-angle notes are part of Premium. Start a Premium plan to unlock every module in this track.