Quant500 Academy

6. Conditional heteroskedasticity and ARCH(p) models

Level 9: Time Series - ARIMA and GARCH

We now reach the part that really matters in finance. Everything so far models the conditional mean of the series. Now we are going to model its conditional variance.

A set of random variables is heteroskedastic if there are subgroups within the set whose variance differs from that of the rest. The main motivation for studying conditional heteroskedasticity in finance is the volatility of asset returns.

The economic mechanism the professor describes is concrete: in equities, an increase in variance can be correlated with a subsequent increase in variance. On a day when the market falls sharply, automatic risk management orders are triggered in long-only portfolios; those sales cause further price falls in those same portfolios, generating significant downside volatility.

These liquidation periods produce heteroskedasticity that is serially correlated and therefore conditional on periods of elevated variance. We call such series conditionally heteroskedastic.

And here is the most treacherous aspect: the ACF of a series with changing volatility can look exactly like that of stationary white noise, even though the series is beyond doubt non-stationary because its variance is not constant over time. If you only look at the ACF of the returns, you see nothing. The solution is to look at the ACF of the squared returns.

To incorporate conditional heteroskedasticity we build a model that applies an autoregressive process to the variance itself, using past values of the variance. That is the basis of the autoregressive conditional heteroskedasticity model, or ARCH.

An ARCH(p) can be understood as an AR(p) applied to the variance of a time series:

# ARCH(p), in words and as code:
#
# variance at t = alpha_0 + alpha_1*(e[t-1]**2) + ... + alpha_p*(e[t-p]**2)
#
# and the observed series is:
# e[t] = w[t] * sqrt(alpha_0 + alpha_1*e[t-1]**2 + ... + alpha_p*e[t-p]**2)
#
# For ARCH(1):
# e[t] = w[t] * sqrt(alpha_0 + alpha_1*e[t-1]**2)

Simulating an ARCH(1):

np.random.seed(13)

a0 = 2
a1 = 0.5

y = w = np.random.normal(size=1000)
for t in range(len(y)):
    y[t] = w[t] * np.sqrt(a0 + a1 * y[t-1]**2)

tsplot(y, lags=30)      # looks like pure white noise
tsplot(y**2, lags=30)   # the ACF and PACF of the square are significant at lag 1

This is the central visual lesson of the module: the series looks like white noise, but when you plot its square, the ACF and the PACF show significance at lag 1, which indicates that an AR(1) on the variance may be appropriate.

When should an ARCH(p) be applied? Just as we decided the order of an AR by looking at the decay of the ACF of the series, we apply the same logic to the squared residuals. If we can fit an AR(p) to those squared residuals, we have an indication that an ARCH(p) process is appropriate.

Three conditions that are not optional:

That ordering (first the mean with ARIMA, then the variance with ARCH or GARCH) is the skeleton of the strategy in the final module.

To go deeper into this lesson

The rest of Quant500

What you are learning, applied to the index every day:

The model portfolio, weekly in your inbox

Every Saturday, its week in one minute: how it went, the best and the worst, and which insiders bought with their own money. Plus, the day the model is rebuilt, which stocks come in and which go out. A simulation, not advice. At most one email a week, no ads, no account; one-click unsubscribe. Made by one person: Pol Gracia.

A model portfolio with simulated results, not a personalized recommendation. Your email is used for this only: privacy.

Behind the Academy and the rest of Quant500 there is one person: Pol Gracia Serrahima.