# What is the optimal sample size for fitting a GARCH model?

I tried fitting an ARMA(1,1)/GARCH(1,1) model to my data consisting of around 5000 data points but I got significant results in Ljung Box test on standardized residuals and squared residuals. However when I used only the last 3000 data points the model showed much better results with non-significant standardized residuals and squared residuals.

My question is why is this the case?Isn't more data supposed to give better models?If not what is the optimal sample size?

Also please see my unanswered question: Procedure for fitting an ARMA/GARCH Model

• "optimal" with respect to what criterion? – Glen_b Nov 29 '13 at 7:20
• I mean to get a good fit, basically I want to get a good model for my data and might need to adjust my sample size for that. – ankc Nov 29 '13 at 7:33
• Uh, 'good' and 'optimal' are quite different things. Okay, what, for you, constitutes 'good' in this context? – Glen_b Nov 29 '13 at 8:24
• hmm as long as I can get the standardized squared residuals to exhibit no correlation I would consider it a good model. – ankc Nov 29 '13 at 8:54
• @ankc: Reducing the sample size doesn't fix any deficiencies in your model, but only hides them. Why would you want to do that? – Scortchi Nov 29 '13 at 9:33

## 1 Answer

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.

• that's what I thought but it seems my model is worse off having 5000 data points than 3000. – ankc Nov 29 '13 at 7:34
• I tried fitting an ARMA(1,1)/GARCH(1,1) and got the following message Warning message: In arima(.series\$x, order = c(u, 0, v), include.mean = include.mean) : possible convergence problem: optim gave code = 1, I can fit an ARMA(0,0)/GARCH(1,1) perfectly fine but don't know what's wrong with the former. Can someone tell me why there is this message? – ankc Nov 29 '13 at 8:15
• @ankc: At a wild guess it's outliers. This is a different question, & one probably better suited to Stack Overflow, R-help, or a more specific software support site. You need to explain the software you're using, including packages (rugarch?), the call, & if possible a reproducible example. – Scortchi Nov 29 '13 at 9:30
• I'm using R and fGarch package – ankc Nov 29 '13 at 10:13
• @Scortchi: stackoverflow doesn't have an 'outlier' tag. This site does. Why do you think this problem (to the extend that it is caused by outliers) will be better answered there? – user603 Nov 29 '13 at 12:30