Financial Time Series Models (ARCH/GARCH)

Code

Data


I am analyzing stock market data from the Target Corporation, accessed from Yahoo finance https://finance.yahoo.com/quote/TGT/history?p=TGT

Plotting the Closing Price & Returns

First, I plot the closing price of Target stock over the last five years. This shows a significant upward trend, especially in the most recent time period. It is certainly not stationary.

Next, I plot the differenced, logged closing price, which shows returns. This now appears to be stationary - it has a mean around 0, and no clear trend. There are clusters of high volatatility, particularly around days 400, 800, and 1000. These clusters of volatility suggest we may want a GARCH model to account for this.

Determining ARMA or GARCH Models

To determine the degree of an ARMA model, I first looked at the ACF and PACF plots of the returns.

This figure shows us that the ACF and PACF of the returns both have a slightly significant value at 1, so we may have an ARMA(1,1), or an ARMA(0,0), ie just a white noise.

Next, I plotted the ACF and PACF of the squared returns of the Target stock prices. Both had several significant values, suggesting a GARCH(2,2) might be our best bet, as we normally don't want p/ q values in a GARCH model greater than 2.

Model Fitting & Evaluation

I ran four different models and compared their AIC and BIC values.

Of these models, the GARCH(1,1) had all significant values. The models all had fairly similar AIC/BIC values.

Residuals

The figure below shows the residuals of just an ARMA(1,1) model on the Target returns, showing somewhat high residuals and clusters of volatility. This suggests maybe we need a GARCH model.

The figure below assesses the residuals of the GARCH(1,1) model done directly on the returns. From this figure, we can see that none of the residuals are significant, and it roughly resembles white noise, though there are still some clusters of higher residuals. The residuals are centered around zero. All of the residuals are between -7 and 10, which is a narrower window than in the ARMA model residuals shown above.

Ljung-Box Statistic

The Ljung-Box test statistic has a p-value of .8558, which means we do not reject the null hypothesis of independence of the residuals of the GARCH model, which is good.

Equation

var(Yt | Yt-1) = σ2 = .218r2t-1 + .661σ2t-1 + .645

Image Source: Patrick Weissenberger at https://unsplash.com/photos/uJhgEXPqSPk