Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
EMA 50 vs 100

More or less, if the 50 day EMA drops below the 100 day EMA, sell. If it goes above, buy.
Uses a mix of 14 stocks that's a bit tech heavy so it uses QQQ as a benchmark.
For a better benchmark I'm going to re-run it with just buying the stock and holding the whole time.

Seems to miss out on sudden surges quite often.

6 responses

Here's the real benchmark. Performs initial purchase then sits on it.

Nice! Comparing those 2 is not accurate though, as I don't see that you've accounted for broking fees. At a guess, the first script will have more buy/sells than the second, which is buy and hold only. I think there are other examples of how to add in fees and costs to the mix. Well done! Looking forward to seeing your next one :-)

I believe since I didn't set a custom commission it uses $0.03/share as a default rate.So the first one definitely got hit with more since its the only one with any activity. I'll try it again with commission set to $4.75/trade.

How did your algo perform after setting the the commission to the higher commission of $4.75/trade?

Not much change.

it doesnt work......