Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Machine Learing|Mean Reversion|The Bottom Of The Q500

Basic Machine Learning Models and Mean Reversion Techniques are rather popular on Quantopian's forums right now. I went ahead and tweaked the ideas (for now [I'm busy] this uses a modified version of "Enhancing Mean Reversion"- that will soon change), then combined them (then optimized them some more). The bottom of the Q500 just comes from: (pricing < 6 ) and is vital to the algorithms success. You can get similar success with the bottom of the Q1500. There is also some success to be found in limiting the pricing to 10 < pricing < 30 with certain sectors. The sector codes can be annoying to find so here they are:

1 Cyclical
101 Basic Materials 102 Consumer Cyclical 103 Financial Services 104 Real Estate
2 Defensive
205 Consumer Defensive 206 Healthcare 207 Utilities
3 Sensitive
308 Communication Services 309 Energy 310 Industrials 311 Technology
[This is from page 9][1]

This is still very much a work in progress. The algo will not run if you run it through may of 2016 and I have a fix (but it's compute time is stupid high I'm working on reducing it)

I understand that most are not ok with loading all money on one stock. The whole point of algorithms is to increase returns whilst reducing risk and thus, I have no issue with it. Also, this is being built specifically to grow a small amount of money.

Thanks for stopping by
-J

[1]: http://corporate.morningstar.com/us/documents/methodologydocuments/methodologypapers/equityclassmethodology.pdfhttp://

3 responses

IGNORE THE TITLE OF THE NOTEBOOK that was its previous purpose. wooops

Still very much a WIP

Looks cool! im going to clone it to see how it works :P

Edit: Would be nice if you list the changelog between each share.