Model AR(1) - GARCH(1,1) Code
Posted: Wed Jan 13, 2016 8:21 am
Hi !
I'm new on Eviews and I don't know how to program with.
I try to program a model ar(1) garch(1,1), but it doesn't work.
My code is :
Thanks you for your help :D
I'm new on Eviews and I don't know how to program with.
I try to program a model ar(1) garch(1,1), but it doesn't work.
My code is :
Code: Select all
' number of experiments
!M = 1000
!N = 132 ' historical period
!H = 20 ' forecast period
!nn = !n + !h
!k =4 'number of coefficients + ar terms
'Paramètre de AR(1)
!p1 = 0.38
'constant
!B0 = 0
'coeffient for X1
!B1 = 0.07
'coefficient for X2
!B2 = 1.07
Workfile TimeSeries u !nn
'declare objects to be used in simulations
equation e1
'run simulations
for !sim=1 to !m
'create error term
series u = nrnd
smpl @first+2 @last
series u = !B2*nrnd^2 + !B1*u(-1)
'create y series
series y= nrnd
smpl @first+2 @last
series y =!B1*y(-1) + u(!sim)
'estimate equation
'smpl @first !n
'e1.arch y x1 x2 ar(1)
'make forecast
'smpl !n+1 @last
'e1.forecast yf
next