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.

Clone Algorithm
135
Loading...
Backtest from to with initial capital
Total Returns
--
Alpha
--
Beta
--
Sharpe
--
Sortino
--
Max Drawdown
--
Benchmark Returns
--
Volatility
--
Returns 1 Month 3 Month 6 Month 12 Month
Alpha 1 Month 3 Month 6 Month 12 Month
Beta 1 Month 3 Month 6 Month 12 Month
Sharpe 1 Month 3 Month 6 Month 12 Month
Sortino 1 Month 3 Month 6 Month 12 Month
Volatility 1 Month 3 Month 6 Month 12 Month
Max Drawdown 1 Month 3 Month 6 Month 12 Month
# Backtest ID: 546b75848eefb308fb00cacf
There was a runtime error.
6 responses

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

Clone Algorithm
135
Loading...
Backtest from to with initial capital
Total Returns
--
Alpha
--
Beta
--
Sharpe
--
Sortino
--
Max Drawdown
--
Benchmark Returns
--
Volatility
--
Returns 1 Month 3 Month 6 Month 12 Month
Alpha 1 Month 3 Month 6 Month 12 Month
Beta 1 Month 3 Month 6 Month 12 Month
Sharpe 1 Month 3 Month 6 Month 12 Month
Sortino 1 Month 3 Month 6 Month 12 Month
Volatility 1 Month 3 Month 6 Month 12 Month
Max Drawdown 1 Month 3 Month 6 Month 12 Month
# Backtest ID: 546b8d7d4e1d2e08f9760db5
There was a runtime error.

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.

Clone Algorithm
135
Loading...
Backtest from to with initial capital
Total Returns
--
Alpha
--
Beta
--
Sharpe
--
Sortino
--
Max Drawdown
--
Benchmark Returns
--
Volatility
--
Returns 1 Month 3 Month 6 Month 12 Month
Alpha 1 Month 3 Month 6 Month 12 Month
Beta 1 Month 3 Month 6 Month 12 Month
Sharpe 1 Month 3 Month 6 Month 12 Month
Sortino 1 Month 3 Month 6 Month 12 Month
Volatility 1 Month 3 Month 6 Month 12 Month
Max Drawdown 1 Month 3 Month 6 Month 12 Month
# Backtest ID: 54735a7c60d2c908e707ca1a
There was a runtime error.

it doesnt work......