Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Rate of Change Mean Reverision

This algorithm first calculates the slopes in between each price vs. time data point. Then it calculates how well a normal distribution fits the slope data. If that is true and a new slope is significantly above the mean slope, then the algorithm will short the stock, while if it is true and the new slope is significantly below the mean slope, then the algorithm will long the stock. If a normal distribution is not a proper fit for the slopes, then the algorithm does nothing. Of course, assuming that a slope that is below average is negative and a slope above average is positive is fundamentally flawed logic, but it was still a fun learning experience back when I was first learning to program that I look back upon fondly.