Hi everyone !
I'm new to eviews and i want to incorporate fianancials variables in the estimation of US output gap by using the kalman filter with the multivariate unobserved components models (harvey 1989). I have 2 variables sp500 and credit growth rate . For the sp500 i write this code after decomposed it in cycle and trend and i write this code and it's works.
1980Q1 to 2014Q4
'definition des équations de signal
@signal log(gdp)*100 = sv1 + sv2
@signal log(sp_tr)*100= sv4 +sv5
'décompostion PIB (y)
@state sv1 = c(1) + sv1(-1) + [var = exp(c(2))]
@state sv2 = c(3)*sv2(-1) + c(4)*sv3(-1)+c(5)*sv5(-1)+[var=exp(c(6))]
@state sv3 = sv2(-1)
'decomposition sp500
@state sv4=c(7)+sv4(-1) + [var = exp(c(8))]
@state sv5 =c(9)*sv5(-1)+ c(10)*sv6(-1) + [var = exp(c(11))]
@state sv6 = sv5(-1)
param c(1) 0 c(2) 0.8 c(3) 1.05 c(4) -0.3 c(5) -0.3 c(6) -0.8 c(7) 3.96 c(8) 1 c(9) 1.01 c(10) -0.3 c(11) 3
Now i want to introduce the credit growth rate, how can i rewrite the code because unlike the sp500 it's stationnary and if i m not wrong i don't have to decompose it on trend and cycle?
2) I also want to estimate a second model usig the kalman filter again in order to make a comparison following this paper
https://ideas.repec.org/p/bis/biswps/404.html
The equations are:
y is the output and y* the potential output gap
∆y(t) = ∆y(t-1)+ ε(0,t)
Y(t)- Y*(t) = β( Y(t-1) - Y*(t-1) ) + γ(1) ∆sp(t-k_sp ) + γ(2)∆cred(t-k_cred ) +ε(1,t)
and i am wondering how can i estimate it in sspace did anyone knew the code . Thank you for your help!
best regards!
output gap estimation
Moderators: EViews Gareth, EViews Moderator
Re: output gap estimation
Have you searched the forum?
Re: output gap estimation
hello
yes i have
for 1) i think i have a solution but anything for the second one!
yes i have
for 1) i think i have a solution but anything for the second one!
Re: output gap estimation
Code: Select all
@signal y = ystar + c(2)*(y(-1)-ystar1) + c(3)*d(sp(?)) + c(4)*d(cr(?)) + [var=1600*exp(c(1))]
@state ystar = ystar(-1) + dystar(-1)
@state dystar = dystar(-1) + [var=exp(c(1))]
@state ystar1 = ystar(-1)Re: output gap estimation
thank you very much trubador, i am going to try it!
Re: output gap estimation
hi
if i want to introduce a bayesian approach with gamma distributed priors on the parameters and i write this code
but it doesn't works i think it's not the appropriate code could you help me please. thank you
if i want to introduce a bayesian approach with gamma distributed priors on the parameters and i write this code
Code: Select all
'borio
@signal log(gdp)*100 = gdp_trend + c(2)*(gdp(-1) - gdp_trend1) + c(3)*d(cred(-1)) + [var=lambda*exp(c(1))]
@state gdp_trend = gdp_trend (-1) + dgdp_trend (-1)
@state dgdp_trend = dgdp_trend (-1) + [var=exp(c(1))]
@state gdp_trend1 =gdp_trend (-1)
@param c(1) -1 c(2)@rgamma (0.70,0.3) c(2)@rgamma(0.3,0.3)
Re: output gap estimation
Yes, the syntax is incorrect. Unfortunately, EViews currently does not have any Bayesian treatment of state space models.
Re: output gap estimation
ooh too bad for me
thank you trubador for answering! have you an another software to suggere me ? thank you
thank you trubador for answering! have you an another software to suggere me ? thank you
Who is online
Users browsing this forum: No registered users and 2 guests
