Page 1 of 1

How to get conditional variance & autocorrelation in GARCH?

Posted: Mon Mar 07, 2016 7:43 am
by Aixia_Mei
Hi Tom,

Can I ask whether the "set v = %variance" and its corresponding series in the views-series window is the conditional variance in the GARCH model? And how to get the result of conditional auto-correlation in GARCH model?

Many thanks,
Aixia

Code: Select all

OPEN DATA "C:\Users\Laptop\Desktop\A-share Index"
DATA(FORMAT=XLS,ORG=OBS)
CALENDAR(I)
compute gstart=1,gend=%ALLOCEND()
************
set r1 = P
************
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 *

Re: How to get conditional variance & autocorrelation in GAR

Posted: Mon Mar 07, 2016 9:00 am
by TomDoan
What do you mean by the conditional autocorrelation? The residuals are supposed to be serially uncorrelated.

Re: How to get conditional variance & autocorrelation in GAR

Posted: Mon Mar 07, 2016 12:07 pm
by Aixia_Mei
Hi Tom,

What I mean is the conditional return auto-correlation, which here in my case is the value of b2+b3*v. And can I ask again the first question whether the time series of %varince is the conditional variance? If so, I acutally can calculate its value simply in excel.

Regards

Re: How to get conditional variance & autocorrelation in GAR

Posted: Mon Mar 07, 2016 12:31 pm
by TomDoan
The series V is already the conditional variance. And

set arcoeff = b2+b3*v

will give you the time-varying autoregressive coefficients. Those are not conditional autocorrelations since V is entering into the mean equation.

Re: How to get conditional variance & autocorrelation in GAR

Posted: Mon Mar 07, 2016 12:54 pm
by Aixia_Mei
Hi Tom, I've been trying to write it in this way, but when I check its value in the view-series window, it shows no data of this variable...

Re: How to get conditional variance & autocorrelation in GAR

Posted: Mon Mar 07, 2016 2:29 pm
by TomDoan
What I described seems to work properly. You would have to show me what you did that didn't work.