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:
– Using RSI – Can You Beat The Market?
– Testing Moving Average Crossover Strategies
– 30 Trading Strategies For Stocks
*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.
Which indicators will best suit for scalping? daytrading? and swing/position trading?
Maybe, you can enligthen me since you ‘ve started 8 years ago trading.
Have a great day!
I’m not sure if there is a preferred indicator for scalping. You need to learn to read the market and spot important levels. But unless you’re a professional trader with direct market access, I’d say scalping is going to be near impossible. Spreads are just too wide.
Day trading I like to look at pivot points as I discussed in another blog post. But never rely solely on one indicator. Better to combine it with your own experience and market reading skills. Naked price patterns and trend lines.
Swing/position trading I prefer RSI and moving averages. The most important thing is to get lots of practice in the market so you get a feel for the right trades.
When you say “get lots of practice”, you mean ? (demo, live account, internship…)
At the present time, there are so many choices and yet so few seem pertinent. Why?
I need to separate the wheat from the chaff, because everyone has something to “sell”.
Thanks a lot for your clear and precise answer.
I’m very grateful that you took some time to answer my previous question.
I will pull it off because of people like you at the end of the day.
Yes, all three. There is no substitute for screen time in my opinion. You have to put in the hours.
Some traders have worked at it for as much as 10 years before they were consistently profitable. So everyone has to decide if it’s really worth it. Because it’s not easy and for some people it will be a waste of time.
That is why everyone has something to sell, because everyone is looking for a quick way to succeed and not getting very far. Not only that, but financial markets are continuously evolving and changing.
But you can always educate yourself about how to invest better and if you have passion you will succeed.
Thanks a lot JB!
I’ve got the gut feeling, you ‘re a reliable guy! I’ll definitely keep in touch with you!
For me, it’s really worth it. Indeed, i’m committed for 20 years at least! But i prefer to say “a decade”because some people just don’t understand what committment is. Long story short, it took me a couple of years to discover “the holy grail.”
Somehow, i would say it’s as if i had already been successful. I love the journey.
Yep, it’s a great and fascinating journey to be on. Cheers for your message.