Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Simple Question - Sorting and Rebalancing

I'm a rookie and am trying to build a simple algorithm.

I'm looking to build an algorithm that:
- Sorts the S&P 500 stocks by the 14 period RSI
- Shorts the top 10 and longs the bottom 10
- Rebalances daily

Can anyone point me in the right direction? I'm a complete rookie to python. Any examples out there of sorting by indicator that I could copy?

2 responses

This should do what you like. You can easily modify it and experiment

Thank you so much!