Tuesday, January 2, 2018

modeling - How to tune Kalman filter's parameter?


I plan to use Kalman filter to estimate saving account amount.


However, I'm a bit lost at how to tune the filter's parameters.


Taking as the example from the Wikipedia page, basically there are three parameters.


P(0) can be set as (L, 0; 0, L), where L is a big number. This is fine, anyway P(k) shall converge.


R supposedly is a constant; it's suggested to be taken as covariance of z. Fine, thought Z is composed of x and v.



How about Q? From An Introduction to the Kalman Filter by Greg Welch and Gary Bishop, different values of Q seems seriously affect the converge of estimation.


Any suggestions on how to tune Q?



Answer



Estimation of the initial states of R and particularly Q is indeed more of an art than science. The task at hand is to estimate the covariances. You have basically two main choices:



  • Live with the fact that you will never be able to exactly pinpoint the covariance of noise in financial time series. The most often used approach is to pose the coveriance estimation as a least-squares problem, such as using ALS. Below ALS and a few related solutions to the problem. However, what makes your problem a lot easier is that you apply Kalman filters to a savings account. I do not know which exact method you use to model a savings account or what distributional properties it has. However, it looks and sounds a lot easier than applying Kalman filters to financial time series with potentially several Brownian motion components. A savings account "process" may have much more straight forward covariances which you can equip Q with.


Autocovariance Least-Squares (ALS) Package


A new autocovariance least-squares method for estimating noise covariances


A generalized autocovariance least-squares method for Kalman filter tuning




  • Another solution is to relax the distributional assumptions that underlie Kalman filters and focus your efforts on techniques such as Particle Filters. I have to great success implemented Particle Filters in financial time series tracking as well as forecasting. However, a word of warning is that particle filter algorithms are extremely computationally expensive and hence they may not be applicable to real-time applications.


No comments:

Post a Comment

technique - How credible is wikipedia?

I understand that this question relates more to wikipedia than it does writing but... If I was going to use wikipedia for a source for a res...