[R-SIG-Finance] ugarchfit() ARCH LM tests contradict ArchTest()?

alexios alexios at 4dscape.com
Sat Feb 11 23:07:22 CET 2012


Hi Brian,

Testing on the ARMA (or other filtration) residuals should be done prior 
to the estimation to test for the presence of ARCH effects. Once a GARCH 
model is fitted, then you need to incorporate this information by using 
the residuals standardized by the conditional sigma of the GARCH model. 
The details of all tests used in the rugarch package are detailed in the 
vignette.

Regards,
Alexios

On 11/02/2012 21:58, Brian Askins wrote:
> Thank you for posting that, Alexios. I was working on code for an
> example (because my current code is homework code so I cannot post it)
> but you showed me what was different. I was doing the ArchTest on the
> residuals, not the standardized residuals. This makes much more sense now.
>
> My apologies for not including code in the first post, I'll be sure to
> include a working example in all future posts.
>
> Thanks again everyone, I'll let the other people in my class know what
> was going on with this.
>
> --Brian
>
> On Sat, Feb 11, 2012 at 1:45 PM, alexios <alexios at 4dscape.com
> <mailto:alexios at 4dscape.com>> wrote:
>
>     I find that they agree completely:
>
>     library(rugarch)
>     data(dji30ret)
>     fit = ugarchfit(ugarchspec(),__dji30ret[,1])
>
>     # The ARCH LM Test on the squared standardized residuals shows:
>     ARCH LM Tests
>     ------------------------------__------
>                  Statistic DoF P-Value
>     ARCH Lag[2]     0.6795   2  0.7119
>     ARCH Lag[5]     1.9091   5  0.8616
>     ARCH Lag[10]    4.2709  10  0.9343
>
>     z = residuals(fit)/sigma(fit)
>
>     library(FinTS)
>     ArchTest(z, 2)
>     Chi-squared = 0.6795, df = 2, p-value = 0.7119
>     ArchTest(z, 10)
>     Chi-squared = 4.2709, df = 10, p-value = 0.9343
>
>     i.e. EXACTLY the same.
>
>     Regards,
>     Alexios
>
>
>     On 11/02/2012 21:14, Brian G. Peterson wrote:
>
>         On Sat, 2012-02-11 at 12:50 -0800, Brian Askins wrote:
>
>             Hello all,
>
>             My name is Brian Askins and I'm a student at the University
>             of Washington
>             currently working on an M.S. in computational finance. Our
>             current homework
>             is to fit a few GARCH models and do some diagnostic tests on
>             them, one of
>             which is an LM test on the residuals to make sure there is
>             no more
>             autocorrelation among them. If I use the ArchTest() function
>             from the FinTS
>             package the results make sense and match (to a degree of
>             error) a manual
>             test that I coded to check this. However, the results from
>             that are
>             completely different from the results shown in the output of
>             ugarchfit()
>             under the section "ARCH LM Tests." This also confused other
>             people in the
>             class, including the TA. So can anyone tell me a little more
>             information
>             about this discrepancy? I can't find any information on the
>             LM test
>             performed in ugarchfit() from any of the documentation in
>             the rugarch
>             package. Any help or pointers on where to find this
>             information would be
>             greatly appreciated! Thanks!
>
>
>         Brian,
>
>         It would help everyone out if you followed the posting guide and
>         took
>         some time to create a reproducible example that demonstrates
>         what you're
>         talking about.  From your question, you've obviously already
>         written the
>         code, and the data is probably readily available, so roll it up,
>         comment
>         it, and be specific about the differences that are confusing you.
>
>         Regards,
>
>             - Brian
>
>
>



More information about the R-SIG-Finance mailing list