CONTENTS

Exercise: Numerical MLE for GARCH(1,1)

Problem

A GARCH(1,1) model has returns rtr_t with conditional variance σt2\sigma_t^2 satisfying:

rt=σtzt,ztiidN(0,1),σt2=ω+αrt12+βσt12.r_t = \sigma_t\cdot z_t, \quad z_t \overset{iid}{\sim} \mathcal{N}(0, 1), \quad \sigma_t^2 = \omega + \alpha r_{t-1}^2 + \beta\sigma_{t-1}^2.

Parameters: θ=(ω,α,β)\theta = (\omega, \alpha, \beta) with ω>0,α,β0,α+β<1\omega > 0, \alpha, \beta \ge 0, \alpha + \beta < 1 (stationarity).

  1. Write down the log-likelihood for TT observations: (ω,α,β)=12t=1T[log(2πσt2)+rt2/σt2],\ell(\omega, \alpha, \beta) = -\tfrac{1}{2}\sum_{t=1}^T \left[\log(2\pi\sigma_t^2) + r_t^2/\sigma_t^2\right], where σt2\sigma_t^2 is computed recursively from σ12=ω/(1αβ)\sigma_1^2 = \omega/(1 - \alpha - \beta) (unconditional variance) and the observed returns.

  2. Simulate T=2000T = 2000 daily returns from GARCH(1,1) with true parameters ω0=0.00001,α0=0.1,β0=0.85\omega_0 = 0.00001, \alpha_0 = 0.1, \beta_0 = 0.85. Report the unconditional volatility ω0/(1α0β0)\sqrt{\omega_0/(1 - \alpha_0 - \beta_0)}.

  3. Maximise \ell numerically (e.g. with scipy.optimize.minimize on -\ell). Compare θ^\hat\theta to the truth. (Use bounds: ω>0,α0,β0,α+β<0.9999\omega > 0, \alpha \ge 0, \beta \ge 0, \alpha + \beta < 0.9999.)
  4. Plot the estimated conditional volatility σ^t\hat\sigma_t against the true σt\sigma_t. Observe how GARCH tracks bursts of volatility clustering.

Hint

For the initial guess of (ω,α,β)(\omega, \alpha, \beta): start with (0.00001,0.1,0.8)(0.00001, 0.1, 0.8) or compute moment-matched starting values. Use L-BFGS-B with bounds, and pass options={'ftol': 1e-10} for tight convergence.
Jump to the solution when you're ready.