Hi all,
I would like to estimate the following model within EGARCH framework.
change in prices = constant + a1*X1*(1 + g1*Dummy1+ g2*Dummy2) + a2*X2*(1 + g1*Dummy1+ g2*Dummy2) + a3*X3*(1 + g1*Dummy1+ g2*Dummy2)
log(variance) = constant + USUAL VOLATILITY TERMS + b1*X1*(1 + gamma1*Dummy1+ gamma2*Dummy2) + b2*X2*(1 + gamma1*Dummy1+ gamma2*Dummy2) + b3*X3*(1 + gamma1*Dummy1+ gamma2*Dummy2)
where a1, a2, a3, b1, b2 ,b3 , g1 and g2 are coefficients to be estimated. a1 to b3 varies for regressors and g1, g2 , gamma1 and gamma2 are the same for subperiods, Dummy1 and 2 indicate dates.
Is it possible/makes sense to estimate such model with additional nonlinear terms? How can I add the nonlinear terms in the conditional variance equation?
Looking forward for discussion.
Thanks & best
additional nonlinear terms in EGARCH model
Moderators: EViews Gareth, EViews Moderator
Re: additional nonlinear terms in EGARCH model
Hi all,
I have tried to code the above model and estimate it using ml.
However, eviews tells me that
" Illegal lag or index specification for coefficient A0 in "RES =
Y - A0 - BE(1)*X1*(1- GAM(1)*Dummy - GAM(2)*" in "DO_ EGARCH.ML
(SHOWOPTS, M=800, C=0.0001)".
As this part of estimation is really important to me... I would appreciate any suggestion.
Thanks!
I have tried to code the above model and estimate it using ml.
Code: Select all
''' declare starting value from existing nln-linear estimation
equation nls_eq.ls y= c+ a1*X1*(1 + g1*Dummy1+ g2*Dummy2) + a2*X2*(1 + g1*Dummy1+ g2*Dummy2) + a3*X3*(1 + g1*Dummy1+ g2*Dummy2)
coef(1) const = nls_eq.@coefs(1)
coef(2) gam
gam(1) = nls_eq.@coefs(3)
gam(2) = nls_eq.@coefs(4)
coef(15) be
be(2) = nls_eq.@coefs(5)
be(3) = nls_eq.@coefs(6)
''' get starting value from an existing egarch(2,1) model
equation start.arch(2, 1, asy=1, egarch) y= c+ a1*X1*(1 + g1*Dummy1+ g2*Dummy2) + a2*X2*(1 + g1*Dummy1+ g2*Dummy2) + a3*X3*(1 + g1*Dummy1+ g2*Dummy2)
coef(1) a1 = start.@coefs(7) ' the deterministic term
coef(2) alpha
alpha(1) = start.@coefs(8)
alpha(2) = start.@coefs(9)
coef(1) lambda = start.@coefs(10) ' coefficient for the leverage effect
coef(1) bet = start.@coefs(11)
''' starting value for coeffecients in the variance equation are simply set to existing value of coeffs from the initial nls_eq
coef(15) b
b(1) = be(1)
b(2) = be(2)
b(3) = be(3)
b(4) = be(4)
b(5) = be(5)
b(6) = be(6)
b(7) = be(7)
coef(2) g
gamma(1) = gam(1)
gamma(2) = gam(2)
' set presample values of expressions in logl
smpl @first+1 @first+1
series sig2 = nls_eq.@se ' starting value for the variance is set to regression standard error of nls_eq
''' set up EGARCH likelihood
logl egarch
egarch.append @logl logl
egarch.append res = y - a0 - be(1)*X1*(1- gam(1)*Dummy1 - gam(2)*Dummy2) - be(2)*X2*(1- gam(1)*Dummy1 - gam(2)*Dummy2) - be(3)*X3*(1- gam(1)*Dummy1 - gam(2)*Dummy2)
egarch.append log(sig2) = a1 + alpha(1)*ABS(res(-1)/@SQRT(sig2(-1))) + alpha(2)*ABS(res(-2)/@SQRT(sig2(-2))) + lambda*res(-1)/@SQRT(sig2(-1)) + bet*LOG(sig2(-1)) + b(1)*X1*(1+ gamma(1)*Dummy1 + gamma(2)*Dummy2) + b(2)*X2*(1+ gamma(1)*Dummy1+ gamma(2)*Dummy2) + b(3)*X3*(1+ gamma(1)*Dummy1 + gamma(2)*Dummy2)
egarch.append logl = log(@dnorm(res/@sqrt(sig2))) - log(sig2)/2
''' estimate and display results
smpl @first+1 @last
egarch.ml(showopts, m=800, c=0.0001)
show egarch.output
smpl @all
" Illegal lag or index specification for coefficient A0 in "RES =
Y - A0 - BE(1)*X1*(1- GAM(1)*Dummy - GAM(2)*" in "DO_ EGARCH.ML
(SHOWOPTS, M=800, C=0.0001)".
As this part of estimation is really important to me... I would appreciate any suggestion.
Thanks!
Last edited by Gin on Tue Nov 29, 2016 12:13 pm, edited 1 time in total.
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13600
- Joined: Tue Sep 16, 2008 5:38 pm
Re: additional nonlinear terms in EGARCH model
Have you defined a0 anywhere?
If it is defined as a coef, you probably need a0(1)
If it is defined as a coef, you probably need a0(1)
Re: additional nonlinear terms in EGARCH model
Hi Gareth,
thanks for replying. I also just have figured it out..
However, now I have another problem when running the above code.
eview tells me
"Missing values in @LOGL series at current coefficients at
observation 12/17/2008 in "DO_ EGARCH.ML(SHOWOPTS,
M=800, C=0.0001)".
"
Have I missed sth in the part of presample value setting?
I've checked the coefficients they are all properly set... Can you give me a hint of what could be wrong?
Another quick question, is it possible to directly specifiy nonlinear terms within " equation egarch.arch ... " in the mean and variance equation?
Thanks & best
thanks for replying. I also just have figured it out..
However, now I have another problem when running the above code.
eview tells me
"Missing values in @LOGL series at current coefficients at
observation 12/17/2008 in "DO_ EGARCH.ML(SHOWOPTS,
M=800, C=0.0001)".
"
Have I missed sth in the part of presample value setting?
Code: Select all
' set presample values of expressions in logl
smpl @first+1 @first+1 ' very first obs is NA
series sig2 = nls_eq.@se ' starting value for the variance is set to regression standard error of nls_eq
Another quick question, is it possible to directly specifiy nonlinear terms within " equation egarch.arch ... " in the mean and variance equation?
Thanks & best
-
EViews Glenn
- EViews Developer
- Posts: 2682
- Joined: Wed Oct 15, 2008 9:17 am
Re: additional nonlinear terms in EGARCH model
In the mean, yes. In the variance, no.
Return to “Econometric Discussions”
Who is online
Users browsing this forum: No registered users and 1 guest
