[R-SIG-Finance] ljung-box tests in arma and garch models

Spencer Graves spencer.graves at pdf.com
Fri Dec 28 03:35:01 CET 2007


Dear Michal:

      The best way to check something like this is to do a simulation,
tailored to your application.  If you do such, I'd like to hear the
results.

      Absent that, my gut reaction is to agree with you.  The chi-square
distribution with k degrees of freedom is defined as distribution of the
sum of squares of k independent N(0, 1) variates
(http://en.wikipedia.org/wiki/Chi-square_distribution).  In 1900, Karl
Pearson published "On the criterion that a given system of deviations
from the probable in the case of a correlated system of variables is
such that it can be reasonably supposed to have arisen from random
sampling", Philosophical magazine, t.50
(http://fr.wikipedia.org/wiki/Karl_Pearson).  In this test, Pearson
assumed that the sums of squares of k N(0, 1) variates, independent or
not, would follow a chi-square(k).  R. A. Fisher determined that the
number of degrees of freedom should be reduced by the number of
parameters estimated
(http://www.mrs.umn.edu/~sungurea/introstat/history/w98/RAFisher.html).
This led to a feud that continued after Pearson died.

      The "Box-Pierce" and "Ljung-Box" tests are both available in
'Box.test{stats}' and discussed in Tsay (2005) Analysis of "financial
Time Series (Wiley, p. 27), which includes a comment that, "Simulation
studies suggest that the choice of" the number of lags included in the
Ljung-Box statistic should be roughly log(number of observations) for
"better power performance."

       Based on this, the "FinTS" package includes a function "ARIMA"
that calls "arima", computes Box.test on the residuals and adjusts the
number of degrees of freedom to match the examples in Tsay (2005).  I
haven't looked at this in depth, but it would seem to conform with
Eviews, etc., and not with fArma, etc., as you mentioned.

      I haven't done a substantive literature search on this, but if
anyone has evidence bearing on this issue beyond the original Ljung-Box
paper, I'd like to know.

      Hope this helps.
      Spencer Graves

michal miklovic wrote:
>  Hi,
>
> I would like to ask/clarify how should degrees of freedom (and p-values) for the Ljung-Box Q-statistics in arma and garch models be computed. The reason for the question is that I have encountered two different approaches. Let us say we have an arma(p,q) garch(m,n) model. The two approaches are as follows:
>
> 1) In R and fArma and fGarch packages, the arma and garch orders are disregarded in the computation of degrees of freedom for the Ljung-Box (LB) Q-statistics. In other words, regardless of p, q, m and n, the LB Q-statistic computed from the first x autocorrelations of (squared) standardised residuals has x degrees of freedom. Given the statistic and degrees of freedom, the corresponding p-value is computed.
>
> 2) In EViews, TSP and other statistical software, the LB Q-statistic computed from the first x autocorrelations of standardised residuals has (x - (p+q)) degrees of freedom. Degrees of freedom and p-values are not computed for the first (p+q) LB Q-statistics. A similar method is applied to squared standardised residuals: the LB Q-statistic computed from the first x autocorrelations
> of squared standardised residuals has (x - (m+n)) degrees of freedom.
> Degrees of freedom and p-values are not computed for the first (m+n) LB
> Q-statistics.
>
> I think the second approach is better because the first (p+q) orders in standardised residuals and the first (m+n) orders in squared standardised residuals should not exhibit any pattern and higher orders should be checked for any remaining arma and garch structures. Am I right or wrong?
>
> Thanks for answers and suggestions.
>
> Best regards
>
> Michal Miklovic
>
>
>
>
>
>       ____________________________________________________________________________________
> Be a better friend, newshound, and 
>
>
> 	[[alternative HTML version deleted]]
>
> _______________________________________________
> R-SIG-Finance at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only. 
> -- If you want to post, subscribe first.
>



More information about the R-SIG-Finance mailing list