Wayne a. Thorp - The MACD a Combo of Indicators for the Best of Both Worlds

5
30 AAII Journal/January 2000 TECHNICAL ANALYSIS Moving averages are the easiest and most popular technical indicators. But they are trend-following indicators that work best in strong trending periods; in fact, moving average trading systems tend to lose money during periods of choppy trading. Since markets and individual securities will, at some point, enter a period of sideways or choppy trading where prices move up and down without any sense of direction, you may want to turn to an indicator that is more sensitive and responsive to that kind of trading behavior. Oscillators fit this bill. Technicians use oscillators in a variety of ways—to determine overbought and oversold conditions, to determine the momentum of a security or index, as well as to identify divergences between price and the indicator. This article focuses on one indicator that combines the best of both worlds—the trend-following characteristics of moving averages, and oscillator characteristics that help indicate whether a security is overbought or oversold and that help pinpoint potential divergences. The indicator is called moving average convergence/divergence, more commonly known as MACD. CALCULATING THE MACD The MACD is a trend-following momentum indicator developed by Gerald Appel that shows the relationship between two moving averages of price (normally the close). The MACD line is calculated by taking the difference between a longer-period and shorter-period exponential moving average. It is the interaction of these two moving averages that gives the indicator its name. Over time, the two moving averages are constantly converging and diverging. Exponential averages are used because they respond more quickly to changes in price, since more weight is placed on the most recent price compared to the earlier prices. [For a refresher on the calculation and uses of moving averages, see “An Intro to Moving Averages: Popular Technical Indicators” in the August 1999 AAII Journal]. A “signal” or trigger line is also used, which is the nine-period exponential moving average of the MACD line. Table 1 illustrates the MACD calculation used here. Two items, however, should be noted: First, you can use any length of period you wish when calculating the various exponential moving averages, although the 12-, 26-, and nine- period averages are most frequently used. Second, a period can be any length you choose—days, weeks, months, etc. In the examples used here, the MACD line is calculated using the 26- and 12-week moving averages, while the signal line is a nine-week moving average of the MACD. INTERPRETATION To understand how the MACD can be used in trading, you first need to know how it works. By Wayne A. Thorp Moving averages are trend-following indicators that don’t work well in choppy markets. Oscillators tend to be more responsive to that kind of trading behavior. The moving average convergence/ divergence indicator combines those characteristics. Wayne A. Thorp is assistant financial analyst of AAII. The figures in this article were produced using MetaStock by Equis. THE MACD: A COMBO OF INDICATORS FOR THE BEST OF BOTH WORLDS

description

Macd

Transcript of Wayne a. Thorp - The MACD a Combo of Indicators for the Best of Both Worlds

  • 30 AAII Journal/January 2000

    TECHNICAL ANALYSIS

    Moving averages are the easiest and most popular technical indicators. Butthey are trend-following indicators that work best in strong trending periods;in fact, moving average trading systems tend to lose money during periods ofchoppy trading.

    Since markets and individual securities will, at some point, enter a period ofsideways or choppy trading where prices move up and down without anysense of direction, you may want to turn to an indicator that is more sensitiveand responsive to that kind of trading behavior. Oscillators fit this bill.

    Technicians use oscillators in a variety of waysto determine overboughtand oversold conditions, to determine the momentum of a security or index,as well as to identify divergences between price and the indicator.

    This article focuses on one indicator that combines the best of bothworldsthe trend-following characteristics of moving averages, and oscillatorcharacteristics that help indicate whether a security is overbought or oversoldand that help pinpoint potential divergences. The indicator is called movingaverage convergence/divergence, more commonly known as MACD.

    CALCULATING THE MACD

    The MACD is a trend-following momentum indicator developed by GeraldAppel that shows the relationship between two moving averages of price(normally the close). The MACD line is calculated by taking the differencebetween a longer-period and shorter-period exponential moving average. It isthe interaction of these two moving averages that gives the indicator itsname. Over time, the two moving averages are constantly converging anddiverging. Exponential averages are used because they respond more quicklyto changes in price, since more weight is placed on the most recent pricecompared to the earlier prices. [For a refresher on the calculation and uses ofmoving averages, see An Intro to Moving Averages: Popular TechnicalIndicators in the August 1999 AAII Journal]. A signal or trigger line isalso used, which is the nine-period exponential moving average of the MACDline.

    Table 1 illustrates the MACD calculation used here. Two items, however,should be noted: First, you can use any length of period you wish when calculating the

    various exponential moving averages, although the 12-, 26-, and nine-period averages are most frequently used.

    Second, a period can be any length you choosedays, weeks, months, etc.In the examples used here, the MACD line is calculated using the 26- and12-week moving averages, while the signal line is a nine-week movingaverage of the MACD.

    INTERPRETATION

    To understand how the MACD can be used in trading, you first need toknow how it works.

    By Wayne A. Thorp

    Moving averages aretrend-followingindicators that dontwork well in choppymarkets. Oscillatorstend to be moreresponsive to thatkind of tradingbehavior. Themoving averageconvergence/divergence indicatorcombines thosecharacteristics.

    Wayne A. Thorp is assistant financial analyst of AAII. The figures in this article wereproduced using MetaStock by Equis.

    THE MACD: A COMBO OF INDICATORSFOR THE BEST OF BOTH WORLDS

  • AAII Journal/January 2000 31

    TECHNICAL ANALYSIS

    When the indicator is plotted on achart, including the MACD line andthe signal line, the most importantaspect is the interaction betweenthe two lines, as well as theirpositions relative tothe equilibrium, orzero, line.

    When the MACDis above the zeroline, it indicates thatthe shorter-periodmoving average isabove the longer-period movingaverage, which inturn indicates thatthe market is bullishon this security orindex. More accu-rately, currentexpectations aremore bullish thanthey were previ-ouslydemand isincreasing.

    When the MACDfalls below the zeroline, the shorter-

    period moving average is less thanthe longer-period moving average,indicating that demand is morebearish than it was in the past.

    Figure 1 shows the relationshipbetween the two moving averagelines and the MACD for ColumbiaEnergy Group. The top part of thechart contains the weekly price plotsfor Columbia, as well as a 12- and26-week exponential moving aver-age. The bottom portion containsthe MACD line, the signal line, andthe equilibrium, or zero, line. Twothings stand out from this chart.First, you can see that as the twomoving averages move away fromeach other, the MACD line rises.Second, you can see that when thetwo moving averages cross, there isa corresponding crossing of theequilibrium line by the MACD line.The points at which this takes placeare shown by the vertical lines onthe chart. In the week endingJanuary 22, 1999, the MACD linecrossed below the equilibrium line;at the same time, the 12-weekexponential moving average crossedbelow the 26-week average. Duringthe week ending June 4, 1999, the12-week moving average crossedabove the 26-week; at the sametime, the MACD line crossed abovethe equilibrium line.

    MACD = EMA1 EMA2

    Where:

    MACD = Moving Average Convergence/Divergence Value

    EMA1 = Current value of the first exponential moving average (using shorter period)

    EMA2 = Current value of the second exponential moving average (using longer period)

    Exponential Percentage Moving Averages:

    A weighted moving average calculated by taking a percentage of todays price and applying

    it to the previous periods moving average. The percentage is determined by the investor:

    EMA = (Todays close Exp %) + [(Previous period EMA) (1 Exp %)]

    Where:

    Exp % = The chosen exponential percentage

    Signal Line:

    SL = Previous period MACD + Exp % (MACD Previous period MACD)

    Where:

    Exp % = The chosen exponential percentage for the signal line

    TABLE 1. CALCULATING THE MACD,EXPONENTIAL MOVING AVERAGE, AND SIGNAL LINE

    FIGURE 1. THE MACD IN RELATION TO ITS MOVING AVERAGES

  • 32 AAII Journal/January 2000

    TECHNICAL ANALYSIS

    CROSSOVERS

    In general, MACD indicators areused in one of three wayscross-overs, overbought/oversold condi-tions, or divergences.

    Crossovers are probably the mostpopular use of MACDs: a sell signalis generated when the MACDcrosses below the signal line, and abuy signal is generated when theMACD crosses above the signal line.

    In addition, the locations of thesecrossovers in relation to the zero lineare helpful in determining buy andsell points. Bullish signals are moresignificant when the crossing of theMACD line over the signal linetakes place below the zero line.Confirmation takes place when bothlines cross above the zero line.

    Using the MACD in this waymakes it a lagging indicator. Justlike moving averageswhich arealso lagging indicatorsthe MACDworks best in strong trendingmarkets. Both the MACD andmoving averages are intended tokeep you on the right side of themarket (on the long side during

    uptrends and on the short side or outof the market altogether duringdowntrends), meaning you buy andsell late. While you may enter atrade after the beginning of a trendand exit before the trend comes toan end, these indicators are intendedto reduce your risk.

    Figure 2 shows the buy and sellsignals generated for Texas UtilitiesCompany by the crossovers of theMACD line and the signal line. Overthe period from June 1997 to August1999, this system generated fiveround-trip trades with an averagegain of 3.75% per trade. [Note thatthis system, and all systems used inthis article, deal only with longtrades.]

    The price behavior of TexasUtilities in Figure 2 highlights thestrengths and shortcomings of usingMACD crossovers in a tradingsystem. First of all, the MACDworks very well in strongly trendingmarkets, because it is a trend-following indicator. The first round-trip trade generated a gain of 18.7%over an eight-month period. Duringthis time, Texas Utilities experienced

    an almost uninter-rupted rise in its stockprice, which is indica-tive of a stronguptrend. However thetrades generated inJuly 1998 and again inJune and July 1999came during a periodwhen Texas Utilitiesprice was in a periodof choppy trading.These three round-triptrades all resulted inlosses, illustrating theshortcomings of theMACD in non-trending markets.

    OVERBOUGHT/OVERSOLD

    Another use for theMACD is to determinewhen a given securityor index is either

    overbought or oversold. An over-bought condition may exist whenthe price has experienced a signifi-cant upward move. At some pointyou expect that the price might falland return to some more normallevel. Likewise, when the price hasseen an extended downward move-ment, an oversold condition mayexist. At some point the price maybe expected to rise to some normallevel.

    A security or index may be over-bought when you see the MACDrise significantly. During this period,the shorter moving average used inthe MACD calculation is risingfaster than the longer movingaverage. This is an indication thatthe price is overextending itself and,at some point, may reverse itscourse.

    When using the MACD to identifyperiods when a security or index isoverbought or oversold, the best buysignals come when the MACD lineand the signal line are below thezero linethe security or index maybe oversold. Sell signals are gener-ated when the lines are above the

    FIGURE 2. BUY AND SELL SIGNALSGENERATED BY MACD CROSSOVERS

  • AAII Journal/January 2000 33

    TECHNICAL ANALYSIS

    zero, where they may indicate anoverbought condition.

    Unlike other oscillating indicatorssuch as the RSI (relative strengthindex), there is no pre-determinedoverbought or oversold condition.High and low MACDlevels are relative,depending on thesecurity or index youare examining. Youmay need to study thebehavior of theMACD over timebefore you can deter-mine when the price isoverbought or over-sold. Looking at theMACD behavior overan extended period oftime, you may be ableto discern patternswhere the MACD mayrise or fall to relativelysimilar levels, at whichpoint the price will fallor rise, respectivelyand with it the MACDlines. You should alsobe aware that over-

    bought and oversold levels need notbe symmetrical for a given securityor index (in other words, oversoldlevels can be higher relative tooverbought levels and vice versa).

    Although the MACD is a lagging

    indicator whentrading on thecrossovers, it is moreof a leading indica-tor when it is usedto highlight possibleoverbought oroversold conditions.A leading indicatoris useful because italerts you to whatprices may do in thefuture. Leadingindicators offer thepotential of greaterrewardsgetting inon the groundfloorwhile expos-ing you to greaterriskthe possibilityof the expected movetaking place fartheroff or never takingplace at all. There isthe assumption thatwhen a security

    appears to be oversold, its price willrise; conversely, there is the expecta-tion that a price that is overextendedor overbought will fall.

    Figure 3 is a 10-year weekly chartfor Cascade Natural Gas. Examining

    FIGURE 3. THE MACD AS AN OVERBOUGHT/OVERSOLD INDICATOR

    FIGURE 4. BEARISH DIVERGENCE IN THE MACD

  • 34 AAII Journal/January 2000

    TECHNICAL ANALYSIS

    the behavior of the MACD over thisperiod, you may be able to pick outsome recurring patterns in the priceand the MACD. The two darkerhorizontal lines in the MACDwindow mark the overbought andoversold regions for Cascade. At thetop region (overbought) you can seewhere the stock price frequentlyexperienced a fall shortly after theMACD penetrated this level. At theoversold level, the stock price oftensaw an increase shortly after thisregion was reached. Again, it isimportant to point out that theselevels are subjective and will varyfrom security to security.

    DIVERGENCES

    The third popular use of theMACD is to identify those timeswhen it diverges from the securityprice. A divergence occurs when thetrend of a securitys or indexs pricedoes not agree with that of anindicator. In other words, anindicator trends in one directionwhile the price goes another, or doesnot go in the same direction. MACDdivergences tend to preface areversal in the current price trend ofthe security or index in question.

    A bearish divergence occurs whenthe MACD is making new relativelows even though the price fails tomake new lows. An even strongerwarning is sounded in this case if theprice makes a new relative high (theprice peak is higher than the lastprice peak). This is the case in

    Figure 4 for Allegheny Energy.During the period from September1995 through February 1996, boththe price and MACD rose steadily.After that point, however, a diver-gence developed between the priceand the indicator. From February ofthat year until January of 1997, theMACD made a steady decline whileAlleghenys price, for the most part,continued to make higher highs. Thefall in the MACD is due to thecoming together of the 12-week and26-week exponential moving aver-ages, which can also be seen inFigure 4. Eventually, the pricereversed course and fell back in linewith the MACD.

    A bullish divergence takes placewhen the MACD is making newhighs even though prices fail toreach new highs. Again, greaterimportance should be placed if theprice makes a new relative low (aprice trough is lower than theprevious price trough) while thispattern develops. Furthermore, bothsignals carry greater significance ifthey occur at relative overbought oroversold levels.

    DAILY VS. WEEKLY

    All of the MACD examples hereare calculated using weekly prices.No matter which indicator you use,signals generated always carry moreweight as the time period being usedto calculate the indicator increases.Weekly signals are more significantthan daily signals, just as monthly

    signals carry more weight thanweekly signals.

    While weekly signals are of greaterimportance than daily signals, that isnot to say you should write-off theusefulness of daily movements.

    One technique used by techniciansis to track the behavior of theMACD on a daily basis. However,instead of entering or exiting a tradebased on a daily signal, they refer tothe weekly chart to see where theMACD is. For example, if youreceive a buy signal from the dailyMACD and you see that on theweekly chart the MACD is in abullish condition, you may wishto enter a long position. However, ifthe weekly MACD is in an over-bought condition, you will probablywant to ignore the buy signal fromthe daily MACD.

    Overall, you can use daily chartsto determine entry and/or exit pointsor to identify early trend warnings;ideally after you refer to a weeklychart.

    TRADING COMPANION

    The MACD takes the principle ofmoving averages and advances it onestep further.

    This indicator is useful whenexamining the interaction betweentwo moving averages. In addition, itis helpful in identifying points whenthe indicator and price diverge.

    However you may use it, theMACD could be a useful tradingcompanion. FFFFF