Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Top 5 stocks, re-balancing monthly

I'm new, please if someone could help, that be greatly appreciated. I'm trying to figure out how to backtest a strategy which basically every month at the beginning of the month you buy the top 5 stocks based on the returns of the last month.
also:
U.S. stocks only
No OTC stocks
Stocks considered mid cap and below