Lesson 40

ARCH and GARCH Models

Big question

How can returns be difficult to predict while their volatility remains persistent and forecastable?

Lesson progress

Complete checkpoints as you learn

0% complete0 checkpoint streak
Progress tracking available after sign-in. Sign in to save your work.
Big question
Concept
Activity
Quiz

Learning objectives

  • Explain conditional variance and volatility clustering.
  • Test for ARCH effects.
  • Estimate ARCH and GARCH models.
  • Diagnose standardized residuals and forecast volatility.
  • Prerequisites: Chapters 18 and 19.
  • Key terms: conditional variance, ARCH, GARCH, persistence, standardized residual, volatility forecast.

Simple explanation

Volatility is not directly observed. In ARCH-type models it is the conditional standard deviation of a return innovation given past information. Large shocks tend to cluster because yesterday’s squared innovation helps predict today’s variance. Returns can be nearly uncorrelated while squared returns have substantial autocorrelation. This nonlinear dependence is one of the central facts of financial time series (Engle 1982; Bollerslev 1986).

Key terms

conditional variance and volatility clustering
A core idea in Chapter 40 that students apply carefully in economic analysis.
Test for ARCH effects
A core idea in Chapter 40 that students apply carefully in economic analysis.
Estimate ARCH and GARCH models
A core idea in Chapter 40 that students apply carefully in economic analysis.
Diagnose standardized residuals and forecast volatility
A core idea in Chapter 40 that students apply carefully in economic analysis.
Prerequisites: Chapters 18 and 19
A core idea in Chapter 40 that students apply carefully in economic analysis.
Key terms: conditional variance, ARCH, GARCH, persistence, standardized residual, volatility forecast
A core idea in Chapter 40 that students apply carefully in economic analysis.

Analytical workflow

Question+data+assumptions+transparentPython>evidenceQuestion + data + assumptions + transparent Python -> evidence

Interpret the expression in words and units before using it in a claim.

Example

Interpretation. The custom estimator is included for transparency and teaching. Production work should compare a maintained package and verify parameterization.

Prerequisites

  • Complete the preceding course chapters or review their summaries as needed.

Full theory and examples

40.2

Volatility is latent and conditional

Volatility is not directly observed. In ARCH-type models it is the conditional standard deviation of a return innovation given past information. Large shocks tend to cluster because yesterday’s squared innovation helps predict today’s variance. Returns can be nearly uncorrelated while squared returns have substantial autocorrelation. This nonlinear dependence is one of the central facts of financial time series (Engle 1982; Bollerslev 1986).

40.3

GARCH compresses a long memory

An ARCH model uses lagged squared shocks. GARCH adds lagged conditional variance, allowing a parsimonious model to represent slowly decaying volatility. In GARCH(1,1), alpha measures the immediate reaction to news and beta carries previous variance forward. The sum alpha plus beta summarizes persistence under common parameterizations. Values near one imply slow decay, but unit scaling and innovation distribution affect the numerical estimates.

40.4

Model checking moves to standardized residuals

After estimation, residuals are divided by their conditional standard deviations. An adequate mean and variance model should leave little autocorrelation in standardized residuals and their squares. Heavy tails may remain under Gaussian innovations, motivating a standardized Student-t distribution. A volatility forecast is conditional on the model, estimated parameters, return scale, and information available at the forecast origin.

40.5

Core equations

GARCH(1,1)

With standardized innovations z_t, the conditional variance updates from news and prior variance.

Unconditional variance

This expression requires alpha+beta<1 under the standard covariance-stationary specification.

40.6

Python demonstrations

40.6.1

Demonstration 21.1: Fit the educational GARCH implementation

Verified output

Interpretation. The custom estimator is included for transparency and teaching. Production work should compare a maintained package and verify parameterization.

40.6.2

Demonstration 21.2: Annualize conditional volatility

Verified output

Interpretation. Square-root-of-time annualization assumes a daily variance scale and should not be applied blindly when dependence or horizon dynamics matter.

40.7

Visual evidence

40.8

Reference table

Why This Matters

Volatility forecasts feed risk measures, derivative models, interval forecasts, and portfolio decisions.

Common Mistake

Fitting GARCH to raw prices rather than a stationary return or innovation series.

Ceteris LAB Tip

Scale daily returns to percentages when numerical optimization is unstable, then document and reverse the scale for interpretation.

R-to-Python / Source Bridge

The source volatility lecture builds ARCH/GARCH from squared-return diagnostics, Gaussian and Student-t innovations, and standardized-residual checks. The Python chapter preserves that structure and records scaling differences (Tsay 2013).

Table 21. Chapter reference.
ParameterRoleInterpretation caution
omegalong-run variance anchordepends on return scaling
alphanews responsenot a causal effect of news sign
betavariance persistencecan absorb misspecification
alpha+betaoverall persistencenear one may signal regime change
nuStudent-t tail shapeparameterization differs by package

Visual evidence

Figure 26. A custom educational Gaussian GARCH(1,1) fit to simulated heavy-tailed returns.
Figure 26. A custom educational Gaussian GARCH(1,1) fit to simulated heavy-tailed returns.
Figure 27. Returns may have little linear autocorrelation while squared returns remain serially dependent.
Figure 27. Returns may have little linear autocorrelation while squared returns remain serially dependent.

Additional Python demonstrations

Live Python

Source demonstration 2

Source demonstration 2

Stdout

Run Python to see results here.

Status / stderr

Ready to run Python in your browser.

Line-by-line guide

  1. Line 1Load a Python library needed for data work or regression.
  2. Line 3Create or update a Python object used in the analysis.
  3. Line 4Create or update a Python object used in the analysis.
  4. Line 5Display a result so students can inspect the output.

Verified source output

0.94347 True
[0.127 0.19 0.159]
[0.127 0.19  0.159]

Interpretation. The custom estimator is included for transparency and teaching. Production work should compare a maintained package and verify parameterization.

Interpretation. Square-root-of-time annualization assumes a daily variance scale and should not be applied blindly when dependence or horizon dynamics matter.

Guided practice

  1. 1Re-run Demonstration 21.1 and change one input while keeping the analytical question fixed.
  2. 2Explain in two sentences how the output supports, or fails to support, the chapter opening question.
  3. 3Add one validation check that would prevent a plausible error.

Exercises

  1. 1Test squared returns for serial dependence.
  2. 2Estimate Gaussian and Student-t GARCH models.
  3. 3Calculate persistence and unconditional variance.
  4. 4Inspect ACFs of standardized residuals and their squares.

Source and downloads

Chapter 40 of Fundamentals of Python for Financial Econometrics by Mohammad Safavi, Ph.D.. The lesson is an original Ceteris Lab web adaptation of the supplied publication package.

Live Python

ARCH and GARCH Models: live Python

ARCH and GARCH Models: live Python

Stdout

Run Python to see results here.

Status / stderr

Ready to run Python in your browser.

Line-by-line guide

  1. Line 1Load a Python library needed for data work or regression.
  2. Line 3Create or update a Python object used in the analysis.
  3. Line 4Create or update a Python object used in the analysis.
  4. Line 5Create or update a Python object used in the analysis.
  5. Line 6Create or update a Python object used in the analysis.
  6. Line 7Run this Python instruction as part of the lesson workflow.
  7. Line 8Create or update a Python object used in the analysis.
  8. Line 9Create or update a Python object used in the analysis.
  9. Line 11Display a result so students can inspect the output.
  10. Line 12Display a result so students can inspect the output.

Python walkthrough

  1. 1`import numpy as np`: Loads a package or function used by the analysis.
  2. 2`rng = np.random.default_rng(40)`: Creates or updates a named object used by later steps.
  3. 3`omega, alpha, beta = 0.000002, 0.08, 0.88`: Creates or updates a named object used by later steps.
  4. 4`returns = np.zeros(750)`: Creates or updates a named object used by later steps.
  5. 5`variance = np.full(750, omega / (1 - alpha - beta))`: Creates or updates a named object used by later steps.
  6. 6`for t in range(1, len(returns)):`: Repeats the indented calculation across observations or simulation draws.
  7. 7`variance[t] = omega + alpha * returns[t - 1] ** 2 + beta * variance[t - 1]`: Creates or updates a named object used by later steps.
  8. 8`returns[t] = np.sqrt(variance[t]) * rng.normal()`: Creates or updates a named object used by later steps.
  9. 9`print("Simulated observations:", len(returns))`: Displays a result so it can be checked and interpreted.
  10. 10`print("Annualized volatility:", round(float(returns.std() * np.sqrt(252)), 3))`: Displays a result so it can be checked and interpreted.

Live notebook

Run this lesson as a notebook

Open an editable notebook cell-by-cell, run Python in the browser, and download the `.ipynb` file for later.

Related dataset

Ceteris Lab teaching sample

Estimated time

25 to 40 min

Packages

pandas, numpy, matplotlib

Expected output

Printed Python results that can be compared with the lesson explanation.

Learning goals

  • Load and inspect Ceteris Lab teaching sample.
  • Run the Python cells connected to ARCH and GARCH Models.
  • Interpret the output using conditional variance and volatility clustering and Test for ARCH effects.

Common errors

  • File not found: check that wage_sample.csv is installed or use the course data folder.
  • Package import error: use the browser notebook first, then download for local Jupyter if your local packages differ.
  • Column name error: compare your variable names with the dataset variables listed for this notebook.

Dataset path helper

import pandas as pd

df = pd.read_csv("/data/wage_sample.csv")
df.head()

Interactive activity

Chapter 40 interactive

Assumption stress test

Evidence strength: 55%
Weak designCredible design

What should determine the strength of an econometric claim?

Immediate feedback

Choose a decision, then test how the claim changes as evidence becomes stronger or weaker.

Try it yourself

Write one plain-English sentence explaining the main idea from this lesson.

Common mistakes

Check these before you move on.

Return to the lesson assumptions, units, diagnostics, and source evidence to replace this shortcut with a defensible interpretation.

Quick quiz

Which statement best answers the Chapter 40 opening question: How can returns be difficult to predict while their volatility remains persistent and forecastable?

Quick quiz

Which practice should be avoided when applying ARCH and GARCH Models?

Quick quiz

What is the most defensible way to interpret the Python demonstration?

Quick quiz

Why does Chapter 40 matter in an applied econometrics workflow?

Key takeaway

ARCH and GARCH model conditional variance, not observed volatility itself. GARCH persistence combines reaction and carryover. Diagnostics focus on standardized residuals and squared standardized residuals.