# Testing for serial correlation in ARMA-GARCH residuals

I have the following output from the ugarchfit function of the “rugarch” package:

*---------------------------------*
*          GARCH Model Fit        *
*---------------------------------*

Conditional Variance Dynamics
-----------------------------------
GARCH Model     : fGARCH(1,1)
fGARCH Sub-Model        : GARCH
Mean Model      : ARFIMA(1,0,1)
Distribution    : ged

Optimal Parameters
------------------------------------
Estimate  Std. Error    t value Pr(>|t|)
mu      0.000000    0.000018  -0.000081 0.999935
ar1     0.027404    0.000626  43.809972 0.000000
ma1    -0.027404    0.000626 -43.805697 0.000000
omega   0.000085    0.000032   2.625465 0.008653
alpha1  0.212609    0.032685   6.504718 0.000000
beta1   0.786385    0.033784  23.276728 0.000000
shape   0.687910    0.025568  26.905141 0.000000

Robust Standard Errors:
Estimate  Std. Error    t value Pr(>|t|)
mu      0.000000    0.000017  -0.000083 0.999933
ar1     0.027404    0.000297  92.285201 0.000000
ma1    -0.027404    0.000297 -92.271888 0.000000
omega   0.000085    0.000089   0.955087 0.339534
alpha1  0.212609    0.059261   3.587672 0.000334
beta1   0.786385    0.084830   9.270184 0.000000
shape   0.687910    0.051326  13.402719 0.000000

LogLikelihood : 3605.227

Information Criteria
------------------------------------

Akaike       -3.6679
Bayes        -3.6480
Shibata      -3.6679
Hannan-Quinn -3.6606

Weighted Ljung-Box Test on Standardized Residuals
------------------------------------
statistic   p-value
Lag[1]                      6.375 1.157e-02
Lag[2*(p+q)+(p+q)-1][5]     8.803 1.734e-10
Lag[4*(p+q)+(p+q)-1][9]    12.601 6.015e-04
d.o.f=2
H0 : No serial correlation

Weighted Ljung-Box Test on Standardized Squared Residuals
------------------------------------
statistic p-value
Lag[1]                    0.04776   0.827
Lag[2*(p+q)+(p+q)-1][5]   0.07166   0.999
Lag[4*(p+q)+(p+q)-1][9]   0.12958   1.000
d.o.f=2

Weighted ARCH LM Tests
------------------------------------
Statistic Shape Scale P-Value
ARCH Lag[3] 0.0003708 0.500 2.000  0.9846
ARCH Lag[5] 0.0475514 1.440 1.667  0.9954
ARCH Lag[7] 0.0930759 2.315 1.543  0.9995

Nyblom stability test
------------------------------------
Joint Statistic:  13.2604
Individual Statistics:
mu     2.9981
ar1    4.4239
ma1    4.4239
omega  0.2867
alpha1 1.9896
beta1  0.5997
shape  2.6809

Asymptotic Critical Values (10% 5% 1%)
Joint Statistic:         1.69 1.9 2.35
Individual Statistic:    0.35 0.47 0.75

Sign Bias Test
------------------------------------
t-value   prob sig
Sign Bias          1.16912 0.2425
Negative Sign Bias 0.07816 0.9377
Positive Sign Bias 0.05444 0.9566
Joint Effect       1.68722 0.6398

------------------------------------
group statistic p-value(g-1)
1    20     31.99    0.0313705
2    30     58.09    0.0010605
3    40     62.06    0.0108538
4    50     86.67    0.0007291


My Question is:

The Box-Ljung test on squared STZRs returns p-values close to 1 which implies independence. While the Box-Ljung test on non-squared STZRs returns p-values close to 0 which would mean serial correlation. But independence should always imply serial uncorrelation. So, how would you justify the p-values of the Box-Ljung test on non-squared STZRs?

• Next time avoid posting many distinct questions in one post. (By distinct I mean ones that can be answered independently of each other.) Your questions in this post would better fit some 3-4 separate posts. – Richard Hardy Oct 17 '16 at 17:20
• Ok, next time I will definitely keep questions separated. – msmna93 Oct 17 '16 at 17:58
• Perhaps just delete now and ask as @RichardHardy suggets? – mdewey Oct 17 '16 at 20:45
• Ok, I deleted the other questions and left just the first one as you asked.@Richard you can then delete the remaining answers. – msmna93 Oct 18 '16 at 9:36

The p-values of the Box-Ljung test for independence of the standardized residuals (STZRs) from the hybrid model accept the null hypothesis at a 10% significance level for all default lags. However, the p-values of the Box-Ljung test for serial uncorrelation of the STZRs reject the null hypothesis at all common significance levels for all default lags.

I don't quite understand you. Are the number of lags different in the two cases? Because otherwise it looks like a pure contradiction... It seems the difference in your case is between tests on raw vs. squared standardized residuals. This kind of different test results should not surprise you. It is entirely possible that residuals are non-autocorrelated but have ARCH patterns (autocorrelation in squares) or are autocorrelated but have no ARCH patterns. In any case, if autocorrelation is present for any transformation (none, power of two, absolute value, etc.), this violates independence.

The ACF and PACF plot of the standardized residuals that I posted below confirm the presence of serial correlation at certain lags.

The standard null distribution of ACF and PACF is not applicable for residuals of ARMA (-GARCH) models, so the confidence bounds are misleading.

Is it theoretically and practically acceptable to have serially correlated but independent standardized residuals from hybrid ARMA+GARCH models?

Serially correlated and independent cannot hold at the same time. Independence implies no serial correlation, serial correlation implies lack of independence (in population).

If my model is misspecified, what would you suggest me do to eliminate the presence of serial correlation in the standardized residuals? Specifying a higher order mean part and/or a higher order variance part for my hybrid model generally causes two problems. Firstly, the hybrid model goodness of fit slightly worsens in terms of AIC. Secondly, the ACF plot of the fitted values (i.e. the conditional means) from the hybrid model does not match the ACF plot of my original data (i.e. USDlogreturns).

First, the goal of having a model with no serial correlation does not coincide with the goal of having a model with low AIC. AIC selects a model that has a "good" trade-off between fit and complexity, while pursuing no autocorrelation does not address model complexity at all. If you care about forecasting, AIC selection would make more sense than a model with minimal autocorrelation.
Second, I would not necessarily expect a good fit (and thus similar ACF plots) for a financial time series as financial time series are hard to fit well.

Another problem that I have is that the standardized residuals seem not to follow the conditional distribution that I set (i.e. the “ged”). See the output of the Pearson Adjusted Chi-Square Goodness of Fit test. Again, do you have any suggestion on how I could overcome this problem? I tried to fit other conditional distributions like the Normal Gaussian and the Student-T but found generally worse results.

This is a very general problem and the "correct" solution is difficult to guess. I would tweak various parts of the model and see if that improves the situation. Also, if you assumed normality when fitting the model, you could use properties of quasi MLE, which makes the failure of the distributional assumption less of an issue.

Some posts on CV already raised the question about the validity of the Box-Ljung test from the ugarchfit function for purposing of testing the serial uncorrelation and independence of the standardized residuals from GARCH and ARMA+GARCH models. As far as I read, Li-Mak test should be preferred.

(It could be helpful to cite the posts you are referring to.) Not quite. Li-Mak should be used in place of ARCH-LM on standardized residuals or Ljung-Box on squared standardized residuals. It should not be used in place of Ljung-Box on (raw) standardized residuals.

I then tried to run the Li-Mak test for both serial uncorrelation and independence of the standardized residuals from my hybrid model. My aim would be to see if I obtain different output from what I got from the "ugarchfit" function.

You posted the same output twice, didn't you?

Finally, Ljung-Box test might not be applicable to residuals of ARMA (-GARCH) models in any case -- as argued in "Testing for autocorrelation: Ljung-Box versus Breusch-Godfrey" -- so a big part of this thread is questionable.

• Sorry, it was a repo. I meant "standardized residuals" with the acronym STZRs. I already edited the post. – msmna93 Oct 17 '16 at 17:48
• Many thanks for your answer. You clarified a lot of my doubts. – msmna93 Oct 17 '16 at 17:58
• If you take a look at the output of the ugarchfit function, you see that the lags are 1,5,9 for Box test on both the STZRs and the squared STZRs. What I did not understand is the fact that the test on the squared STZRs returns p-values close to 1 which means independence. But the test on raw (i.e. not-squared) STZRs returns p-values close to 0 which would mean serial correlation. I also knew from my basic statistics knowledge that independence always implies uncorrelation (the vice-versa relationship not always holds). I asked for an explanation on this apparent contradiction. – msmna93 Oct 17 '16 at 18:27
• @msmna93, I did not understand that from your original question. Perhaps you could edit it to better highlight the fact that the difference is coming from raw vs squared? – Richard Hardy Oct 17 '16 at 18:31
• Ok I'll edit it. – msmna93 Oct 17 '16 at 18:32