Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Kalman Filtering

A typo caused my last algorithm to constantly buy/sell for no reason, this is what I believe that buying based on kalman filtering should look like (I realize that a lot of the decisions--like buying 200 stocks as opposed to some portion of the portfolio, etc. are simple, but this is more of a proof of concept than anything that I would want to trade on).

1 response

why don't you use a more dynamic order mechanism like order_target_percent, as buying a fixed amount of shares means the dollar amount you buy depends on the price which can increase dramatically over the years