Procedure for fitting an ARMA/GARCH Model

I want to try fitting an ARMA/GARCH model but want a methodological approach rather than fitting different models and picking the best one. However, I'm not sure how to choose my AR and MA terms for my mean equation, same thing for my variance equation. Hence I have the following queries:

1. Are there any conventions/guidelines for choosing these by looking at the ACF/PACF of returns and squared returns?

2. How are the coefficients estimated?Are the coefficients of the ARMA estimated first, then a GARCH fitted to the residuals?or are they estimate in parallel?

3. Also I read on wikipedia that the Ljung-Box test should be applied to the residuals of an ARIMA model to detect the presence of heteroscedasticty, but I saw also some people applying it on squared returns. Are these two the same?If not, what's the difference between the two?

• Re Q.3: Where on Wikipedia? Commented Nov 29, 2013 at 16:59
• @Scortchi, en.wikipedia.org/wiki/Ljung%E2%80%93Box_test, see last paragraph under formal defintion.
– ankc
Commented Nov 29, 2013 at 17:55
• It doesn't mention heteroskedasticity there or indeed anywhere in the article. Commented Nov 29, 2013 at 18:10
• oh I think it might be referring to the usual ARMA residuals check
– ankc
Commented Nov 29, 2013 at 18:24

1. You may look at ACF/PACF plots but this will only be practical if the data generating process is very simple, like AR($p$) or MA($q$). Once you encounter an ARMA($p,q$)+GARCH($s,r$) process where $p,q,s,r>0$, ACF/PACF will be harder to interpret.

2. You may choose to fit an ARMA model first and then fit a GARCH model on the ARMA residuals, but this is not the preferred way. Your ARMA estimates will generally be inconsistent. (In a special case where there are only AR terms and no MA terms, the estimates will be consistent but inefficient.) This will also contaminate the GARCH estimates. Therefore the preferred way is to estimate both ARMA and GARCH models simultaneously. Statistical software is capable of doing that (see e.g. rugarch package for R).

3. Ljung-Box test considers autocorrelation, not heteroskedasticity. Don't forget to adjust the degrees of freedom if you apply the test on model residuals rather than raw data.
Also, Ljung-Box test assumes conditional homoskedasticity, thus you have to be careful. If you detect conditional heteroskedasticity of ARMA model residuals (or raw data) (and you can do that with an ARCH-LM test), Ljung-Box test results can no longer be trusted.
When it comes to applying Ljung-Box test on squared residuals, this is intended for detecting ARCH effects (conditional heteroskedasticity). I would use ARCH-LM test instead since it was designed particularly for this task.

• I see that the autoarfima command in the rugarch package will select the best fitting ARFIMA model based on information criteria such as AIC, BIC, SIC, HQIC. But I don't see any command there that would simultaneously select the best model for the conditional mean and the conditional variance. Commented Sep 22, 2021 at 22:22
• @ColorStatistics, no, I do not think there is such a function. Commented Sep 23, 2021 at 5:03
• I see. In your answer, you are saying that we don't want to fit ARMA first and then GARCH (most of the time). Instead you recommend that ARMA and GARCH are fit simultaneously and yet there is no command to do that for us. So I guess this would have to be manually coded up. Would you suggest then looping over values of p, q, a, b, in ARMA(p,q)+GARCH(a,b) and choosing the best fit on some criterion (in sample AIC/BIC, out of sample RMSE/MAE)? Commented Sep 23, 2021 at 10:09
• @ColorStatistics, there is a function to fit a given model simultaneously, though not a function that selects a model. Yes, you could do a loop as you suggest. There is one problem with such an approach, namely, the winner's curse. When searching over a large set of models, chances are high that the selected model only appears good: fits the sample well but does not generalize to new samples from the same DGP well. Commented Sep 23, 2021 at 10:28
• @ColorStatistics, regularized estimation is a solution to that, but I am not aware of any nonbayesian functions for that. I guess there exists some package that does Bayesian GARCH but probably (?) without ARMA. Commented Sep 23, 2021 at 10:28