hi all,
i'm student, and it's the firts time that y will use eviews.
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
thinks in advance for your help, i rearly need it.
Estimation of Egach model
Moderators: EViews Gareth, EViews Moderator
Re: Estimation of Egach model
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
thxs in advance
Re: Estimation of Egach model
no body have any idea about the estmation of the ngarch with eviews
Re: Estimation of Egach model
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
Re: Estimation of Egach model
thx a lot,
your code works with my data, i just changed two specification about the sample,
thank you again and again
saloua
your code works with my data, i just changed two specification about the sample,
thank you again and again
saloua
Who is online
Users browsing this forum: No registered users and 30 guests