RATS 10.1
RATS 10.1

If the model is adequate, the standardized residuals should be serially uncorrelated (if the mean model is chosen correctly), and their squares should be as well (if the variance model is chosen correctly). The first can be tested with Ljung-Box (1978) and the second with McLeod-Li (1983). Both are included in the @BDINDTESTS procedure, along with several other independence tests, and McLeod-Li has its own procedure named (not surprisingly) @MCLEODLI. You can also use the @REGCORRS procedure which not only computes the test statistic, but graphs the autocorrelations. To use @REGCORRS for the McLeod-Li test, you need to apply it to the squared standardized residuals. The appropriate degrees of freedom correction for McLeod-Li is the number of “GARCH” parameters (p+q).

 

garch(p=1,q=1,resids=u,hseries=h) / dlogdm

set ustd   = u/sqrt(h)

set ustdsq = ustd^2

@regcorrs(qstat,number=40,title="GARCH-LB Test") ustd

@regcorrs(qstat,number=40,dfc=2,title="GARCH-McLeod-Li Test") $

  ustdsq

 

When you have a very large number of observations, it’s unlikely that both tests will pass at a conventional .05 level. That’s where the autocorrelation graph can help, since it will often be clear, even if the test doesn’t pass at the conventional level, that there isn’t really much (correctable) residual autocorrelation. If the statistically significant residual autocorrelation is on the short lags (like 1 and 2), it may be helpful to add another lag to your autoregression if that’s what you’re doing with the mean model. If the short lags are generally small and what shows as “significant” is on longer lags, then there probably is no simple model change which can fix it—with very large data sets, even quite a small autocorrelation can be significant at the .05 level.

 

A standard STATISTICS instruction on the standardized residuals can be used to see if there is kurtosis that might be helped by using a non-normal distribution. However, if you are already using one of those, the standardized residuals will still show kurtosis, and generally more than before.

 

 

Another test which can be helpful in spotting problems is a structural stability (fluctuations) test. In this case, it would be done by adding the DERIVES option to the GARCH instruction and using the @FLUX procedure:

 

garch(p=1,q=1,derives=dd) / dlogdm

@flux(title="Stability Test for GARCH model")

# dd

 

Example GARCHFLUX.RPF shows how you can look more carefully at the test information to decide whether there are any changes required to the model.

 


Copyright © 2025 Thomas A. Doan