ARCH and GARCH models have become salient tools in the analysis of time series data, particularly in financial applications. These models are especially useful when the goal of the study is to analyze volatility. (Generalised) Autoregressive Conditional Heteroscedasticity (G)ARCH models are statistical representations that track time series data. The popularity of the (G)ARCH construction amongst academics and practitioners largely owes to the fact that volatility is not immune from flux. During some periods, stock returns for example, demonstrate low volatility, whereas during other periods departures to more elevated levels high volatility are characteristic. Below, I follow John Hull author of Options, Futures and Other Derivatives which sets out how to implement GARCH(1,1) parameters between the dates July 18, 2005 to August 13, 2010. I use John's example because his approach is highly intuitive and revealing where slightly more dense treatments can fall short. Also, if you are new to Maximum Likelihood estimation then the explanation provided by John Hull is useful in presenting a "learn by doing" approach. GARCH constructions are designed to capture variations in the volatility through time. They describe the variance of the current error term in relation to contemporaneous shocks and the historical shock with time decay dynamics at play. (G)ARCH models are commonly employed in modeling financial time series that manifest flux and clustering. In the video playlist below for GARCH 1,2 and 3, I follow John Hull using excel. To retrieve excel file please use hyperlink. Then, in GARCH RStudio, I make one small change to John's construction to make the parameter estimation consistent with R.
Using the same dataset I replicate the GARCH (1,1) output from R. This just requires one small change which can be observed in the video clip below.
# R code for GARCH(1,1) estimation
install.packages("tseries")
library(tseries)
mydata<- read.csv("SPR.csv")
attach(mydata)
# Defining variables
X <- Return
# Descriptive statistics and plotting the data
summary(X)
plot(X)
arch.X= garch(X,order=c(0,1))
summary(arch.X)
Garch.X = garch(X,order=c(1,1))
summary(Garch.X)