Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Bernoulli change point detection

An algorithm to filter noise and run change point methods to detect buy and sell signals.

2 responses

This looks interesting. Can you provide a little description on the background of the approach / algorithm to better understand it?

There are two classes in the code. CP which stands for change point and detects changes in the mean of a bernoulli sequence of zeros and ones. KF stands for kalman filter which tries to reduce noise of the price series and identifies trend. The algorithm runs KF to filter noise and estimate trend. It then uses CP to see if trend is changing direction (from positive to negative and vice versa).

If you play with the process noise covariance and observation noise covariance in KF you will get different results. I am struggling to find the right calibration.