Art's Charts

SystemTrader - In-Sample and Out-of-Sample Results for Two Momentum Systems - Measuring Performance and Drawdowns

Arthur Hill

Arthur Hill

Chief Technical Strategist, TrendInvestorPro.com

  • Revisiting Two Momentum Systems from 2017.
  • A Simple Momentum Rotation System.
  • Live by the Sword, Die by the Sword.
  • A Trend-Momentum System with a Profit Target.
  • Successful and Unsuccessful Trades.
  • In-Sample and Out-of-Sample Performance.
  • Drawdowns are Unavoidable.
  • Conclusions and Takeaways.
  • Consulting, Software and Data.

Revisiting Two Momentum Systems

I introduced several quantified trading systems in 2017 and thought I would update two momentum systems. This is a good exercise because now we will see how these systems performed "out-of-sample". In other words, how did they perform after the backtests. 

The first step to system development is to identify a market strategy that has positive expectation. We do not have to look far to find evidence that momentum strategies consistently outperform. A momentum strategy simply implies buying the stocks with the strongest momentum.

The first system is a simple momentum rotation system and the second system is a momentum-trend system with a profit target. Full details of these two systems, along with scan code, can be found in the links below. 

ChartCon Momentum Rotation System (August 2016 and February 2017)
Momentum-Trend System with a Profit Target (August 2017)

Keep in mind that trading systems are NOT focused on individual trades or individual setups. Instead, a trading system is focused on portfolio-level performance. In other words, how does the GROUP perform over time. Time is not measured in days or weeks, but rather months and quarters. 

Please use DISQUS for comments and questions so I can share the answers with everyone. The link, and prior comments (if any) can be found at the bottom of each commentary. 


A Simple Momentum Rotation System

This system was originally introduced in August 2016 at ChartCon and a System Trader article appeared in February 2017. This weekly system ranks stocks in the S&P 1500 by the 26-week Rate-of-Change and buys the top 15 stocks. The system sells when the stock drops out of the top 150, as ranked by 26-week Rate-of-Change. 

Other filters: The system also filters for minimum price ($10), minimum Dollar volume ($5 million), maximum 26-week Rate-of-Change (<100%), maximum volatility (<20%) and bull market (10-day EMA is above 200-day EMA for S&P 500). 

The image below shows results from July 1996 to August 2016 (original backtest results) and from August 2016 to February 2018 (out-of-sample results). The backtest results were exceptional with a 16.72% Compound Annual Return, a Maximum Drawdown of 21.38% and a 58% win-rate on trades. 

Results since August 2016 were not near as good, and especially disappointing when comparing to the broader market over this timeframe. The Compound Annual Return was 9.76%, the Maximum Drawdown was 13.04% and the win rate dropped below 50%. Thus, half the trades were winners and half were losers. 

For a benchmark, I compared performance to the S&P 500 SPDR (SPY) using the 10-week EMA and 40-week EMA for signals (last column). Buy SPY when the 10-week EMA is above the 40-week EMA and sell SPY when the 10-week EMA is below the 40-week EMA. 

On an annualized basis, SPY was up 18.39% over the timeframe. I suspect that relative weakness in small-caps weighed this system down because we are using the S&P 1500 as the universe. 


Live by the Sword, Die by the Sword

The chart below was created using Amibroker data from the backtest and user-defined indexes here at StockCharts. The main window shows the equity curve from August 2016 to last week. The first indicator window shows the weekly Rate-of-Change for the equity curve and the lower window shows the Dollar drawdowns (weekly). 

Momentum systems are great at generating returns in bull markets and often outperform, but they are also vulnerable to drawdowns during a broad market correction. The system lost more than 5% for two consecutive weeks and experienced a 13% drawdown in February. With a bounce back last week, the system is still up over 15% since inception (August 2016).


A Trend-Momentum System with a Profit Target

I set out to tweak this system by adding a relatively tight profit target and a relatively wide stop-loss. Yes, you read right! The profit target is set to sell when the profit reaches 10%. A stop-loss triggers when the 25-day EMA crosses below the 125-day EMA. This is a risk-of-ruin stop-loss to get out when the medium-term trend turns down.  

For what it's worth, I tested using trailing stops based on both ATR multiples and percent. Tight stops produced higher drawdowns and lower returns. Tight stops look great on individual charts, but often hurt group performance. It is important to think GROUP and portfolio-level performance, not individual performance. 

Here are a few other system filters: 
-Stock must be a member of the S&P 500 
-Stock must be in uptrend (25-day EMA above 125-day EMA) 
-Stock must have a minimum price ($10)
-Stock must trade minimum Dollar volume ($5 million)
-Stock has not already doubled (125-day Rate-of-Change <100%)
-Stock must not be too volatile (<20%)
-Market conditions must be bullish (50-day EMA above 200-day EMA for S&P 500) 

Once all these conditions are met, the system ranks the stocks by the 125-day ROC and selects the top 20 stocks. Stocks are sold when the profit target of 10% is reached or the 25-day EMA crosses below the 125-day EMA. The stock with the highest 125-day Rate-of-Change is then added to the portfolio. 


Successful and Unsuccessful Trades

The first chart shows just how strange an individual trade may look. Keep in mind that the individual trades are not as important as the group. We never know which trade will be successful and which will fail, but the evidence suggests that enough trades will be successful and this will make the system successful.

The Align Technology chart shows a portfolio entry signal on November 20th and the portfolio entry on the next open (21-Nov).  The stock promptly fell around 15% from the entry price and this means most trailing stops based on the individual stock would have triggered. 

The medium-term uptrend, however, did not reverse because the PPO(25,125,0) remained positive to keep the trade open. Thus, ALGN remained part of the portfolio and subsequently surged to its profit target on January 28th. The stock left the portfolio on the next open (29-Jan).

The next chart shows FMC triggering a portfolio buy signal on September 20th and an entry on the next open (21-Sep). The stock advanced another 8% afterwards, but did not hit the profit target. The portfolio exit triggered when the PPO(25,125,0) moved into negative territory. 


In-Sample and Out-of-Sample Performance

The next table shows the backtest results for the in-sample period on line one (August 1997 to August 2017). The Compound Annual Return (14.24%) and win percent are strong (77%), but the Maximum Drawdown exceeded 25%, which was in 1998. Thus, the long-term results show a pretty big drawdown even when using a profit target. 

Line two shows out-of-sample results from August 2017 until February 2018. These results are exceptional with a Compound Annual Return of 24%, a Maximum Drawdown under 12% and a win rate of 69%. This fab results, of course, occurred when the Compound Annual Return for SPY was 22%.  


Drawdowns are Unavoidable

Unless you are exceptional at market timing, portfolio drawdowns are pretty much unavoidable. The February swoon hit portfolio equity with an 11.54% drawdown. This hurts, but keep in mind that the portfolio was up over 20% from late August to late January. With last week's bounce, the portfolio is still up year-to-date and up over 12% since August. 


Conclusions and Takeaways

I started this commentary thinking that the trend-momentum system with the profit target would reduce the drawdown and it would outperform a momentum rotation system. The drawdowns for the momentum rotation system were lower when testing over 20 years, but the drawdowns for trend-momentum system with a profit target were lower when testing over the last six to eighteen months. 

The portfolios and strategies are different so I am not exactly comparing apples to apples. The simple momentum rotation strategy has only 15 positions and uses the S&P 1500 with weekly data, while the trend-momentum profit target strategy has 20 positions and uses the S&P 500 with daily data. I will even these up next week and make an apples to apples comparison. 

This exercise was designed to show three things. 

  • First, I wanted to see out-of-sample results for these two systems. 
  • Second, momentum strategies are robust and chartists should incorporate some measure of momentum into their screening process. 
  • Third, these two systems performed well out-of-sample, but are clearly not immune to drawdowns. In fact, pretty much anyone with a portfolio of 15 to 20 stocks will be vulnerable to pullbacks in the broader market. 
  • Fourth, a portfolio level approach is completely different than selecting individual stocks based on chart and indicator setups. 

Keep in mind that past results do not guarantee future results. The results are based on taking every trading and following the system, which is much harder in a real life environment. 


Consulting, Software and Data

Cesar Alvarez of AlvarezQuantTrading.com provided feedback for the code and system development. 

Cesar has a great blog and provides consulting services for system development (click here). I used Amibroker to test the code and Premium Data from Norgate. Just like StockCharts, the data is adjusted for dividends to reflect the total return. I also tested using historical constituents to avoid survivorship bias.


Plan Your Trade and Trade Your Plan.

- Arthur Hill, CMT

Senior Technical Analyst, StockCharts.com

Book: Define the Trend and Trade the Trend
Twitter: Follow @ArthurHill


Arthur Hill
About the author: , CMT, is the Chief Technical Strategist at TrendInvestorPro.com. Focusing predominantly on US equities and ETFs, his systematic approach of identifying trend, finding signals within the trend, and setting key price levels has made him an esteemed market technician. Arthur has written articles for numerous financial publications including Barrons and Stocks & Commodities Magazine. In addition to his Chartered Market Technician (CMT) designation, he holds an MBA from the Cass Business School at City University in London. Learn More