Conditional heteroskedasticity and volatility clustering
Today let's understand why the size of the daily swings in a stock index keeps changing over time, and what that does to the forecasts we make from it.
Our running example is the DAX, the main stock index of the German market. Each trading day the index closes at some level, and that day's return is the percent change from the previous close. Below are 260 consecutive daily returns of the DAX, from late 1996 to late 1997.
Compare the two ends of the plot. In the first 60 days the returns have a standard deviation of 0.879, and no day moves more than 2.16 percent in either direction. In the last 60 days the standard deviation is 1.952, and the returns swing much further, from -6.01 on day 252 to 4.32 on day 253.
From closing prices to daily returns
The DAX prices come with R. The built-in EuStockMarkets dataset holds the daily closing prices of four European stock indices from 1991 to 1998, and we take its DAX column.
We work with returns instead of prices. The daily log return, in percent, is
\[ r_t = 100 \times \left( \log P_t - \log P_{t-1} \right) \]
where \(P_t\) is the closing price on day \(t\). For small moves it is almost the same as the percent change from one close to the next. Unlike a change in index points, it means the same thing at any level of the index.
The code below computes the returns and prints the first few prices and returns.
The first price fell from 1,628.75 to 1,613.63, so the first return is -0.933, a fall of about 0.9 percent. There are 1,860 prices but only 1,859 returns, because the first price has no day before it.
Here are the mean, standard deviation, smallest and largest return.
The mean daily return is 0.065 percent, which is small next to a standard deviation of 1.030. The worst day was a fall of 9.628 percent and the best day a rise of 5.076 percent.
The plot has the prices on top and the returns below, with a dashed line at the mean return.
The prices trend upward, so there is no fixed level they move around. The returns move around their mean of 0.065, the dashed line close to 0. That makes them the series we can describe with a mean and a variance.