How to apply Kalman filter on time series?

7 次查看(过去 30 天)
I have time series from stock market and want to apply the Kalman Filter. I read the samples about the setup of the Filter and they all work with some kind of matrizes. The command dspadpt3 gives me some weird mask which I have no conlcusion about handling it.
So, my main purpose would be so apply the Filter on a time series and see how it is adapted resp. hulled in (var resp. covar?).
Is there a hint resp. sample how to start the stuff? (e.g. how to get the matrixes, how to continue for a plot, etc.)

回答(2 个)

Royi Avital
Royi Avital 2014-4-14
编辑:Royi Avital 2014-4-14
Kalman Filter is pretty straight forward, why not write it yourself?
You can see all needed here:
Now all you need is to define the parameters and use '/' and '\' wisely :-).
  1 个评论
Leo
Leo 2014-4-15
Why not write it by myself? Hm' good question. I think the main reason is that I didn't understand the details behind it. After reading the wikipedia I have a better idea about the workflow - the big picture - thx for the hint. But still lack the practical approach. I am unclear about some matrix in the article.
IFF I take the truck example, than I have e.g. no idea how to take w_k ~ N(0,Q). Also, can I take it for stock-samples cause there is no velocity, i.e. no quadratic curve? Is there as well a variance resp. co-variance included in the model?
If I take the python-sample than I get an idea how a straight forward implementation might look like. But there I have the problem what might be a truth value (variable x) for a stock value (?) and how to set up the normal distribution on an array with variance 0.1? And shouldn't be the variance adapted over the time?
If you could lend me a helping hand this I would highly appreciate.

请先登录,再进行评论。


Benjamin
Benjamin 2014-9-1
Is there anyone can give code example?

类别

Help CenterFile Exchange 中查找有关 Online Estimation 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by