Unlocking Market Volatility: A Deep Dive into the ARCH Model

No of Post Views:

20 hits

Unlocking Market Volatility: A Deep Dive into the ARCH Model

Focus: Volatility Clustering, Heteroskedasticity, and the ARCH(1) Process

Introduction: The Pulse of the Market

If you have ever watched a stock chart during a crisis, you know that panic is contagious. Large market moves rarely happen in isolation. A 3% drop today often increases the probability of a wild swing tomorrow – maybe up, maybe down, but definitely volatile. Conversely, during quiet summers, the market can drift peacefully for weeks with barely a ripple.

This phenomenon is known in finance as Volatility Clustering: large changes tend to be followed by large changes, and small changes by small changes.

As a trainer in financial data science, I often see students try to fit standard linear models (like ARIMA) to financial time series. They often run into a wall. Why? Because standard models assume Homoskedasticity; the fancy statistical word for “constant variance.” They assume the “noise” or “risk” in the market is the same today as it was during the 2008 crash. Intuitively, we know that’s wrong.

In this article of our series, we are going to fix that. We will step away from constant variance and introduce the ARCH (AutoRegressive Conditional Heteroskedasticity) model. We will break down the math step-by-step, explain the intuition, and run Python code to see it in action.

Section 1: The Problem with Constant Variance

Before we build the solution, let’s understand the problem using real data. We will look at Google’s stock price (from the data.csv file).

1.1 Visualizing Returns

When we model asset prices, we usually work with log returns rather than raw prices, as returns are more likely to be stationary.

$$r_t = ln(P_t) – ln(P_{t-1})$$

Let’s visualize the log returns of Google stock.

import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
 
# Load the data
data = pd.read_csv('data.csv')
data['Date'] = pd.to_datetime(data['Date'])
data.set_index('Date', inplace=True)
 
# Calculate Log Returns
data['log_ret'] = np.log(data['GOOGLE']) - np.log(data['GOOGLE'].shift(1))
 
# Plotting
plt.figure(figsize=(12, 6))
plt.plot(data['log_ret'])
plt.title('Google Daily Log Returns')
plt.ylabel('Log Return')
plt.xlabel('Date')
plt.grid(True)
plt.show()
Line graph depicting the daily log returns of Google stock from 2016 to 2022, showing fluctuations in returns over time.

What do we see?

If the variance were constant, this plot would look like a uniform band of noise with the same width from left to right. Instead, we see “bursts” of activity. There are periods where the noise spikes (high volatility) and periods where it is flat (low volatility).

This visual evidence confirms Conditional Heteroskedasticity. The variance conditional on the past is changing.

Section 2: Enter the ARCH Model

In 1982, Robert Engle introduced the ARCH model to capture this behavior (winning a Nobel Prize for it later). The core idea is simple but powerful: The variance of tomorrow depends on the square of the shock today.

2.1 The Two Equations of ARCH(1)

An ARCH model consists of two distinct parts:

  • The Mean Equation: Describes the average behavior of the series (often just zero or a constant).
  • The Variance Equation: Describes how the variance changes over time.

Let’s look at the ARCH(1) model, the simplest form.

The Mean Equation

$$ a_t = \sigma_t \epsilon_t $$

  • \(a_t\): The shock or return at time t (assuming mean is zero).
  • \(\sigma_t\): The time-dependent standard deviation (volatility).
  • \(\epsilon_t\): A standard normal random variable (white noise) with mean 0 and variance 1.

The Variance Equation

This is where the magic happens. The variance \(\sigma_t^2\) is not a fixed number C. It is a function of the past:

$$ \sigma_t^2 = \alpha_0 + \alpha_1 a_{t-1}^2 $$

Let’s decode this:

  1. \(\sigma_t^2\): Today’s conditional variance.
  2. \(\alpha_0\): A baseline variance (must be $>0$).
  3. \(a_{t-1}^2\): Yesterday’s squared shock (the “news”).
  4. \(\alpha_1\): How much yesterday’s shock impacts today’s volatility (must be \(\ge 0\)).

Intuition: If yesterday had a huge price drop (large negative \(a_{t-1}\)), then \(a_{t-1}^2\) will be a huge positive number. This drives up \(\sigma_t^2\), making today’s expected range of movement larger. This creates the “clustering” effect.

Section 3: Deep Dive into Properties

To really understand ARCH, we need to look at its statistical properties. This is often where learners get lost, so let’s take it step-by-step.

3.1 Unconditional Mean

What is the expected value of the return \(a_t\) over the long run?

$$ E[a_t] = E[\sigma_t \epsilon_t] $$

Since \(\sigma_t\) depends on the past and \(\epsilon_t\) is random noise for the present, they are independent.

$$ E[a_t] = E[\sigma_t] \cdot E[\epsilon_t] $$

Since \(E[\epsilon_t] = 0\), the whole thing is zero.

$$ E[a_t] = 0 $$

Takeaway: The ARCH model doesn’t predict direction (up or down); it predicts magnitude (risk).

3.2 Unconditional Variance

This is tricky. We know the conditional variance changes (\(\sigma_t^2\)). But if we look at the process over 100 years, what is the average (unconditional) variance?

We start with the variance equation and take the expectation of both sides:

$$ E[\sigma_t^2] = \alpha_0 + \alpha_1 E[a_{t-1}^2] $$

Here is a key substitution. Since \(a_t\) has mean zero, \(E[a_{t-1}^2]\) is just the unconditional variance, let’s call it \(Var(a_t)\).

Also, the average of the conditional variance \(E[\sigma_t^2]\) is essentially the unconditional variance \(Var(a_t)\).

So, the equation becomes:

$$ Var(a_t) = \alpha_0 + \alpha_1 Var(a_t) $$

Solving for $Var(a_t)$:

$$ Var(a_t) – \alpha_1 Var(a_t) = \alpha_0 $$

$$ Var(a_t) (1 – \alpha_1) = \alpha_0 $$

$$ Var(a_t) = frac{\alpha_0}{1 – \alpha_1} $$

Crucial Constraint: For the variance to be positive and finite, we must have \(\alpha_1 < 1\). This is the stationarity condition. If \(\alpha_1 \ge 1\), the volatility would explode to infinity over time.

3.3 Fat Tails (Kurtosis)

Financial data often exhibits “fat tails”—extreme events happen more often than a normal distribution predicts. Does ARCH capture this? Yes.

The calculation is complex (involving \(E[a_t^4]\)), but the result for ARCH(1) Kurtosis is:

$$ K = \frac{3(1 – \alpha_1^2)}{1 – 3\alpha_1^2} $$

Since \(\alpha_1 > 0\), the denominator is smaller than the numerator, meaning \(K > 3\).

(Note: A normal distribution has Kurtosis = 3).

Takeaway: An ARCH process naturally generates data with outliers (fat tails), even if the underlying errors \(\epsilon_t\) are normal. This makes it far superior to standard Gaussian models for risk management.

Section 4: Simulating ARCH in Python

Theory is good, but code is better. Let’s build an ARCH(1) process from scratch to verify these properties. We will simulate a return series where \(\alpha_0 = 1\) and \(\alpha_1 = 0.5\).

import numpy as np
import matplotlib.pyplot as plt
 
# 1. Set Parameters
n = 1000  # number of data points
alpha0 = 1
alpha1 = 0.5
 
# 2. Initialize arrays
a = np.zeros(n)      # returns
sigma2 = np.zeros(n) # variances
 
# 3. Simulation Loop
# We need a starting value. Let's assume a[0] = 0 for simplicity.
np.random.seed(42)
 
for t in range(1, n):
    # Calculate current variance based on previous squared return
    sigma2[t] = alpha0 + alpha1 * (a[t-1]**2)
    
    # Calculate current return: std_dev * random_shock
    a[t] = np.sqrt(sigma2[t]) * np.random.normal(0, 1)
 
# 4. Plotting
plt.figure(figsize=(12, 8))
 
# Plot Returns
plt.subplot(2, 1, 1)
plt.plot(a)
plt.title(f'Simulated ARCH(1) Returns (alpha0={alpha0}, alpha1={alpha1})')
plt.ylabel('Return (a_t)')
 
# Plot Conditional Variance
plt.subplot(2, 1, 2)
plt.plot(sigma2, color='orange')
plt.title('Conditional Variance (sigma^2_t)')
plt.ylabel('Variance')
plt.xlabel('Time')
 
plt.tight_layout()
plt.show()
A line graph of simulated ARCH(1) returns showing volatility fluctuations over time, with blue lines representing returns and labeled axes.

Observation

When you run this code, look at the two plots.

  1. Simulated ARCH(1) Returns: You will see “bursts” of noise.
  2. Conditional Variance: You will see the variance spiking exactly when the returns are large.

This confirms that our mathematical model successfully generates volatility clustering!

Section 5: The ARCH(m) Model

Real markets have a long memory. A shock today might affect volatility for days or weeks, not just tomorrow. The ARCH(1) model only looks at yesterday (\(t-1\)).

To fix this, we generalize to the ARCH(m) model, which looks back m periods.

$$ \sigma_t^2 = \alpha_0 + \alpha_1 a_{t-1}^2 + \alpha_2 a_{t-2}^2 + … + \alpha_m a_{t-m}^2 $$

Or more compactly:

$$ \sigma_t^2 = \alpha_0 + sum_{i=1}^{m} \alpha_i a_{t-i}^2 $$

Weaknesses of ARCH(m)

While ARCH(m) is better, it has practical issues:

  1. Too many parameters: If the market remembers the last 30 days, you need to estimate 30 alpha parameters (\(\alpha_1 … \alpha_{30}\)).
  2. Constraint violations: All alphas must be non-negative (\(\ge 0\)). With 30 parameters, it’s very likely the estimation algorithm will produce a negative value just by chance, breaking the model.

This limitation sets the stage for the GARCH model (Generalized ARCH), which solves the “too many parameters” problem.

Conclusion & Next Steps

In this article, we moved from the naive assumption of constant variance to the dynamic world of Conditional Heteroskedasticity.

Key Takeaways:

  • Volatility Clustering is a dominant feature of financial data.
  • ARCH(1) models variance as a function of past squared shocks.
  • Stationarity requires \(\alpha_1 < 1\).
  • Fat Tails are a natural feature of ARCH models, making them realistic for risk modeling.

However, as we noted, pure ARCH models can be cumbersome if we need to look far into the past. In next part, we will introduce the industry-standard GARCH Model. We will see how it achieves “infinite memory” with just a few parameters and apply it to our Google dataset to calculate real-world risk metrics.

Stay tuned!


Leave a Reply

Discover more from SimplifiedZone

Subscribe now to keep reading and get access to the full archive.

Continue reading

Discover more from SimplifiedZone

Subscribe now to keep reading and get access to the full archive.

Continue reading