output gap estimation

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

hawa.dl
Posts: 5
Joined: Thu Apr 02, 2015 7:00 am

output gap estimation

Postby hawa.dl » Fri Jun 05, 2015 12:05 am

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!

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

Re: output gap estimation

Postby trubador » Tue Jun 09, 2015 6:43 am

Have you searched the forum?

hawa.dl
Posts: 5
Joined: Thu Apr 02, 2015 7:00 am

Re: output gap estimation

Postby hawa.dl » Tue Jun 09, 2015 6:47 am

hello
yes i have
for 1) i think i have a solution but anything for the second one!

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

Re: output gap estimation

Postby trubador » Tue Jun 09, 2015 7:18 am

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)

hawa.dl
Posts: 5
Joined: Thu Apr 02, 2015 7:00 am

Re: output gap estimation

Postby hawa.dl » Tue Jun 09, 2015 7:59 am

thank you very much trubador, i am going to try it!

hawa.dl
Posts: 5
Joined: Thu Apr 02, 2015 7:00 am

Re: output gap estimation

Postby hawa.dl » Mon Jun 15, 2015 1:22 am

hi

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)
but it doesn't works i think it's not the appropriate code could you help me please. thank you

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

Re: output gap estimation

Postby trubador » Mon Jun 15, 2015 2:49 am

Yes, the syntax is incorrect. Unfortunately, EViews currently does not have any Bayesian treatment of state space models.

hawa.dl
Posts: 5
Joined: Thu Apr 02, 2015 7:00 am

Re: output gap estimation

Postby hawa.dl » Mon Jun 15, 2015 3:05 am

ooh too bad for me
thank you trubador for answering! have you an another software to suggere me ? thank you


Return to “Estimation”

Who is online

Users browsing this forum: No registered users and 2 guests