Kalman Filter

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

ercan
Posts: 7
Joined: Sun Dec 07, 2008 2:23 am

Kalman Filter

Postby ercan » Thu Dec 25, 2008 9:33 am

I am trying to model a time-varying stock beta model. here is my Kalman Filter Model:

rstock=c(1)+sv1*rmarket+[ename=e1, var=exp(c(2))]

@state sv1=sv1(-1)+[ename=e2 , var=exp(c(3))]

@evar cov(e1, e2)=0


----where sv1 is time varying stock beta

------when I specify the following to set initial conditions (sv1=1.000 and initial variance=1), I get error messages. And also I would like to graph the entire beta (state) series as fitted by the model. How can I do that?

vector(1) svec0
svec0.fill 1.000
sym(1) svar0
svar0.fill 1

@mprior svec0
@vprior svar0

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

Re: Kalman Filter

Postby trubador » Fri Dec 26, 2008 12:44 am

You should provide more information on the error message in order to better understand the problem. Besides that the code you have written can be simplified. First of all, you do not need to specify zero covariance between error terms explicitly, since the model already assumes that. Initialization of kalman filter is theoratically sound and most of the time it works very well in practice. It may not be a good idea to intervene in the process, unless you have strict prior information. So, if I were you, I would use a much simpler version like the one below:

Code: Select all

@signal rstock = c(1) + sv1*rmarket + [var = exp(c(2))] @state sv1 = sv1(-1) + [var = exp(c(3))]
Once you estimate the model, you can retrieve the smoothed state values from within the object menu: Proc/Make State Series/Smoothed/State Estimates


Return to “Estimation”

Who is online

Users browsing this forum: No registered users and 2 guests