I wrote this to get familiar with the Quantopian platform, please feel free to provide feedback.
I wrote this to get familiar with the Quantopian platform, please feel free to provide feedback.
Nice! I recommend you implement this using the Pipeline system. It's a bit of a steep learning curve, but well worth the journey, as it makes it is easier to enhance your system, and cleans up the code.
https://www.quantopian.com/help#sample-algos
https://www.quantopian.com/posts/quantopian-lecture-series-long-short-equity-algorithm
https://www.quantopian.com/posts/pipeline-long-slash-short-cross-sectional-template
If you get stuck, please post here, and I am more than happy to help out!