AR(1)-GARCH(1,1) PROGRAM TO EVALUATE ADF TEST

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt

FASTONE
Posts: 6
Joined: Sun Sep 23, 2012 3:56 pm

AR(1)-GARCH(1,1) PROGRAM TO EVALUATE ADF TEST

Postby FASTONE » Sun Oct 28, 2012 11:00 am

i want a program to test the power and empiric size of the ADF Test for a GARCH(1,1)
y_t = θ*y_(t-1) + μ_t
μ_t = v_t *√(h_t )
h_t = [α_0 + α_1*μ_(t-1)^2 ] + [β*h_(t-1) ]

for θ = {0.90,0.95,0.99,0.995,1.00}
α_0 = 1 - α_1 - β

do 1000 repetitions for the next sample sizes 100, 200 and 500 observations

the objective is evaluate the effect of the GARCH component
then i get to do every case considering (α_1 + β)={0.90, 0.95, 0.99, 0.995}

i start with a couples of papers
and wrote this but i am not sure is good, besides is incomplete yet, and
y need report the results in tables like this or by separate and i am exausted :(

T 100 200 500
α_1,β phi phi phi
{. . .} {. . .} {. . .}

I need helppp!!!!!!
Please

Here what i get until now:
(you`ll see it's only for a size of 1000 and well you know what i need is more than that)


' new workfile created called DF_SIMULATION, undated with 1000 observations
workfile DF_SIMULATION u 1000

'declarando variables'

rndseed 12345

series v
series u

series t1
series t2
series t3
series t4
series t5

scalar k11
scalar k12
scalar k13

scalar k21
scalar k22
scalar k23

scalar k31
scalar k32
scalar k33

scalar k41
scalar k42
scalar k43

scalar k51
scalar k52
scalar k53

series h 'por verificar'
scalar a1
scalar b

'Fijando características del experimento'

!nreps = 1000
!nobs = 1000

!phi1=0.90
!phi2=0.95
!phi3=0.99
!phi4=0.995
!phi5=1.00

!a0=0.5
!d1=0.90
!d2=0.95
!d3=0.99
!d4=0.995


for !repc=1 to !nreps
smpl @first @first
series y1 = 0
series y2 = 0
series y3 = 0
series y4 = 0
series y5 = 0

'----------------------------------------------------------------'

smpl @first+1 !nobs+200
genr v=(1*nrnd)
h=(!a0/(1-!d1))
genr u=v*(h^0.5)
series y1 = !phi1*y1(-1)+u
series dy1 = y1 - y1(-1)
smpl @first+200 !nobs+200

equation eq1.arch(1, 1) dy1 c y1(-1)
t1(!repc)=@tstats(2)

'----------------------------------------------------------------'

smpl @first+1 !nobs+200
genr v=(1*nrnd)
h=(!a0/(1-!d1))
genr u=v*(h^0.5)
series y2 = !phi1*y2(-1)+u
series dy2 = y2 - y2(-1)
smpl @first+200 !nobs+200

equation eq2.arch(1, 1) dy2 c y2(-1)
t2(!repc)=@tstats(2)

'----------------------------------------------------------------'

smpl @first+1 !nobs+200
genr v=(1*nrnd)
h=(!a0/(1-!d1))
genr u=v*(h^0.5)
series y3 = !phi1*y3(-1)+u
series dy3 = y3 - y3(-1)
smpl @first+200 !nobs+200

equation eq3.arch(1, 1) dy3 c y3(-1)
t3(!repc)=@tstats(2)

'----------------------------------------------------------------'

smpl @first+1 !nobs+200
genr v=(1*nrnd)
h=(!a0/(1-!d1))
genr u=v*(h^0.5)
series y4 = !phi1*y4(-1)+u
series dy4 = y4 - y4(-1)
smpl @first+200 !nobs+200

equation eq4.arch(1, 1) dy4 c y4(-1)
t4(!repc)=@tstats(2)

'----------------------------------------------------------------'

smpl @first+1 !nobs+200
genr v=(1*nrnd)
h=(!a0/(1-!d1))
genr u=v*(h^0.5)
series y5 = !phi1*y5(-1)+u
series dy5 = y5 - y5(-1)
smpl @first+200 !nobs+200

equation eq5.arch(1, 1) dy5 c y5(-1)
t5(!repc)=@tstats(2)

'----------------------------------------------------------------'
'@tstats(2) kiere decir estadistico t para el coeficiente 2, es decir'
'asociado a la variable 2'


next
smpl @first !nreps

k11=@quantile(t1,0.01) 'nivel de significancia del 1%'
k12=@quantile(t1,0.05) 'nivel de significancia del 5%'
k13=@quantile(t1,0.1) 'nivel de significancia del 10%'

k21=@quantile(t2,0.01)
k22=@quantile(t2,0.05)
k23=@quantile(t2,0.1)

k31=@quantile(t3,0.01)
k32=@quantile(t3,0.05)
k33=@quantile(t3,0.1)

k41=@quantile(t4,0.01)
k42=@quantile(t4,0.05)
k43=@quantile(t4,0.1)

k51=@quantile(t5,0.01)
k52=@quantile(t5,0.05)
k53=@quantile(t5,0.1)

FASTONE
Posts: 6
Joined: Sun Sep 23, 2012 3:56 pm

Re: AR(1)-GARCH(1,1) PROGRAM TO EVALUATE ADF TEST

Postby FASTONE » Thu Nov 01, 2012 11:25 pm

noone??????


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests