Take the 2-minute tour ×
Quantitative Finance Stack Exchange is a question and answer site for finance professionals and academics. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

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.
share|improve this answer
appreciate your hints! –  athos Jul 18 '13 at 10:24
+1 Are you working with Kalman filters yourself, Matt? –  vonjd Jul 18 '13 at 10:46
I did but currently not. I work on something similar than particle filters but the algorithms are very expensive computationally. Digging into Cuda GPU programming in order to ease some matrix computations. Why, do you? –  Matt Wolf Jul 18 '13 at 14:57

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.