Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
kalman filters parameters help

Hello i am studying the lecture about kalmen flters and even if i have understood the general concept of how it works (with prediction and updates but not very much more than this) i still have a question:
Since i am not really exploring deeply into the math of kalman filters with martices and so on.. i would like to have a 'qualitative description' of the parameteres:

              transition_matrices = [1],  
              observation_matrices = [1],  
              initial_state_mean = 0,  
              initial_state_covariance = 1,  
              observation_covariance=1,  
              transition_covariance=.01

and unfortunately even the basic documentation of pykalman is even more difficoult than understand all the math step by step.

So maybe somene can help me here:

How can i control the responsiveness of the kalman in respect of te original data using parameters is my first question and then, is there any other major features of this kalman filter that i should know when my intention is using it to filter out the noise in the zscore cointegration signal to do pairs trading?

Thank you very much

3 responses

Check out this amazing thread on Kalman Filters if you haven't already. I learned a lot from it, both qualitatively and quantitatively.

https://www.quantopian.com/posts/kalman-filters-best-practices

Disclaimer

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by Quantopian. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. No information contained herein should be regarded as a suggestion to engage in or refrain from any investment-related course of action as none of Quantopian nor any of its affiliates is undertaking to provide investment advice, act as an adviser to any plan or entity subject to the Employee Retirement Income Security Act of 1974, as amended, individual retirement account or individual retirement annuity, or give advice in a fiduciary capacity with respect to the materials presented herein. If you are an individual retirement or other investor, contact your financial advisor or other fiduciary unrelated to Quantopian about whether any given investment idea, strategy, product or service described herein may be appropriate for your circumstances. All investments involve risk, including loss of principal. Quantopian makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances.

great thread thank you very much James!

I was wondering about using Kalman Filters for pairs trading. Can you explain the noise in the zscore and what is the real state behind it?

Thanks a lot