[HELP] Positive feedback model in EVIEWS

For questions regarding programming in the EViews programming language.

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

nicholasgz
Posts: 3
Joined: Sat Dec 12, 2009 12:08 am

[HELP] Positive feedback model in EVIEWS

Postby nicholasgz » Sat Dec 12, 2009 1:11 am

Hi everyone! I am a undergraduate student who just get access to eviews programming.
Now I am working on a model about positive feedback, which is a TGARCH-M model.
However, as a new user of EVIEWS programming, I can not finish the complicate model by myself, and I need some help from experts like you :)
Here are the models of positive feedback:
y = C(1)*GARCH + C(2) + C(3)*y(-1) + C(4) * y(-1) *GARCH
GARCH = C(4) + C(5)*RESID(-1)^2 + C(6)*RESID(-1)^2*(RESID(-1)<0) + C(7)*GARCH(-1)
Here, y means the daily return of the stock, GARCH stands for the variance of y. And (resid(-1)<0) means when resid(-1) is below zero, (resid(-1)<0) will be 1, this is the threshold.

Here are the code I write, which is kind of naive...I really need your help.

sample s1 4 1011
sample s0 3 4
smpl s1



coef(1) mu = .1
coef(4) omega = .1
coef(4) alpha = .1

equation eq1.ARCH(THRSH=1,ARCHM=VAR,DERIV=AA) y C y(-1)
omega(1) = eq1.c(1)
omega(2) = eq1.c(2)
omega(3) = eq1.c(3)
alpha(1) = eq1.c(4)
alpha(2) = eq1.c(5)
alpha(3) = eq1.c(6)
alpha(4) = eq1.c(7)
mu(1) = eq1.@se^2


' set presample values of expressions in logl
smpl s0
series sig2 = mu(1)
series resma = resid

' set up GARCH likelihood
logl ll1
ll1.append @logl logl
ll1.append res = y - omega(1)*sig2 - omega(2) - omega(3)*y(-1) - omega(4)*y(-1)*sig2
ll1.append resma = res
ll1.append sig2 = alpha(1)+ alpha(2)*resma(-1)^2 + alpha(3)*resma(-1)^2*(resma(-1)<0) +alpha(4)*sig2(-1)
ll1.append z = resma/@sqrt(sig2)
ll1.append logl = log(@dnorm(z)) - log(sig2)/2

' estimate and display results
smpl s1
ll1.ml(showopts, m=1000, c=1e-5)
show ll1.output
_______________________________________END
In fact, I really don't know how to get it done, I think it is far from finished.
Thank you very much for your valuable time!

Nicholas
Last edited by nicholasgz on Sun Dec 13, 2009 9:46 pm, edited 2 times in total.

nicholasgz
Posts: 3
Joined: Sat Dec 12, 2009 12:08 am

Re: [HELP] Positive feedback model in EVIEWS

Postby nicholasgz » Sun Dec 13, 2009 9:45 pm

Any expert in EVIEWS can help?
The first step in EVIEWS PROGRAMING is really tough, especially for this complicated model

nicholasgz
Posts: 3
Joined: Sat Dec 12, 2009 12:08 am

Re: [HELP] Positive feedback model in EVIEWS

Postby nicholasgz » Mon Dec 14, 2009 3:05 am

Finally, I got it with the help of our professor.
Thank you all the same!


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 1 guest