Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
How to buy only one stock from stock universe

Hello,
I am starting with quantopian as well as Python. I know the start will not be easy, but I want to try to overcome it. I am usually good with exploring new information after I get some kickstart.

I am trying to code simple strategy:

Trade Universe S&P 500
Buy stock that has lowest RSI(7). Thus buy ONLY ONE stock PER DAY.
Exit when the stock price is above its EMA(7)

Could please anyone hint me with the code so I can move further by my own?

Thank you,
Peter

1 response

Some basics for starters, good luck!

Edit: All three of those 'return' under the last 'for sec in data' should been continue instead.