How much data is needed to properly fit a GARCH(1,1) model?
Best Answer
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.
All models are imperfect representations of reality: the more data you have, the better able you are to detect their imperfections and to take them into account by building better models. So you should expect any kind of goodness-of-fit test to become significant when you increase the sample size enough. You have the choice of deciding that the model performs well enough as it is or of making it more complex to accommodate those previously indiscernible discrepancies.
In this case you might want to first examine carefully the extra 2,000 observations to look for outliers, change-points, &c., then try a model with more GARCH/ARMA parameters as indicated by the auto-correlation functions.
I assume you have a logarithmic return series of an asset of interest.
Fit an ARMA+GARCH model to your return series. You can do this by ugarchfit function in rugarch package in R (you will have to choose what density you want to assume for the standardized residuals).
Forecast conditional mean and conditional variance of the assumed parametric density 10 days ahead. You can do this by ugarchroll function in rugarch package in R.
Given the forecasted mean and variance of the assumed density, you can obtain the 0.05 quantile of the distribution which will be your 5% VaR (you can use other quantiles, of course). You can do this by function qnorm for the normal density, qt for student density, or generally qsomethingelse for some other density in R.
There is a nice vignette for the rugarch package where you can learn more about ARMA+GARCH modelling (although not about VaR calculations). Also, this picture from Wikipedia helped me write this answer (I hope I got it correctly).
Best Answer
Depends on the coefficients. Simple Monte-Carlo analysis suggests that a lot, about 1000, which is quite surprising.
I modified example code from
garch
from tseries package, but I usedgarchFit
from fGarch package, since it seemed that it gave better results. I used 1000 values for burn-in.