Back to Community
Experiments with GEM and Dual Momemtum

Ok, here is my back test of Gary Antonucci's GEM strategy. I selected EEM SPY EFA and SHY ETFS due to long histories.
It is not exactly beating the SPY long term but it has dodged some nasty drawdowns.

I borrowed the code from another user, who sells everything every month and often ends up buying the same etf back. I not sure how to fix that with this object model. I am a python newbie.

Clone Algorithm
114
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: 55a1424e8bbd601246c6b216
There was a runtime error.
3 responses

Sorry, my code was really bad. I've learned a lot since. For consolation, here is more efficient code. Believe it or not, it holds the same portfolio. Q has data starting 2002, so any code that looks back a year should start at 2003. If you start my new code and your code at 2003, they are equivalent.

Again, I apologize for my poor initial code. I have no doubt that I will regret publishing my newest code in the future as I learn more about Python and finance :P

I hope this algorithm was a useful learning experience for you though!

Clone Algorithm
36
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: 55a18643d2dd49124728ee6e
There was a runtime error.

thanks sharing, I did experiments, just to replace trading security .

Clone Algorithm
141
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: 55a1b7de4d147a1251d6ba54
There was a runtime error.

@Novice TAI Thanks for the code. Just wondering. Looks like it is possible to buy a stock with negative change over last year. i am correct? Also, i suggest we get away from bonds as they have had wonderful non repeatable alpha. We should go to cash if nothing has positive returns. Trouble is, i can't yet figure out how to do this in python. Any suggestion?