Modelling Time Series Processes using GARCH
To go into the turbulent seas of volatile data and analyze it in a time changing setting, ARCH models were developed.
The range goes from -2.8 to 5.5 with a mean of -0.002. This indicates that the series oscillates around 0 but has a lot of variability which is an ideal candidate for a GARCH modelling technique. To fit a GARCH, we need to identify the ARIMA model on which we will add GARCH. This calls for ACF and PACF plots
Looking at the plots, we can see the third, fourth and fifth lags to be fairly significant. It seems an ARIMA(5,0,0) model should be a good fit for the series. Let’s try and test with the Ljung-Box test
The first five lags are almost vanishing with no lag showing a significant impact in the ACF plot. Let’s double check with the Ljung Box test. The Ljung Box test is a statistical test to check if any of the autocorrelations are not zero. The higher the p-value, the more chance that all autocorrelations are zero. If the p-value is lower than 0.05, we generally assume with a 95% confidence that some autocorrelations are not zero and our ARIMA fit was inappropriate.
The p-value is quite high and shows that the fit was good. Now is the time for GARCH fit over ARIMA(5,0,0). Let’s try the popular GARCH(1,1) model. To make things simpler, we will only use the first 500 observations. The garchFit function helps us achieve this
Conclusion: The beauty of fGarch and available series of plots
The advantage of fGarch package is that the garchFit function is very rich in functionality. Using the summary statistics provides a lot of tests and statistics. Using the plot function also provides with a lot of graphs and analysis. Let’s try using the plot function on the model
As we can see, we are presented with a choice of plots. I recommend trying out all the options from 1 to 13 and noting the analysis. For simplicity, I will show a two plots: Time series and Series with 2 Conditional SD Superimposed
1. Time Series
3. Series with 2 Conditional SD Superimposed
This is just the beginning and there are a lot of packages. Different packages have different applications. The fGarch package used in this article is abbreviated for Financial Garch and suited for modelling heteroskedasticity in financial time series such as the exchange rate used from the Garch dataset. Try working on other packages and keep learning. This article provides the required background for Garch modelling with implementation in a financial series. Here is the entire code used for reference.
This article was contributed by Perceptive Analytics. Madhur Modi, Chaitanya Sagar, Jyothirmayee Thondamallu and Saneesh Veetil contributed to this article.
Perceptive Analytics provides data analytics, data visualization, business intelligence and reporting services to e-commerce, retail, healthcare and pharmaceutical industries. Our client roster includes Fortune 500 and NYSE listed companies in the USA and India.
- Optimization Using R
- Building Regression Models in R using Support Vector Regression
- Propensity Score Matching in R