# Fitting a GARCH(1,1) model

How much data is needed to properly fit a GARCH(1,1) model?

Depends on the coefficients. Simple Monte-Carlo analysis suggests that a lot, about 1000, which is quite surprising.

N <- 1000
n <- 1000+N
a <- c(0.2, 0.3, 0.4)  # GARCH(1,1) coefficients
e <- rnorm(n)
x <- double(n)
s <-double(n)
x[1] <- rnorm(1)
s[1] <- 0
for(i in 2:n)  # Generate GARCH(1,1) process
{
s[i] <- a[1]+a[3]*s[i-1]+a[2]*x[i-1]^2
x[i] <- e[i]*sqrt(s[i])
}
x <- ts(x[1000+1:N])
x.garch <- garchFit(data=x)  # Fit GARCH(1,1)
summary(x.garch)


I modified example code from garch from tseries package, but I used garchFit from fGarch package, since it seemed that it gave better results. I used 1000 values for burn-in.

• @mpitkas - there is a similar recent post I entered in the Quant Finance forum at SE, and wonder if you would care to comment on fitting an AR(1)/GARCH(1,1) process to log-returns? Otherwise, the above is a very helpful response for simulation. – user32398 Nov 6 '13 at 12:55
• @mpiktas, why is it surprising? Not to say it should not be, but a short note explaining this could be helpful. – Richard Hardy Aug 6 '17 at 9:44