Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Help with top % gainers

Newbie, struggling to learn code, trying to:

-Choose the current top % gainer(s) from a list of ETF's intraday
-Buy/sell based on 15 over 30 min EMA and
-If current ETF is no longer in the list, sell, and buy the current top gainer(s)
-Close all positions before eod

First time using multiple sid's and having trouble getting this right. Any help much appreciated.

2 responses

Chris,

Try "top % looser" instead.

Vladimir,

Thanks for helping me get this running. That's an interesting idea, I will try something with losers later. My end goal here is to find the top 3 ETF's by percent gain from a basket of high volume ETF's, and invest in them equally with some moving average rules. I'm still struggling to figure out some logic to sell an ETF once it is no longer in the top three, and replace it with the new winner throughout the day. The theory being that the top performing sectors at the open often outperform for the rest of the day.

Chris