state space 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

alberto
Posts: 4
Joined: Tue Aug 02, 2011 9:33 am

state space estimation

Postby alberto » Fri Mar 23, 2012 7:23 am

Hi, I'm tring to replicate the paper:" The Macroeconomy and the yield curve: a dynamic latent factor approach", in which the yield curve is summarized using latent factors (level=sv1, slope=sv2 and curvature=sv3). I have no estimation problems with the first specification, only with latent factor:

@signal y_3 =sv1+(( 1-exp(-c(28)*3)) / (c(28)*3))*sv2+((( 1-exp(-c(28)*3)) / (c(28)*3)) - ( exp(-c(28)*3)))*sv3+[ename=e_3]
@signal y_12=sv1+(( 1-exp(-c(28)*12))/(c(28)*12))*sv2+((( 1-exp(-c(28)*12))/(c(28)*12))-( exp(-c(28)*12)))*sv3+[ename=e_12]
@signal y_24=sv1+(( 1-exp(-c(28)*24))/(c(28)*24))*sv2+((( 1-exp(-c(28)*24))/(c(28)*24))-( exp(-c(28)*24) ))*sv3+[ename=e_24]
@signal y_36 =sv1+(( 1-exp(-c(28)*36))/(c(28)*36))*sv2+((( 1-exp(-c(28)*36))/(c(28)*36))-(exp(-c(28)*36)))*sv3+[ename=e_36]
@signal y_60 =sv1+((1-exp(-c(28)*60))/(c(28)*60))*sv2+((( 1-exp(-c(28)*60))/(c(28)*60))-( exp(-c(28)*60)))*sv3+[ename=e_60]
@signal y_84 =sv1+(( 1-exp(-c(28)*84))/(c(28)*84))*sv2+((( 1-exp(-c(28)*84))/(c(28)*84))-( exp(-c(28)*84) ))*sv3+[ename=e_84]
@signal y_120=sv1+(( 1-exp(-c(28)*120))/(c(28)*120))*sv2+((( 1-exp(-c(28)*120))/(c(28)*120))-( exp(-c(28)*120)))*sv3+[ename=e_120]
@signal y_360=sv1+(( 1-exp(-c(28)*360))/(c(28)*360))*sv2+((( 1-exp(-c(28)*360))/(c(28)*360))-( exp(-c(28)*360)))*sv3+[ename=e_360]

@state sv1 = c(10) + c(1)*( sv1(-1) - c(10) ) + c(2)*( sv2(-1) - c(11) ) + c(3)*( sv3(-1) - c(12) ) + [ename=ni_l]
@state sv2 = c(11) + c(4)*( sv1(-1) - c(10) ) + c(5)*( sv2(-1) - c(11) ) + c(6)*( sv3(-1) - c(12) ) + [ename=ni_s]
@state sv3 = c(12) + c(7)*( sv1(-1) - c(10) ) + c(8)*( sv2(-1) - c(11) ) + c(9)*( sv3(-1) - c(12) ) + [ename=ni_c]

@evar var(ni_l)=exp(c(13))
@evar var(ni_s)=exp(c(14))
@evar var(ni_c)=exp(c(15))
@evar cov(ni_l,ni_c)=c(16)
@evar cov(ni_s,ni_c)=c(17)
@evar cov(ni_l,ni_s)=c(18)

@evar var(e_3)=exp(c(19))
@evar var(e_12)=exp(c(21))
@evar var(e_24)=exp(c(22))
@evar var(e_36)=exp(c(23))
@evar var(e_60)=exp(c(24))
@evar var(e_84)=exp(c(25))
@evar var(e_120)=exp(c(26))
@evar var(e_360)=exp(c(27))

When I try to add 3 macro variable Capacity utilization(cu), annual price inflation(cpi) and fed fun rate(fed) in this way:


@state sv1 = c(37) + c(1)*( sv1(-1) - c(37) ) + c(2)*( sv2(-1) - c(38) ) + c(3)*( sv3(-1) - c(39) ) + c(4)*(cu(-1) - c(40)) + c(5)*(fed(-1) - c(41)) + c(6)*(cpi(-1) - c(42)) + [ename=ni_l]
@state sv2 = c(38) + c(7)*( sv1(-1) - c(37) ) + c(8)*( sv2(-1) - c(38) ) + c(9)*( sv3(-1) - c(39) ) + c(10)*(cu(-1) - c(40)) + c(11)*(fed(-1) - c(41)) + c(12)*(cpi(-1) - c(42)) + [ename=ni_s]
@state sv3 = c(39) + c(13)*( sv1(-1) - c(37) ) + c(14)*( sv2(-1) - c(38) ) + c(15)*( sv3(-1) - c(39) ) + c(16)*(cu(-1) - c(40)) + c(17)*(fed(-1) - c(41)) + c(18)*(cpi(-1) - c(42)) + [ename=ni_c]
@state cu = c(40) + c(19)*( sv1(-1) - c(37) ) + c(20)*( sv2(-1) - c(38) ) + c(21)*( sv3(-1) - c(39) ) + c(22)*(cu(-1) - c(40)) + c(23)*(fed(-1) - c(41)) + c(24)*(cpi(-1) - c(42)) + [ename=ni_cu]
@state fed = c(41) + c(25)*( sv1(-1) - c(37) ) + c(26)*( sv2(-1) - c(38) ) + c(27)*( sv3(-1) - c(39) ) + c(28)*(cu(-1) - c(40)) + c(29)*(fed(-1) - c(41)) + c(30)*(cpi(-1) - c(42)) + [ename=ni_fed]
@state cpi = c(42) + c(31)*( sv1(-1) - c(37) ) + c(32)*( sv2(-1) - c(38) ) + c(33)*( sv3(-1) - c(39) ) + c(34)*(cu(-1) - c(40)) + c(35)*(fed(-1) - c(41)) + c(36)*(cpi(-1) - c(42)) + [ename=ni_cpi]

I'm not able to get convergence in the estimation process. Can you help me please?

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13604
Joined: Tue Sep 16, 2008 5:38 pm

Re: state space estimation

Postby EViews Gareth » Fri Mar 23, 2012 7:44 am

We'll probably need to see the workfile.

alberto
Posts: 4
Joined: Tue Aug 02, 2011 9:33 am

Re: state space estimation

Postby alberto » Fri Mar 23, 2012 7:58 am

ok, I have attached the workfile.
nelson_siegel.wf1
(96.81 KiB) Downloaded 394 times

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

Re: state space estimation

Postby trubador » Fri Mar 23, 2012 8:25 am

The model is ill-defined. Those macro variables are observed, so you cannot define them as state variables. However, you can put them into state equations as exogenous variables. If you are trying to build an endogenous relationship between them, you should put them into signal equation. You cannot do both.

Please remember that even if you properly define the model you can still experience estimation problems. You can search the forum for possible solutions and suggestions...

alberto
Posts: 4
Joined: Tue Aug 02, 2011 9:33 am

Re: state space estimation

Postby alberto » Fri Mar 23, 2012 9:17 am

The model is ill-defined. Those macro variables are observed, so you cannot define them as state variables. However, you can put them into state equations as exogenous variables. If you are trying to build an endogenous relationship between them, you should put them into signal equation. You cannot do both.

Please remember that even if you properly define the model you can still experience estimation problems. You can search the forum for possible solutions and suggestions...
So if I decide to put them as exogenous variables I need to define only 3 state equations:


@state sv1 = c(37) + c(1)*( sv1(-1) - c(37) ) + c(2)*( sv2(-1) - c(38) ) + c(3)*( sv3(-1) - c(39) ) + c(6)*(cpi(-1) - c(42)) + [ename=ni_l]
@state sv2 = c(38) + c(7)*( sv1(-1) - c(37) ) + c(8)*( sv2(-1) - c(38) ) + c(9)*( sv3(-1) - c(39) ) + c(12)*(cpi(-1) - c(42)) + [ename=ni_s]
@state sv3 = c(39) + c(13)*( sv1(-1) - c(37) ) + c(14)*( sv2(-1) - c(38) ) + c(15)*( sv3(-1) - c(39) ) + c(18)*(cpi(-1) - c(42)) + [ename=ni_c]


Return to “Estimation”

Who is online

Users browsing this forum: No registered users and 2 guests