Forecasting Air Passenger Volatility Using GARCH Modelling

Modelling generalised autoregressive conditional heteroscedasticity using R

Michael Grogan

--

Photo by Artturi Jalli from Unsplash

When attempting to forecast a time series, consideration is given as to both the trend and seasonality patterns in the series.

That said, we can often come across a time series where the volatility in the series is not constant over time. This is known as autoregressive conditional heteroscedasticity.

In this regard, a GARCH model can be used to forecast the volatility in a time series. The purpose of this article is to illustrate how to test for the presence of autoregressive conditional heteroscedasticity using air passenger data sourced from DataSF Open Data and then build a GARCH model to forecast volatility for this time series.

Time series with no ARCH present

To illustrate this better, let us consider a series of normally distributed random numbers in R — formatted as a yearly time series.

df<-rnorm(100)
tsrnorm <- ts(df, start = c(2015,3), frequency = 12)
plot(tsrnorm,type="l",ylab="Values")
title("Values")

Plotting this time series yields the following:

Source: Plot generated using R.

Using the ARCH test for univariate time series from the MTS library in R, we can see that the null hypothesis of no presence of conditional heteroscedasticity cannot be rejected at the 5% level of significance, with p-values significantly above 0.05.

> archTest(tsrnorm)
Q(m) of squared series(LM test):
Test statistic: 10.51308 p-value: 0.3966882
Rank-based Test:
Test statistic: 13.04079 p-value: 0.2213999

When generating an ARIMA forecast on this series using auto.arima, we can see that an ARIMA(0,0,0) model is selected as the model of best fit — which is in line with what we expect given that the time series generated is essentially white noise.

> fitarima<-auto.arima(tsrnorm, trace=TRUE, test="kpss", ic="bic")

ARIMA(2,0,2)(1,0,1)[12] with non-zero mean : 305.4602
ARIMA(0,0,0)…

--

--