Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Accelerating Dual Momentum: 150 Year Backtest

Many of you may have heard of Gary Antonacci's strategy called Global Equities Momentum (GEM) in which he uses a "dual momentum" signal to compare US stocks to global stocks to bonds over the trailing 12 months. The strategy has done quite well historically but I felt that a 12-month signal was too long and too rigid. I wanted to pick up not only on the direction of an asset but also the rate of change of that direction.

In a strategy I'm calling "Accelerating Dual Momentum" we look at this "acceleration" of an asset by simply adding the 6 month, 3 month, and 1 month returns. Whichever asset is higher between US stocks and global small cap stocks we buy. If both are negative than we buy bonds. Hold for the next month and repeat a month later.

The algorithm below provides a backtest over the last 14 years. I also wrote an extensive article on my blog further explaining the strategy and providing performance data going back to 1871. Here's the link: Accelerating Dual Momentum.

20 responses

Attached is a notebook that has some more research information. It also includes a cell which can be used to calculate the signal now or at any day defined.

Hi Stephen!

When you said "compute 1+3+6 month momemtum signal" did you mean we must add these values?

Cool post! Haven't read it 100% yet, but I think this is kind of what I'm looking for nowadays strategy wise.

Yep, just add the signals. The backtest and the attached notebook show the calculation in more detail but it's super simple!

Hi @Stephen, very nice > 100 year LONG-term perspective & expansion on Gary's (excellent) work. I love it!!

Wow great work! What do you think of adding leveraged ETFs instead (SPXL, TMF, etc.)? They have a much higher expense ratio but the dynamic nature of this algo might make up for it. I am a newcomer so please relieve me of my ignorance if I am way off with this idea. Thank you!

Gary has some comments on this approach: https://dualmomentum.net/2018/09/13/perils-of-data-mining/

Govind, thanks for sharing, I did see this! I'm not entirely sure Gary read my full blog (don't blame him if he didn't, it was long!) because I directly addressed his concerns before he voiced them - because I shared them! I admit to first doing some guess and checking on the ~20 year period I had at first in portfolio visualizer. But I recognized how it could have been a total fluke what happened in the past 20 years, and before posting the strategy I wanted to test it on data I hadn't seen before. So I went and compiled and shared data going back to 1871. And this "accelerating dual momentum" strategy I shared worked better than the base GEM in that period too, without any tweaking or data mining done by me there. I fully discussed it here, although I probably need to write a more focused and shorter blog on the topic.

I also computed the rolling 30 year returns to show how the ADM strategy is beating or at least tying GEM in virtually every 30-year period. I can submit to the fact that data mining might have been done in the more recent history; but I'm not sure how one can objectively look at the over 100-year backtest and say it's the result of data mining.

I'd also like to remind Gary and others about the fact that Gary admited in his book about the viability of looking at accelerating momentum singles. Here's his quote:

Accelerating momentum as either curvature or trend salience might be effective with stock indexes and other assets, in addition to its use with individual stocks.

So I'm not sure why he's knocking the strategy on merits that aren't entirely true, and when he as admitted in the past to the potential that accelerating momentum offers. I suppose in his book he only gave it a few paragraphs and was dismissive there. But again, the strategy has worked well in all time periods better than regular GEM and the strategy makes a decent amount of intuitive sense to me (and hopefully others!).

BTW Andrew, avoid leveraged ETFs like the plague. Because of compounding they don't perform as you'd initially expect beyond a single day's return. I need to probably write my own post on the subject, but some googling will come up with good articles on the pitfalls of leveraged ETFs for investment horizons longer than a day.

Stephen - While you give reasons to justify their use based on the last 20 years of data, I think Gary's point is that your use of shorter look-back periods, long-term bonds, and small-cap international stocks may all come from data mining. He shows they do not hold up so well on longer-term data. Haven't both strategies performed the same over a trailing 30 year period since the 1990s according to your chart? Prior to 1970, isn't your strategy no longer dual momentum, since you have no international stocks to compare to the S&P 500? In other words, you are just looking at the trend of the S&P 500. I'm also unclear why you call your strategy Accelerating Dual Momentum. In Gary's book, he refers to 2 studies of accelerating momentum. The first uses a linear regression of daily returns against the square of time to see if momentum has been accelerating. The second uses the slope of performance relative to the 12-month geometric average rate of return. It looks to me like you have just dual momentum with shorter look-back periods from 1970 forward and simple trend following prior to 1970.

This algo run in live account ?

Hi Stephen

I noticed that you are using price momentum vs total returns momentum (including dividends) in your algorithm. I believe Gary's algorithm works with total returns. Can you please confirm that my understanding is correct about how your algorithm is calculating momentum?

update - Stephen - never mind - looks like quantopian price data is already dividend adjusted.

A second question: Gary's algo compares total return of each stock to that of the risk free asset total return before rank ordering them. The algo in your pipeline simply looks for positive momentum vs comparison to a risk free asset, per my understanding. Am I getting this correct?

Mike,

The attached Quantopian algorithm did not explicitly include dividends, I always had a tough time understanding how Quantopian handled dividends in the price data.

I don't use the risk-free asset total return, just look to see if the average 1,3,6 month return is positive. My testing showed that the absolute return relative to the risk-free asset just confused the matter and marginally reduced returns (it's another way of trying to keep you out of the market, and in the long run, it's better to be in than out!).

I've actually gone away from using the Quantopian algorithm and just go directly to Portfolio Visualizer (go to the "Timing Periods" tab). I found that my Quantopian algorithm is doing a fixed number of day look back when the calendar month look back can actually differ quite a bit. I've just found it simpler to use the Portfolio Visualizer tool, but this Quantopian algorithm should agree 99% of the time (except during highly volatile times and inconsistent lengthed months... like the beginning of 2019).

After portfolio visualizer introduced paid plans and stopped giving forward looking signal results Quantopian is back to being the only free option left (besides manually calculating the signal). Attached is a super simple notebook to provide that calculation.

It looks great! Also, you can easily run this strategies on you own computer by IBridgePy. www.IBridgePy.com because it does not need Q's pipeline.
IBridgePy is an easy-to-use python platform to run Quantopian's strategies on your own computer. And there are a lot of tutorials on YouTube.
For example, Intro of IBridgePy: backtest and live trading https://youtu.be/xWMzTgGWv48

Disclaimer: This is Dr. Hui Liu, who created IBridgePy

I cloned your algorithm and backtested it but got drastically lower results. Not sure where the discrepancy lies.

Hi

Has this strategy been tested with limit price entering and exit, and possibly with target sell price (stop gain rule)?

Since the strategy uses so few ETFS it is probably well suited to investigate whether it is possible to get in and out of positions to better levels than market close price end of month

For example:
Entering 0.5% above yesterday's low
Exit 0.5% below yesterday's high
otherwise, a simple position stop-gain rule with a threshold around 10% -15%

Has anyone tested the strategy with trading costs?

I don't know exactly why, but I can't produce the same signals as you, for SPY VSS and TLT.

As you can see from the attached note, when I use the sum of 1 month, 3 months and 6 months (from Barchart), it is VSS, which is the purchase signal for July, but if you look at the print screen from your script it is SPY which is the signal for July.

What's right here? Is there anything about the strategy I haven't understood?

Barchart Script

Gary changed his blog. His comments on this strategy are now at https://dualmomentum.net/2018/09/13/perils-of-data-mining/

I've submitted this twice on Stephen's Engineered Portfolio blog, but Stephen hasn't allowed it to appear there.

@Govind Dass

I have to agree with you - this strategy, while very interesting, is not truly accelerating momentum, but rather a multiple lookback momentum strategy. Corey HOffstein of Newfound research has written about using multiple lookbacks quite a bit. Gary has also replied to him about this: https://dualmomentum.net/2019/01/17/whither-fragility-dual-momentum-gem/

What I'm really interested in, is whether there's a robust way to adjust the lookback period to account for higher market volatility (shorter lookback adapt faster) vs lower volatility where you stay in the market and ride out the smaller drops.