Estimation of Egach model

For technical questions regarding estimation of single equations, systems, VARs, Factor analysis and State Space Models in EViews. General econometric questions and advice should go in the Econometric Discussions forum.

Moderators: EViews Gareth, EViews Moderator

saloua
Posts: 4
Joined: Tue Apr 28, 2009 2:39 pm

Estimation of Egach model

Postby saloua » Wed Apr 29, 2009 4:35 am

hi all,
i'm student, and it's the firts time that y will use eviews. :shock:
i have a problem with the estimation of ngarch model, so please any help or response to my question is a big pleasure to me
i have a serie of the S&P500 return, i have to estimate using the model bolow, the garch model with everage effect (precisely with the ngarch model)
Rt= µ +ϭt*zt
ϭt+1= ω+α*(R(t-1) - ϴ*ϭ(t-1))^2+β*ϭ^2(t-1)

but whith eviews, the ngarch model is not availible, so i have to programme it. i don't have any idea how to do it :cry:

thinks in advance for your help, i rearly need it.

saloua
Posts: 4
Joined: Tue Apr 28, 2009 2:39 pm

Re: Estimation of Egach model

Postby saloua » Wed Apr 29, 2009 5:03 am

sorry i made a mistake on the title of the object, it's about de the estimation of the ngarch model and not the egrach.
thxs in advance

saloua
Posts: 4
Joined: Tue Apr 28, 2009 2:39 pm

Re: Estimation of Egach model

Postby saloua » Wed Apr 29, 2009 9:33 am

no body have any idea about the estmation of the ngarch with eviews :cry:

trubador
Did you use forum search?
Posts: 1518
Joined: Thu Nov 20, 2008 12:04 pm

Re: Estimation of Egach model

Postby trubador » Thu Apr 30, 2009 1:41 pm

Try the following piece of code. Just copy and paste it into a new programming window and run it. Estimation of such models is not an easy task. You may encounter some difficulties during the estimation arising from either the data properties or the specification of the likelihood. You can change/modify the code freely to overcome such issues.

Code: Select all

' declare coefficient vectors
coef(1) mu
coef(1) omega
coef(1) alpha
coef(1) theta
coef(1) beta


' get starting values from a regular GARCH model
'(absolute values are to ensure the nonnegativity of cond. variance process)
equation start.arch(m=100,c=1e-6) r c
mu(1) = start.@coefs(1)
omega(1) = @abs(start.@coefs(2))
alpha(1) = @abs(start.@coefs(3))
beta(1) = @abs(start.@coefs(4))
theta(1) = @sqrt(((1-beta(1))/alpha(1))-1)

' set presample values of expressions in logl
smpl @first @first
series sigt = omega(1)


' set up NGARCH likelihood
logl ngarch
ngarch.append @logl logl
ngarch.append res = r-mu(1)
ngarch.append sigt = omega(1) + alpha(1)*(r(-1) - theta(1)*@sqrt(sigt(-1)))^2 + beta(1)*sigt(-1)
ngarch.append logl =  log(@dnorm(res/@sqrt(sigt))) - log(sigt)/2


' estimate and display results
smpl @first+1 @last
ngarch.ml(showopts, m=1000, c=1e-6)
show ngarch.output

smpl @all

saloua
Posts: 4
Joined: Tue Apr 28, 2009 2:39 pm

Re: Estimation of Egach model

Postby saloua » Thu Apr 30, 2009 5:23 pm

thx a lot,
your code works with my data, i just changed two specification about the sample,

thank you again and again :)
saloua


Return to “Estimation”

Who is online

Users browsing this forum: No registered users and 30 guests