Kalman Filter 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

king_luca
Posts: 22
Joined: Thu Aug 05, 2010 2:28 am

Kalman Filter estimation

Postby king_luca » Thu Aug 05, 2010 7:43 am

Hi everybody,

I'm a new user of Eviews (I bought it this morning)... I need to estimate time varying betas for a 7 factors model. I defined the state space model in Eviews, using the Auto-Specification. However when I want to estimate the model an error message appears specifying that my dependent variable "is not defined"...

I used Matlab before but I need to use Eviews now and I am a bit lost...

Could anyone help me with that ?

Thank you in advance.

BR

Aqua
Posts: 14
Joined: Mon Aug 02, 2010 7:17 am

Re: Kalman Filter estimation

Postby Aqua » Thu Aug 05, 2010 7:49 am

Hi,
Could you show us the code?

king_luca
Posts: 22
Joined: Thu Aug 05, 2010 2:28 am

Re: Kalman Filter estimation

Postby king_luca » Thu Aug 05, 2010 7:54 am

My code in Sspace is the following :

@signal CONV__ARB_ = sv1*BONDS + sv2*CMDTY + sv3*CREDIT + sv4*EMM_B + sv5*EMM_E + sv6*S_P + sv7*USD + [var = exp(c(1))]

@state sv1 = sv1(-1) + [var = exp(c(2))]
@state sv2 = sv2(-1) + [var = exp(c(3))]
@state sv3 = sv3(-1) + [var = exp(c(4))]
@state sv4 = sv4(-1) + [var = exp(c(5))]
@state sv5 = sv5(-1) + [var = exp(c(6))]
@state sv6 = sv6(-1) + [var = exp(c(7))]
@state sv7 = sv7(-1) + [var = exp(c(8))]

when I want to estimate the parameters I get the previous error, specifying that CONV__ARB_ is not defined...

Did I do somethng wrong when I imported the data ?

Thank you for your answer

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

Re: Kalman Filter estimation

Postby EViews Gareth » Thu Aug 05, 2010 7:56 am

Silly question perhaps, but is there a series in your workfile called CONV__ARB_ ?

king_luca
Posts: 22
Joined: Thu Aug 05, 2010 2:28 am

Re: Kalman Filter estimation

Postby king_luca » Thu Aug 05, 2010 7:57 am

yes there is... it's a vector with 120 observations...

king_luca
Posts: 22
Joined: Thu Aug 05, 2010 2:28 am

Re: Kalman Filter estimation

Postby king_luca » Thu Aug 05, 2010 7:59 am

but do I need to store all my excel sheets in a specific folder ?

Aqua
Posts: 14
Joined: Mon Aug 02, 2010 7:17 am

Re: Kalman Filter estimation

Postby Aqua » Thu Aug 05, 2010 8:01 am

Make sure you do not press twice the "_" in defining the variable.
Check this and tell us!
A.

king_luca
Posts: 22
Joined: Thu Aug 05, 2010 2:28 am

Re: Kalman Filter estimation

Postby king_luca » Thu Aug 05, 2010 8:04 am

still the same error...

Aqua
Posts: 14
Joined: Mon Aug 02, 2010 7:17 am

Re: Kalman Filter estimation

Postby Aqua » Thu Aug 05, 2010 8:07 am

Could you post the workfile?

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

Re: Kalman Filter estimation

Postby EViews Gareth » Thu Aug 05, 2010 8:10 am

It won't work if it is a VECTOR object. It has to be a SERIES.

king_luca
Posts: 22
Joined: Thu Aug 05, 2010 2:28 am

Re: Kalman Filter estimation

Postby king_luca » Thu Aug 05, 2010 8:13 am

I have a workfile named "kalman returns" in which I have several return data and a workfile named "kalman factors" in which I have the 7 factors data :
Attachments
kalman returns.wf1
(20.56 KiB) Downloaded 750 times
kalman factors.wf1
(16.71 KiB) Downloaded 710 times

startz
Non-normality and collinearity are NOT problems!
Posts: 3796
Joined: Wed Sep 17, 2008 2:25 pm

Re: Kalman Filter estimation

Postby startz » Thu Aug 05, 2010 8:15 am

I have a workfile named "kalman returns" in which I have several return data and a workfile named "kalman factors" in which I have the 7 factors data :
Copy all the series from one workfile and paste into the other so that everything's in one place. Then try again.

king_luca
Posts: 22
Joined: Thu Aug 05, 2010 2:28 am

Re: Kalman Filter estimation

Postby king_luca » Thu Aug 05, 2010 8:23 am

I think it works now... but I have an other error message : missing value found in state variance matrix... I don't have this value, I'd like to estimate it with maximum likelihood...

Thank you very much for your help

Aqua
Posts: 14
Joined: Mon Aug 02, 2010 7:17 am

Re: Kalman Filter estimation

Postby Aqua » Thu Aug 05, 2010 8:28 am

Give starting value to variances by adding something like
c(1)= your value
c(2)=your value
...

Hope it helps,
A.

king_luca
Posts: 22
Joined: Thu Aug 05, 2010 2:28 am

Re: Kalman Filter estimation

Postby king_luca » Thu Aug 05, 2010 8:30 am

Thank you.

But do I need to specify that I want to estimate c(1),...,c(8) ? If yes, could you tell me where ?

Thank you again


Return to “Estimation”

Who is online

Users browsing this forum: No registered users and 2 guests