Page 1 of 2
Kalman Filter estimation
Posted: Thu Aug 05, 2010 7:43 am
by king_luca
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
Re: Kalman Filter estimation
Posted: Thu Aug 05, 2010 7:49 am
by Aqua
Hi,
Could you show us the code?
Re: Kalman Filter estimation
Posted: Thu Aug 05, 2010 7:54 am
by king_luca
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
Re: Kalman Filter estimation
Posted: Thu Aug 05, 2010 7:56 am
by EViews Gareth
Silly question perhaps, but is there a series in your workfile called CONV__ARB_ ?
Re: Kalman Filter estimation
Posted: Thu Aug 05, 2010 7:57 am
by king_luca
yes there is... it's a vector with 120 observations...
Re: Kalman Filter estimation
Posted: Thu Aug 05, 2010 7:59 am
by king_luca
but do I need to store all my excel sheets in a specific folder ?
Re: Kalman Filter estimation
Posted: Thu Aug 05, 2010 8:01 am
by Aqua
Make sure you do not press twice the "_" in defining the variable.
Check this and tell us!
A.
Re: Kalman Filter estimation
Posted: Thu Aug 05, 2010 8:04 am
by king_luca
still the same error...
Re: Kalman Filter estimation
Posted: Thu Aug 05, 2010 8:07 am
by Aqua
Could you post the workfile?
Re: Kalman Filter estimation
Posted: Thu Aug 05, 2010 8:10 am
by EViews Gareth
It won't work if it is a VECTOR object. It has to be a SERIES.
Re: Kalman Filter estimation
Posted: Thu Aug 05, 2010 8:13 am
by king_luca
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 :
Re: Kalman Filter estimation
Posted: Thu Aug 05, 2010 8:15 am
by startz
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.
Re: Kalman Filter estimation
Posted: Thu Aug 05, 2010 8:23 am
by king_luca
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
Re: Kalman Filter estimation
Posted: Thu Aug 05, 2010 8:28 am
by Aqua
Give starting value to variances by adding something like
c(1)= your value
c(2)=your value
...
Hope it helps,
A.
Re: Kalman Filter estimation
Posted: Thu Aug 05, 2010 8:30 am
by king_luca
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