From the December 01, 2011 issue of Futures Magazine • Subscribe!

Stock trading with MACD

The moving average convergence-divergence (MACD) originally was constructed by Gerald Appel, an analyst in New York at the time, as a technique for analyzing stock trends. The indicator achieved widespread application by many traders across all types of markets. Today, it is one of the most widely referenced gauges of the market’s technical condition.

There is good reason for this. MACD is one of the simplest and most intuitive indicators available. Over time, it has demonstrated a satisfying level of reliability. While not always perfect, of course, when MACD doesn’t signal precise entry and exit points, it usually conveys valuable information about the general state of the market — bullish or bearish — and points traders in the right direction.

MACD is constructed by subtracting a longer moving average from a shorter moving average. A moving average is simply the average value of prices over the most recent N days. The shorter average is believed to be more responsive to price changes; the longer average is considered less responsive. By subtracting the value of the longer moving average from the value of the shorter moving average, we generate the difference. This can be plotted by itself below the price chart. The plot will oscillate above and below zero, with (theoretically) no upper or lower limit. In addition to the MACD, the oscillator chart often includes two other plots. One is the signal line, which is just a moving average of the MACD itself. The other is a histogram. The histogram is just a visual aid, indicating how far the oscillator is from its signal line.

Traders typically speak of a "fast" MACD and a "slow" MACD. For our purposes, we’ll consider a fast MACD one that uses shorter moving averages (say, five and 10 periods) to produce a quicker, more responsive indicator. We’ll consider a slow MACD one that uses longer moving averages (say, 12 and 26 periods) to produce a slower indicator, but one that is less prone to false signals and whipsaw-type action. Most charting packages have a default of 12 periods for the fast-moving average and 26 periods for the slow.

MACD remains a viable method for analyzing both stock trends and identifying short-term changes in market trend, particularly in both the overall stock market and individual stocks.

Understanding MACD

For our MACD, we’ll turn to the 12- and 26-day averages. Instead of simple moving averages, we’ll use exponential moving averages (EMA), which are calculated to reflect prices over the stated period but emphasize more recent values.

A positive MACD is generated when the 12-day EMA is trading above the 26-day EMA. A negative MACD indicates that the 12-day EMA is trading below the 26-day EMA. If MACD is positive and rising, then the gap between the faster moving average (blue) and the slower moving average (red) is widening (see "MACD in the S&P," below). This indicates that the rate-of-change of the faster moving average is higher than that of the slower moving average. Positive momentum is increasing, indicating a bullish period for the price plot. Included in "MACD in the S&P" are the 12- and 26-period EMAs. Notice how MACD indicated a buy signal several bars before a basic moving average cross.

If MACD is negative and declining, then the negative gap between the faster moving average (blue) and the slower moving average (red) is expanding. Downward momentum is accelerating, indicating a bearish trading period. MACD centerline crossovers occur when the faster moving average crosses the slower one.

comments powered by Disqus