The MACD indicator was developed in the 1970s by Gerald Appel. It’s been an extremely popular momentum indicator for many traders and is still used today. In this article, I look at what the MACD indicator does and how effective it is on stocks.
What does MACD mean?
MACD stands for moving average convergence/divergence. The indicator combines two moving averages and forms an oscillator by subtracting the longer-term moving average away from the shorter-term moving average.
The MACD is displayed as a histogram with the two moving average lines overlaid. It fluctuates above and below a zero line allowing traders to make trades whenever crossovers or divergence signals take place. MACD is an unbounded indicator, which means it has no theoretical upper or lower limit. Because of this, the indicator is better used for trend trading and not as an overbought/oversold oscillator.
Calculating the MACD indicator
The MACD is calculated by subtracting the 26-day EMA from the 12-day EMA. Then, a 9-day EMA is placed on top of the MACD in order to smooth it, and this is called the signal line. The signal line can then be used to find trade entries and exits.
Is the MACD a useless indicator?
The MACD is loved by some and hated by others – so how effective is it really? There are three popular ways to use the MACD indicator so let’s take a closer look at each one.
Probably the most common way to use the MACD is by watching for a crossover. When the MACD crosses above the signal line it’s a bullish signal and time to buy. Whereas when the MACD crosses below the signal line, it’s a bearish sign and time to sell or close the trade.
But how does this strategy actually pan out in reality?
In order to test the MACD crossover, I loaded up historical data for all stocks in the S&P 500 universe and ran the crossover strategy, long only, on each one between 1/1/2000 and 1/1/2015. I used the typical 12,16,9 parameters. Timeframes were set to daily and commissions were set to 0.2% per trade. This is in line with what I pay with IG Index.
Running the MACD crossover strategy on each individual stock in the S&P 500 universe between 2000 and 2015 revealed that on average, 37% of trades ended up being winners. Overall, the method gave an average profit/loss of 0.29% per trade.
Turning this strategy into a 10-position portfolio system*, you can see that the method doesn’t hold up too well. The strategy performed poorly as a portfolio giving an annualised return of -1.72% with a maximum drawdown of -45% over the time period.
So these are not great results. However, if we try the strategy on weekly timeframes, the results are much better. As shown below, using weekly timeframes produced an annual return of 11.73% over the period with a maximum drawdown of -34%. The results are not amazing but they are much better than buy and hold.
#2. Centre Line
A second way to use the MACD indicator is to look out for centre line crossovers. In other words, buy when the MACD crosses over zero, and sell when it crosses back under.
Testing this strategy on stocks in the S&P 500 universe between 1/1/2000 and 1/1/2015 did not fare brilliantly well either.
When run as a 10-position portfolio system, the results were poor, giving an annualised return of 2.16% with a maximum drawdown of -45% over the period.
A final way to use the MACD indicator is to look out for divergence. In this way, divergences indicate potential trend changes before they occur.
A bullish divergence comes when a security makes a new low but the MACD does not. Here, the fall in price indicates the continuation of the downtrend but the higher MACD means that momentum is decreasing and therefore the trend is slowing.
Conversely, a bearish divergence occurs when the security makes a new high but the MACD does not. Again, even though the stock may have made a new high, the lower MACD suggests that momentum is declining and the stock could drop.
Loading up the data once more, I used the typical MACD indicator (12,26) and instructed Amibroker to buy whenever a stock makes a new 26-day low AND the MACD(12,26) indicator is NOT at a new low. Trades are closed on a new 26-day high (orders placed on the next open).
Turning this strategy into a 10-position portfolio system, you can see that the method produces average returns. On daily timeframes the system gave an annualised return of 9.28% with a maximum drawdown of -44% over the period.
Perversely, running the strategy again but using weekly timeframes produced very similar results.
There appears to be a fairly large group of traders who are enamoured with the MACD indicator. Most tend to be swing traders who see the MACD as an oscillator able to predict short-term trends.
However, this is a technical indicator that is very easy to curve fit and data mine, because it has a large variety of parameters that can be optimised. And it’s for this reason that the MACD has never been one of my favourite indicators.
Furthermore, the test results appear to show that the MACD indicator (like so many other technical indicators) produces only average returns on long-term time frames.
Sure, the results may differ under different settings and markets. But in general, I cannot see why the MACD is so popular and I wonder why so many traders like it.
Final Word To Ed Seykota
If you’re still on the fence as to whether the MACD indicator is uselss, you might want to listen to the words of legendary trend follower Ed Seykota. This is a snippet of what Ed had to say about the MACD, taken from an article he wrote many years ago:
“The MACD provides a good example of the counterintuitive nature of system design. The delta with a nine-period moving average, intended to overcome the lag between price peaks and signals, actually increases the phase lag for intermediate-term and short-term cycles.
This supports the findings that MACD’s long-term trading results underperform simple systems while MACD’s short-term trading grows progressively worse.
Proponents of MACD generally acknowledge these findings, then elaborate that, well, it’s an indicator, not a signal, and must be used with other indicators, secret sauce and good judgment. So far, there have not been enough of these trading systems incorporating MACD that are precise enough to test historically.”
Best of luck and good trading. You may also like:
*System info: Starting equity is $10,000 split equally between 10 positions. Systems run using Norgate Premium Data including historical constituents. Duplicate trading signals ranked by RSI(14). Trades are entered on the next day open to avoid look-ahead concerns.