Can we get the sig level of autocorrelations in the LB test?

Discussions of ARCH, GARCH, and related models
Aixia_Mei
Posts: 29
Joined: Wed Dec 03, 2014 7:16 pm

Can we get the sig level of autocorrelations in the LB test?

Unread post by Aixia_Mei »

Hi Tom,

I am wondering how can I find the significance level of the results of autocorrelation in the returns' time series which Ljung-Box test gives to me in a GARCH model?

Regards


My codes are as follows:

Code: Select all

OPEN DATA "C:\Users\aixia\Desktop\46+2 individual price - Copy"
DATA(FORMAT=XLS,ORG=OBS)
CALENDAR(I)
compute gstart=1,gend=%ALLOCEND()
***************
dec vector myresults(10)
do i=1,10
set r1 = %s("N"+i)
*
nonlin b0 b1 b2 b3 a0 a1 a2 nu
compute nu=10.0
stat(NOPRINT) r1
*
set v = %variance
set u = 0.0
frml et = r1-b0-b1*v-(b2+b3*v)*r1{1}
frml ht = a0+a1*u{1}**2+a2*v{1}

***with t distributed errors
frml Lt = (v(t)=ht(t)), (u(t)=et(t)),%LOGTDENSITY(v,u,nu)
linreg(noprint) r1; # constant r1{1}
compute b0=%beta(1), b1=0.0, b2=%beta(2), b3=0.0
compute a0=%seesq, a1=.09781, a2=.83756
nlpar(subiter=250)

****************
maximize(method=bfgs,robust,recursive,iter=500) Lt 2 *

**Compute the standardized residuals
set z1 = u(t)/sqrt(v(t))
**Compute the squared standardized residuals
set z1sq = u(t)*u(t)/v(t)

**Compute the residual diagnostics
**basic statistics

extremum r1

statistics z1
statistics z1sq

**LB(4,8,12) autocorrelation Q stat
corr(qstats,number=12,span=4,dfc=3) z1
corr(qstats,number=12,span=4,dfc=3) z1sq

**ARCH(12) tests
@archtest(lags=12,span=1,dfc=0,form=LM) r1
**************
end do i
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Can we get the sig level of autocorrelations in the LB t

Unread post by TomDoan »

I'm not sure what you mean. Isn't the LB test a test of the significance of the autocorrelations? If you're looking for individual autocorrelations, use @REGCORRS (as is done in, for instance, the garchuv.rpf example). There is no specific asymptotic distribution for the individual autocorrelations when you have a mean model which has lagged dependent variables, but the 1/sqrt(# of obs) approximate standard error is still a reasonable gauge.
Post Reply