Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Dual Momentum Investing Strategy According to Dr. Gary Antonacci

Dual Momentum According to Dr. Gary Antonacci

After reading "Dual Momentum Investing" by Dr. Gary Antonacci, I came across the "Quantopian QuantCon 2016" post by Lotanna Ezenwa - https://www.quantopian.com/posts/quantcon-2016-dual-momentum-strategy that offered a great starting point for my own research and backtesting of the strategy (nice work, Lotanna!).

I posted some questions about various details I had to the book's website at http://www.optimalmomentum.com/contact%20us.html, and was pleasantly surprised that Dr. Gary himself had graciously responded within a few hours. During an email thread with him, Dr. Gary clarified that the actual method he himself uses is detailed on page 98 of the printed book (2015 edition), and differs slightly from the flowchart depicted on page 101.

Basically, the first step is to determine absolute momentum by comparing the 12 month return of the SP500 (since the U.S. leads world equity markets) against that of the T-Bills, and if positive - to then compare the relative strengths of the SP500 and the ACWX (Global Stocks ex U.S.) - thus investing in the higher performing of the two. Otherwise, one would invest in AGG. The actual vehicles to be used can vary although Dr. Gary does have his own recommendations in the book's FAQ - http://www.optimalmomentum.com/faq.html - which contains a bunch of compact gems that really clarify DMI beyond his excellent book (Note: The FAQ webpage has been edited and the recommended ETF vehicles are no longer available. These can be found in Dr. Gary's "Dual Momentum Investing" book - Chapter 8’s “How To Use It” section).

Below is a modified flowchart that I ran by Dr. Gary to confirm for accuracy. This modification produced higher returns against the flowchart on page 101 for the few backtests that I executed. At his suggestion, I'm posting this to Quantopian to pass this on to anyone interested. It actually simplifies the rebalancing logic in my opinion.

The modified (and simplified) logic in my_assign_weights(context, data) looks like:

if returns[context.us] < returns[context.tbill]:  
    context.weights[context.agg] = 1  
elif returns[context.us] > returns[context.worldExUS]:  
    context.weights[context.us] = 1  
else:  
    context.weights[context.worldExUS] = 1

context.weights.fillna(0,inplace=True)  

This logic also rebalances entirely to AGG when absolute momentum dictates it.

13 responses

Which ETF is used for T-Bills?

Thanks,

Tim

Hi Tim,

Dr Gary says in his FAQ - http://www.optimalmomentum.com/faq.html:

"The ETF for U.S. Treasury bills is BIL (SHV when interest rates are near zero), and ETFs for aggregate bonds are BND or AGG.".

(Note: The FAQ webpage has been edited and the recommended ETF vehicles are no longer available. These can be found in Dr. Gary's "Dual Momentum Investing" book - Chapter 8’s “How To Use It” section).

Thanks!
Anthony

Here is a sample backtest (started from Lotanna's post) with this implementation:
- Momentum lookback period is 100 days; Dr. Gary uses 252 days.
- SHV is used for T-Bill performance calculations (BIL seems to be missing from the standard Quantopian data per https://www.quantopian.com/posts/sid-slash-ticker-set. Does anyone know if it actually is included?).
- SPY and VEU are used for U.S. and World ex-U.S. equities.
- BND is used for aggregate bonds.

Thanks a lot for sharing your work. The results look solid, which might incite an investor who wants to take on more risk, to add some leverage. Dr. Gray briefly, yet explicitely discusses GEM results with a leverage of 1.3 in his book - which is why I tried to leverage the stock asset classes in the algo with a 1.3 ratio. However, this does not seem to have any effect on the results and the leverage nowhere exceeds 1. Can anyone spot the error?

Hi Fynn Trader - you are welcome.

I cloned your algo and took a look at the source code. If you modify the context.stock_leverage in the my_assign_weights_p98() function, you should see increased performance. I had left the original my_assign_weights() function intact for comparison, and this may have caused some confusion. I've attached a modification below.

Can you reference where in the GEM book that it mentions a leverage of a 1.3 ratio? I suppose one could leverage up to a factor of 2 using margin on "standard" ETFs like SPY (as opposed to leverage ETFs like SSO).

Thanks.

Looks appealing. Critiques: Trades only three stocks, hits an intraday leverage of 2.56 on 2015-08-03, carries leverage overnight so look into those costs, starts with 10k however uses over 60 and as a result the return on amount put at risk is 35% vs benchmark 90%. Margin likely due to partial fills, 14k on the buy side and 4500+ in selling (number of minutes an order was partially filled, with any zero fill not counted if there were any).

Often the argument will be, hey, that's instantaneous margin so nothing to even blink at. Really?

Try taking a look at overnight margin detail with the code at https://www.quantopian.com/posts/margin, super duper easy. I don't want to tell you what those numbers are because fear.

With order_target_percent, it's great in that it places the orders conveniently in amounts appropriate for perfect balance however it is not a helicopter parent overseeing the operation after that. So then as buying and selling are taking place, over many minutes (look into track_orders to see), when some of the sells (reductions in allocation) are stuck to some degree looking to be filled more and more as time wears on throughout the day, buying can be more complete.

That is, people are happy to sell to you that day and not as interested in what you have to sell. So the money expected to be materializing from the selling, isn't quite there yet. And buying dips into margin. It's everywhere, almost, if one can bear to look.

So what to do. Welp, if the goal is actual investing rather than just having fun, decide how much that margin will cost and find a way to limit margin to one's threshold of comfort. Good luck.

Can you reference where in the GEM book that it mentions a leverage of
a 1.3 ratio? I suppose one could leverage up to a factor of 2 using
margin on "standard" ETFs like SPY (as opposed to leverage ETFs like
SSO).

a bit difficult, since I only own the ebook where it is presented in table 8.10.

To quote the surrounding text:

Table 8.10 and Figure 8.16 show GEM leveraged 30%, to suit aggressive
investors who choose to borrow at the federal funds rate plus 25 basis
points.

Your backtest shows, that leverage coold be very attractive since a margin call would be rather unlikely given the low drawdown - which by the way, matches exactly the drawdown given in the book, for a leverage of 30% .

I also have the ebook and appreciate your reference to the text that refers to Table 8.10 and Figure 8.16. Good catch on the 30% leverage - I find the book full of terse tidbits of information that can be overlooked.

The challenge with this and other systems is living thru the drawdowns in real time; however, I'll settle for 20-30% vs buy and hold's 50%+.

Why did you change the lookback period to 100, which is less then half the period proposed in the book? Did you talk with Dr. Andronacci about that?

I left the loopback period at 100 as defined in Lotanna Ezenwa's original implementation of DMI (see reference above) in order to compare apples to apples. Yes, I did inform Dr. Gary about this when I created this page for his review, and he said that was fine. Lately, 100 days seems to outperform the official 252 days - however, I believe 252 seems optimal over the longer-term. Of course, feel free to vary the loopback period or any of the other parameters to assess changes in performance.

Looks GEM doesn't hold anymore. Or is it just me?

Dr. Gary published his book in 2014, and it worked like a charm at the time. However, in the bull market of 2016 and 2017, it makes some unnecessary trades instead of sticking to SPY.

I've tried different backtest periods.

  • At best, it looses the advantage earned in the previous years
  • At worst, both the return and Sharpe are nearly twice worse then SPY.

Should we give it more time?

Trade Info

Couple of observations:

Leverage jumped intraday to 1.78 when SPY filled entirely while BND was partial. Margin 8k.
To avoid wrap here last two columns removed, see link above for complete.

                   Trading Minute  Action               Change  Sym  Price     Now   Stop|Limit     PnL   Lvrg  
2016-06-01 07:30 _t:413 INFO   60  Buy                      48  SPY 209.36      _                     0   1.00  
2016-06-01 07:30 _t:413 INFO   60  Sell                   -123  BND  82.77     123                  161   1.00  
2016-06-01 07:31 _t:413 INFO   61    Sold           -25|0|-123  BND  82.76      98                  127   1.78  
2016-06-01 07:31 _t:413 INFO   61    Bot                    48  SPY 209.44      48                   -0   1.78  
2016-06-01 07:32 _t:413 INFO   62    Sold         -15|-25|-123  BND  82.76      83                  108   1.66  
2016-06-01 07:33 _t:413 INFO   63    Sold         -17|-40|-123  BND  82.77      66                   86   1.52  
2016-06-01 07:34 _t:413 INFO   64    Sold     all -66|-57|-123  BND  82.76      _                 [+160]  0.98  

The next leverage jump to 1.98 involved VEU.

                   Trading Minute  Action               Change  Sym  Price     Now   Stop|Limit      PnL  Lvrg  
2017-12-01 07:30 _t:413 INFO   60  Buy                      47  SPY 265.06      _                      0  1.00  
2017-12-01 07:30 _t:413 INFO   60  Sell                   -231  VEU  53.98     231                  1152  1.00  
2017-12-01 07:31 _t:413 INFO   61    Bot                    47  SPY 265.14      47                    -0  1.98  
2017-12-01 07:31 _t:413 INFO   61    Sold            -2|0|-231  VEU  53.98     229                  1142  1.98  
2017-12-01 07:32 _t:413 INFO   62    Sold          -18|-2|-231  VEU  53.99     211                  1054  1.91  
2017-12-01 07:33 _t:413 INFO   63    Sold    all -211|-20|-231  VEU  53.99      _                 [+734]  1.00  

These may be useful:
http://quantopian.com/posts/max-intraday-leverage
http://quantopian.com/posts/track-orders

Looks GEM doesn't hold anymore. Or is it just me?

@Ivan Braun
You should review the FAQ on Gary's site: https://www.optimalmomentum.com/faq/
Specifically...

It looks like the GEM model has underperformed the S&P 500 after 2009. Is momentum still effective?

Dual momentum has a trend following component that lags behind when a new bull market begins. That is the cost of avoiding the carnage of the preceding bear market. It is unfair to look only at a new bull market without also considering the preceding bear market. You need to consider at least a full market cycle to make a proper evaluation of performance. GEM has outperformed its benchmark portfolio since 2008 which is over a full market cycle.

You also need to understand why GEM has outperformed over the long run. First, are the profits from switching between U.S. and non-U.S. stocks according to relative momentum. Since 2009, U.S. stocks have continuously outperformed non-U.S. stocks, so there have been no opportunities for relative strength profits. Second, the current bull market has been one of the longest in history. This means there has been no opportunity for absolute momentum profits. It is difficult for any trend following approach to keep up with the stock market when it is so strong.

You could say that GEM has lost its effectiveness if you believe U.S. stocks will always outperform non-U.S. stocks or there will never be another bear market. If GEM underperforms over shorter periods of time, dual momentum investors are willing to accept that because of the drawdown protection it has shown during severe bear markets.