Why do we need GARCH models

GARCH Models in Python

Chelsea Yang

Data Science Instructor

Course overview

GARCH: Generalized AutoRegressive Conditional Heteroskedasticity

  • Chapter 1: GARCH Model Fundamentals
  • Chapter 2: GARCH Model Configuration
  • Chapter 3: Model Performance Evaluation
  • Chapter 4: GARCH in Action
GARCH Models in Python

What is volatility

  • Describe the dispersion of financial asset returns over time
  • Often computed as the standard deviation or variance of price returns
  • The higher the volatility, the riskier a financial asset

Volatility as a risk measure

GARCH Models in Python

How to compute volatility

  • Step 1: Calculate returns as percentage of price changes $$ return = {\frac{P_1 - P_0}{P_0}} $$

  • Step 2: Calculate the sample mean return $$ mean = \frac {\sum_{i=1}^n {return_i} }n $$

  • Step 3: Calculate the sample standard deviation $$ volatility = \sqrt\frac {\sum_{i=1}^n {(return_i - mean)}^2} {n-1}= \sqrt {variance}$$

GARCH Models in Python

Compute volatility in Python

Use pandas pct_change() method:

return_data = price_data.pct_change()

Use pandas std() method:

volatility = return_data.std()
GARCH Models in Python

Volatility conversion

  • Convert to monthly volatility from daily:

(assume 21 trading days in a month)

$$\sigma_{monthly} = \sqrt{21} * \sigma_d$$

  • Convert to annual volatility from daily:

(assume 252 trading days in a year)

$$\sigma_{annual} = \sqrt{252} * \sigma_d$$

GARCH Models in Python

The challenge of volatility modeling

Heteroskedasticity:

  • In ancient Greek: "different" (hetero) + "dispersion" (skedasis)
  • A time series demonstrates varying volatility systematically over time

Heteroskedasticity meme

GARCH Models in Python

Detect heteroskedasticity

Homoskedasticity vs Heteroskedasticity

Homoskedasticity vs Heteroskedasticity

GARCH Models in Python

Volatility clustering

VIX historical prices:

VIX historical price chart

GARCH Models in Python

Let's practice!

GARCH Models in Python

Preparing Video For Download...