You are on page 1of 4

EQUITIES

TRADING TECHNIQUES

Trading stocks with MACD


BY B R A M E S H B H A N DA R I

One of the simplest and most easily analyzed technical indicators, MACD has a number of applications that help you initiate stock trades.

he moving average convergencedivergence (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 markets 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 doesnt 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.
Directional indicators Divergence & crossovers

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
32
FUTURES December 2011

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, well consider a fast MACD one that uses shorter moving averages (say, five and 10 periods) to produce a quicker, more responsive indicator. Well 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, well turn to the 12- and 26-day averages. Instead of simple moving averages, well 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, right). 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.


Bullish/bearish signals There are a number of bullish signals generated by the MACD. They can be broken down as positive divergence, a bullish moving average crossover and a bullish centerline crossover. A positive divergence occurs when MACD begins to advance and the index or stock is still in a downtrend and makes a lower reaction low. Positive divergences probably are the least common of the three signals, but usually are the most reliable, and lead to the biggest moves (see Technical divergence, right). A bullish moving average crossover occurs when MACD moves above its signal line (in this case, a nine-day EMA). Signal line crossovers are the most frequent signals given by the MACD (see Signal line cross, page 34). If these arent used in conjunction with other technical analysis tools, the trader following them can fall victim to numerous false signals. The bullish centerline crossover is another somewhat common occurrence. This signal is generated when the MACD moves above the zero line and into positive territory (see Bull move, page 34). It tells us that price momentum has changed from bearish to bullish. The mirror of the bullish signals can be used to identify potential bearish turns in the stock market. These are known as negative divergence, bearish moving average crossovers and bearish centerline crossovers. As with bullish divergence, negative divergence is the most subjective of the three common bearish signals. Negative divergence forms when the index or security advances or moves sideways, and the MACD declines. Negative divergence in MACD can take the form of either a lower-high or a straight decline. Negative divergences probably are the least common of the three sig-

MACD IN THE S&P


The late-August cross of the MACD histogram into positive territory is a stellar example of the indicator forecasting a strong trend in the S&P 500. Also notice how MACD indicated a buy signal several bars ahead of a simple moving average cross. S&P 500
137500 135000 132500 130000 127500 125000 122500 120000 117500 115000 112500 110000 107500 105000 102500 100000 20 10 0

MACD histogram MACD minus the MACD signal link

MACD Signal

MACD 12-period EMA minus 26-period EMA


Jul Aug Sep Oct Nov Dec

MACD signal Line 9-period EMA


2011 Feb Mar Apr May Jun Jul

-10 -20 Aug


Source: eSignal

TECHNICAL DIVERGENCE
When MACD moves higher (or lower) and the price of the stock or index fails to respond, this is known as divergence and indicates a potential price move, as shown here in the Nasdaq Composite.

Nasdaq Composite
Positive divergence in Nasdaq observed with index making lower lows and MACD making higher highs

2600 2550 2500 2450 2400 2350 2300 2250 2200 2150 2100 2050 50 25 0

MACD signal

-25 -50 Apr May Jun Jul Aug Sep Oct Nov Dec
Source: eSignal

futuresmag.com

33

TRADING TECHNIQUES continued

SIGNAL LINE CROSS


The red signal line is an EMA of the MACD plot. When the MACD moves above it, it is considered a bullish development, as shown here with Apple. As you can see in the indicator plot, crossovers are common and can give frequent false signals.
Apple Inc.
430 420 410 400 390 380 370 360 350 340

MACD moving above 9 EMA line and Apple starts its BULL run

330 320 310

MACD Signal

15 10 5 0 -5 Apr May Jun Jul Aug Sep Oct


Source: eSignal

nals, but usually are the most reliable and can warn of an impending peak (see Before the fall, right). As on the bullish side, the more common signals are the bearish moving average crossover and the bearish centerline crossover. A bearish moving average crossover occurs when MACD declines below its signal line. A bearish signal line crossover occurs when MACD moves below its zero line and into negative territory; this is a clear indication that momentum has changed from bullish to bearish. Often, a centerline crossover can act as a confirmation of either a moving average crossover or negative divergence. In any case, once MACD crosses into negative territory, momentum, at least for the short-term, has turned bearish. Of course, all of these analysis approaches can be modified in a number of ways. For example, you might place different weight on signal line crossovers that occur in positive or negative territory, or those that occur at recent extremes in the MACD itself.
Strengths & weaknesses The primary strengths of MACD are that it incorporates aspects of both momentum and trend in one indicator. The use of moving averages ensures that the indicator eventually will follow the movements of the underlying security. As a momentum indicator, MACD has the ability to foreshadow moves in the underlying index or security. For example, MACD divergences can be key factors in predicting a trend change. The effectiveness of the MACD will vary for different securities and markets. As with all indicators, MACD is not infallible and should be used in conjunction with other technical analysis tools, such as trendlines, volatility measures or cycle analysis. One of the beneficial aspects of the MACD also is one of its drawbacks. Moving averages, be they simple, exponential or weighted, are lagging indicators. Even though the MACD

BULL MOVE
When MACD went positive, IBM responded with a solid short-term rally. IBM
MACD going above zero line; IBM gaining positive momentum

190 185 180 175 170 165 160

5 MACD Signal 2.5 0 -2.5 Apr May Jun Jul Aug Sep Oct
Source: eSignal

34

FUTURES December 2011

represents the difference between two moving averages, there still can be some lag in the indicator itself. This is more likely to be the case with weekly charts rather than daily. Some traders avoid the MACD because it has achieved widespread use in the markets. Perhaps familiarity has bred contempt or they believe that the indicators signals are discounted by the markets. You may believe this is so, but base it on first-hand experience, not assumptions or unproven biases. Of course, if an indicator isnt working for you, move on. But for most stock traders, MACD can point you in the right direction. It shouldnt be your only tool, but its definitely one worth keeping at the ready.
Bramesh Bhandari trades the Indian stock market and teaches technical analysis to traders. He can be reached at: bhandaribrahmesh@gmail.com.

BEFORE THE FALL


JP Morgan initiated a steady and prolonged decline in early to mid-2011. This was preceded by a clear negative divergence between price and MACD. JP Morgan Chase & Co.
49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 MACD Signal 1.0 0.5 0 -.05 -1.0 Aug Sep Oct Nov Dec 2011 Feb Mar Apr
Source: eSignal

JP Morgan moving up but MACD forming lower-high formation and negative divergence, and JPM down to $39 from high of $48.

TRADING TECHNIQUES continued

Trading Techniques: Kmiecik continued from page 31

options get closer to expiration, the delta on the spread will widen. However, the goal of the trade remains the same: For the stock to trade over the sold calls strike by December expiration.
Bearish scenario A bear put spread (bearish vertical debit spread) involves buying a put option and selling a lower strike put. The maximum gain on this spread is the difference in the strike prices minus the cost of the trade. The most the option trader can lose is the cost of the spread. Its Oct. 25 and ZZZ stock is trading at $318.50 a share. An option trader believes the stock is overbought and might decline over the next month. The options are pretty expensive, and the trader worries that the stock might keep rising, so a bear put spread makes sense. The trader can buy the November 315 put (just OTM) with a current delta of 0.44 for $9 and sell the OTM November 305 put with a current delta of 0.28 for $5.25. The cost of the

spread is $3.75 ($9 $5.25), which is the most the trader can lose if the stock finishes above $315 by November expiration (see Bear put debit spread, page 31). The maximum profit potential on the trade is $6.25 ($10 - $3.75), which is the difference in the strikes minus the cost of the trade. This would be achieved if ZZZ finished below $305 at November expiration. Breakeven on this trade can be calculated by subtracting the cost of the trade from the long puts strike price. In this example, its $311.25 ($315 - $3.75) at November expiration. Just like what was shown in the bullish example, if the November 315 put were bought on its own, the breakeven on the trade would be $306 ($315 - $9), which is quite a bit more. Currently, the delta on the spread is 0.16 (0.44 - 0.28), which means the trade will make or lose 16 for every dollar the stock goes up or down. Again, this can be a disadvantage, but if the stock rallies even more, which was one of the

concerns, the trader will lose less on the spread than by just being long the puts. The maximum profit goal of the bear put spread is to have the stock trading below the sold puts strike at November expiration. Vertical debit spreads are a relatively easy to understand and pretty straightforward option strategy. Just like any other option strategy, each has advantages and disadvantages. When deciding whether to buy just calls or puts, or to buy a vertical debit spread, the pros and cons of each have to be debated. Often, however, this analysis will come down on the side of the spread. With this strategy in your arsenal, you now can be prepared for those times.
John Kmiecik has worked for several firms, including Goldman Sachs and First Options of Chicago, and has traded professionally for hedge funds. Currently, he is an options coach for Market Taker Mentoring LLC. E-mail him at john@markettaker.com.
futuresmag.com

35