How does one now implement a discrete set of state space models?

I had used KalmanFilter in the old TimeSeries application, but was keen on trying to do all this in the "new paradigm" of StateSpaceModel[] in Mathematica 10.

Mathematica's own docs for the TimeSeries package has a section on state-space form and the Kalman Filter.

Fundamentally I want to make F and G time-index dependent lists of matrices.

Ultimately I want to implement a time-varying CAPM model as described in Tsay using Mathematica 10.


  • 3
    $\begingroup$ What exactly is the question? You are looking for KalmanEstimator I think. And StateSpaceModel is not new btw, it's been there since V8. $\endgroup$ – sebhofer Aug 4 '14 at 9:06
  • $\begingroup$ The question was in the first line. The now deprecated TimeSeries package had a function called KalmanFilter that supported not just a single StateSpaceModel (i.e. {a,b,c,d} as in the documentation) but a list of them. $\endgroup$ – iqchef Aug 5 '14 at 12:35
  • 1
    $\begingroup$ I found this in the documentation: "However, if any one of F, G, Q, R, c, d is time dependent, the above arguments to KalmanFilter, F, G, Q, R, c, d, should be replaced by {Fm+2, Fm+3, ..., FT+1}, {Gm+1, Gm+2, ..., GT}, {Qm+2, Qm+3, ..., QT+1}, {Rm+1, Rm+2, ..., RT}, {cm+2, cm+3, ..., cT+1}, and {dm+1, dm+2, ..., dT}, respectively." $\endgroup$ – iqchef Aug 5 '14 at 12:37
  • $\begingroup$ I see... It seems you're right and Mathematica doesn't support time-dependent Kalman filtering out of the box right now. On the other hand (and I'm guessing you know that), it is fairly easy to implement this functionality yourself (at least for simple models). $\endgroup$ – sebhofer Aug 5 '14 at 15:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.