The MACD is one of the most popular technical indicators. It is widely available on a number of free web sites and is frequently shown on charts. But, it might not be well understood. In this article, we’ll take a look at what the indicator is, how it’s used and whether or not it works.
Formally, MACD is the Moving Average Convergence-Divergence indicator. It has been available to traders since at least the 1970s when Gerald Appel began writing about it. The indicator is most commonly viewed as a series of bars, like the ones shown below prices in the chart below.
MACD is designed to identify changes in the direction of price momentum. The chart above shows when momentum is rising or falling and it also shows whether momentum is above or below zero, in other words whether it’s bullish or bearish while showing degrees of bullishness or bearishness.
- Motley Fool’s Top 2019 Stock For The Marijuana BoomSponsored Content
We recommended this stock before the marijuana boom and while it’s grown 490% since, we have a very strong conviction this is just the beginning…
To find MACD, the calculation begins with two moving averages (MAs). Usually, the 12 period MA and 26 period MA will be used. Other time periods can be used and the calculations can be done with weekly or monthly data in addition to daily data.
The two MAs are calculated and then the value of the longer MA (the 26 day in this example) is subtracted from the shorter MA (the 12 day in this case). Instead of using a simple moving average, traders generally use exponential MAs to find MACD.
An exponential moving average, or EMA, is often thought of as being more responsive to the market action than a simple MA. This means the EMA will be closer to the most recent price than a simple MA and should give signals faster.
The formula for MACD is:
MACD = 12 day EMA – 26 day EMA
But, that’s not what is shown in the chart above. MACD is nearly always shown with a signal line, which is a 9 day EMA of the MACD line. The bars in the chart above are found by subtracting the value of the signal line from the MACD.
As the chart above shows, MACD can be used to generate clear buy and sell signals. The next chart uses color coding (red for sell signals, green for buy signals) to highlight some of the signals.
These signals are based on crossovers of the MACD. These are times when the value of the indicator (the MACD minus the signal line) crosses above or below zero. Traders simply buy when momentum is positive, after it crosses above zero. They sell when momentum is negative, or below zero.
Not all signals will work, as the chart shows. However, some of the MACD crossovers provide timely and long lasting trade signals. Others are quickly reversed resulting in whipsaw trades that last just a short time and lead to a small loss or gain.
Other traders watch MACD for divergences. Many traders believe that momentum leads price which should lead to changes in the direction of momentum before the reversal of a trend in prices.
If prices reach a new high while MACD is declining, that sets up a bearish divergence since the momentum turned lower and price is expected to follow. If MACD is rising as prices fall, that could be a bullish divergence with prices expected to turn higher following the change in momentum.
Divergences are usually identified in a subjective manner, with traders looking at the chart and deciding based on a visual interpretation if momentum is diverging from the trend in prices. One example is shown in the next chart.
At the left of the chart, we see that prices were rising but MACD was not confirming the up trend. An extended and significant decline followed. This is a chart of the euro and Thai baht foreign exchange pair, demonstrating that MACD can be applied to any market.
While the charts shown so far appear to show that MACD is useful, there are potential problems with visual analysis. Traders can, in effect, see what they want to see in a chart. Although signals appear to be profitable, these charts do not offer a comprehensive test of the indicator.
The first two charts are actually monthly charts, a slow time frame selected to show clear signals. The next chart shows the daily time frame and there are a number of signals with more whipsaws in this time frame.
While visual analysis is useful, quantitative testing should always be done whenever possible. Testing MACD is certainly possible. We could simply set up a test to buy when MACD crosses above zero, hold until MACD falls below zero and then sell and move to cash. This strategy is the one that can be seen in all of the charts above.
All tests should include the impact of commissions to reflect trading costs. In this test, we will use a cost of $5 for each trade. This will be more than some traders pay and less than other traders pay in commissions. But, it is important to factor in costs since trading in the real world carries costs.
The chart below shows the test results for a 15 year period. This test was completed on the SPDR S&P 500 ETF (NYSE: SPY). Tests were also done on the stocks that make up the index and the results were similar.
The %wins column shows the win rate for all trade signals. The average annual return shows the return, on an annualized basis, over the 15 years. The maximum drawdown is the largest decline in the account balance over the test period. It is a measure of risk that is simpler to understand than other measures like the Sharpe ratio or the information ratio.
For comparison, a buy and hold strategy would have delivered an average annual return of 3.8% over this test period. The maximum drawdown for the index was about 55%.
Conclusions on the MACD
The test results shown above take 100% of the signals the indicator generated. This results in whipsaw trades and losing trades. Overall, the win rate is not bad for a trading system based on rules and using only a single indicator. They may disappoint some traders but they are realistic.
Remember that trading costs are included in these test results. This creates a drag on performance but accurately presents results that are achievable.
Returns, in both the daily and weekly time frames, lagged a buy and hold strategy. This indicates the trading activity, after controlling for costs, may not be worth the effort with this indicator. However, the maximum drawdown is lowered and this could be beneficial to some traders.
The drawdown of 29% indicates a $10,000 account would dip to a value of about $7,100. A 55% drawdown which the buy and hold investor faced would see a $10,000 account balance dip to as low as $4,500.
The MACD indicator could be helpful in reducing risk. Reducing exposure to the stock market when the indicator is on a sell signal, or delaying new investments while the indicator is bearish, could help an investor avoid the worst of a bear market.
As a broad conclusion, MACD appears to be effective on charts. Quantitative testing of all signals shows that the indicator may not be particularly useful as a stand alone trading strategy. It could be used in combination with other indicators to develop a trading strategy.
It’s also possible to combine MACD with fundamentals. This would involve identifying potential buy candidates with a value screen and buying only when MACD is bullish. This could help avoid the value trap and improve investment results over the long run.
MACD is, of course, just one indicator that analysts use. Another indicator, one with a proven track record of success, is the cornerstone of Stock Trading Tips PPK System. You can learn more about this trading service by clicking here.