MACD

Last updated
Example of historical stock price data (top half) with the typical presentation of a MACD(12,26,9) indicator (bottom half). The blue line is the MACD series proper, the difference between the 12-day and 26-day EMAs of the price. The red line is the average or signal series, a 9-day EMA of the MACD series. The bar graph shows the divergence series, the difference of those two lines. MACDpicwiki.gif
Example of historical stock price data (top half) with the typical presentation of a MACD(12,26,9) indicator (bottom half). The blue line is the MACD series proper, the difference between the 12-day and 26-day EMAs of the price. The red line is the average or signal series, a 9-day EMA of the MACD series. The bar graph shows the divergence series, the difference of those two lines.

MACD, short for moving average convergence/divergence, is a trading indicator used in technical analysis of securities prices, created by Gerald Appel in the late 1970s. [1] It is designed to reveal changes in the strength, direction, momentum, and duration of a trend in a stock's price.

Contents

The MACD indicator [2] (or "oscillator") is a collection of three time series calculated from historical price data, most often the closing price. These three series are: the MACD series proper, the "signal" or "average" series, and the "divergence" series which is the difference between the two. The MACD series is the difference between a "fast" (short period) exponential moving average (EMA), and a "slow" (longer period) EMA of the price series. The average series is an EMA of the MACD series itself.

The MACD indicator thus depends on three time parameters, namely the time constants of the three EMAs. The notation "MACD(a,b,c)" usually denotes the indicator where the MACD series is the difference of EMAs with characteristic times a and b, and the average series is an EMA of the MACD series with characteristic time c. These parameters are usually measured in days. The most commonly used values are 12, 26, and 9 days, that is, MACD(12,26,9). As true with most of the technical indicators, MACD also finds its period settings from the old days when technical analysis used to be mainly based on the daily charts. The reason was the lack of the modern trading platforms which show the changing prices every moment. As the working week used to be 6-days, the period settings of (12, 26, 9) represent 2 weeks, 1 month and one and a half week. Now when the trading weeks have only 5 days, possibilities of changing the period settings cannot be overruled. However, it is always better to stick to the period settings which are used by the majority of traders as the buying and selling decisions based on the standard settings further push the prices in that direction.

Although the MACD and average series are discrete values in nature, but they are customarily displayed as continuous lines in a plot whose horizontal axis is time, whereas the divergence is shown as a bar chart (often called a histogram).

MACD indicator showing vertical lines (histogram) Macd indicator.jpg
MACD indicator showing vertical lines (histogram)

A fast EMA responds more quickly than a slow EMA to recent changes in a stock's price. By comparing EMAs of different periods, the MACD series can indicate changes in the trend of a stock. It is claimed that the divergence series can reveal subtle shifts in the stock's trend.

Since the MACD is based on moving averages, it is a lagging indicator. As a future metric of price trends, the MACD is less useful for stocks that are not trending (trading in a range) or are trading with unpredictable price action. Hence the trends will already be completed or almost done by the time MACD shows the trend.

Terminology

Over the years, elements of the MACD have become known by multiple and often over-loaded terms. The common definitions of particularly overloaded terms are:

Divergence:

  1. As the D in MACD, "divergence" refers to the two underlying moving averages drifting apart, while "convergence" refers to the two underlying moving averages coming towards each other.
  2. Gerald Appel referred to a "divergence" as the situation where the MACD line does not conform to the price movement, e.g. a price low is not accompanied by a low of the MACD. [3]
  3. Thomas Asprey dubbed the difference between the MACD and its signal line the "divergence" series.

In practice, definition number 2 above is often preferred.

Histogram: [4]

  1. Gerald Appel referred to bar graph plots of the basic MACD time series as "histogram". In Appel's Histogram the height of the bar corresponds to the MACD value for a particular point in time.
  2. The difference between the MACD and its Signal line is often plotted as a bar chart and called a "histogram".

In practice, definition number 2 above is often preferred.

Formula

The formula for the MACD line is based on two exponential moving averages of the close prices, usually with the periods of 12 and 26: [5]

The signal line is then built as the exponential moving average of the MACD line:

Mathematical interpretation

In signal processing terms, the MACD series is a filtered measure of the derivative of the input (price) series with respect to time. (The derivative is called "velocity" in technical stock analysis.) MACD estimates the derivative as if it were calculated and then filtered by the two low-pass filters in tandem, multiplied by a "gain" equal to the difference in their time constants. It also can be seen to approximate the derivative as if it were calculated and then filtered by a single low pass exponential filter (EMA) with time constant equal to the sum of time constants of the two filters, multiplied by the same gain. [6] So, for the standard MACD filter time constants of 12 and 26 days, the MACD derivative estimate is filtered approximately by the equivalent of a low-pass EMA filter of 38 days. The time derivative estimate (per day) is the MACD value divided by 14.

The average series is also a derivative estimate, with an additional low-pass filter in tandem for further smoothing (and additional lag). The difference between the MACD series and the average series (the divergence series) represents a measure of the second derivative of price with respect to time ("acceleration" in technical stock analysis). This estimate has the additional lag of the signal filter and an additional gain factor equal to the signal filter constant.

Classification

The MACD can be classified as an absolute price oscillator (APO), because it deals with the actual prices of moving averages rather than percentage changes. A percentage price oscillator (PPO), on the other hand, computes the difference between two moving averages of price divided by the longer moving average value.

While an APO will show greater levels for higher priced securities and smaller levels for lower priced securities, a PPO calculates changes relative to price. Subsequently, a PPO is preferred when: comparing oscillator values between different securities, especially those with substantially different prices; or comparing oscillator values for the same security at significantly different times, especially a security whose value has changed greatly.

Another member of the price oscillator family is the detrended price oscillator (DPO), which ignores long term trends while emphasizing short term patterns.

Trading interpretation

Exponential moving averages highlight recent changes in a stock's price. By comparing EMAs of different lengths, the MACD series gauges changes in the trend of a stock. The difference between the MACD series and its average is claimed to reveal subtle shifts in the strength and direction of a stock's trend. It may be necessary to correlate the signals with the MACD to indicators like RSI power.

Some traders attribute special significance to the MACD line crossing the signal line, or the MACD line crossing the zero axis. Significance is also attributed to disagreements between the MACD line or the difference line and the stock price (specifically, higher highs or lower lows on the price series that are not matched in the indicator series).

Signal-line crossover

A "signal-line crossover" occurs when the MACD and average lines cross; that is, when the divergence (the bar graph) changes sign. The standard interpretation of such an event is a recommendation to buy if the MACD line crosses up through the average line (a "bullish" crossover), or to sell if it crosses down through the average line (a "bearish" crossover). [7] These events are taken as indications that the trend in the stock is about to accelerate in the direction of the crossover.

Zero crossover

A "zero crossover" event occurs when the MACD series changes sign, that is, the MACD line crosses the horizontal zero axis. This happens when there is no difference between the fast and slow EMAs of the price series. A change from positive to negative MACD is interpreted as "bearish", and from negative to positive as "bullish". Zero crossovers provide evidence of a change in the direction of a trend but less confirmation of its momentum than a signal line crossover.

Divergence

A "positive divergence" or "bullish divergence" occurs when the price makes a new low but the MACD does not confirm with a new low of its own. A "negative divergence" or "bearish divergence" occurs when the price makes a new high but the MACD does not confirm with a new high of its own. [8] A divergence with respect to price may occur on the MACD line and/or the MACD Histogram. [9]

Timing

The MACD is only as useful as the context in which it is applied. An analyst might apply the MACD to a weekly scale before looking at a daily scale, in order to avoid making short term trades against the direction of the intermediate trend. [10] Analysts will also vary the parameters of the MACD to track trends of varying duration. One popular short-term set-up, for example, is the (5,35,5).

False signals

Like any forecasting algorithm, the MACD can generate false signals. A false positive, for example, would be a bullish crossover followed by a sudden decline in a stock. A false negative would be a situation where there is bearish crossover, yet the stock accelerated suddenly upwards.

A prudent strategy may be to apply a filter to signal line crossovers to ensure that they have held up. An example of a price filter would be to buy if the MACD line breaks above the signal line and then remains above it for three days. As with any filtering strategy, this reduces the probability of false signals but increases the frequency of missed profit.

Analysts use a variety of approaches to filter out false signals and confirm true ones.

A MACD crossover of the signal line indicates that the direction of the acceleration is changing. The MACD line crossing zero suggests that the average velocity is changing direction.

See also

Related Research Articles

In finance, technical analysis is an analysis methodology for analysing and forecasting the direction of prices through the study of past market data, primarily price and volume. As a type of active management, it stands in contradiction to much of modern portfolio theory. The efficacy of technical analysis is disputed by the efficient-market hypothesis, which states that stock market prices are essentially unpredictable, and research on whether technical analysis offers any benefit has produced mixed results. It is distinguished from fundamental analysis, which considers a company's financial statements, health, and the overall state of the market and economy.

The relative strength index (RSI) is a technical indicator used in the analysis of financial markets. It is intended to chart the current and historical strength or weakness of a stock or market based on the closing prices of a recent trading period. The indicator should not be confused with relative strength.

<span class="mw-page-title-main">Moving average</span> Type of statistical measure over subsets of a dataset

In statistics, a moving average is a calculation to analyze data points by creating a series of averages of different selections of the full data set. Variations include: simple, cumulative, or weighted forms.

In financial technical analysis, momentum (MTM) and rate of change (ROC) are simple indicators showing the difference between today's closing price and the close N days ago. Momentum is the absolute difference in stock, commodity:

<span class="mw-page-title-main">Trix (technical analysis)</span>

Trix is a technical analysis oscillator developed in the 1980s by Jack Hutson, editor of Technical Analysis of Stocks and Commodities magazine. It shows the slope of a triple-smoothed exponential moving average. The name Trix is from "triple exponential."

The commodity channel index (CCI) is an oscillator originally introduced by Donald Lambert in 1980.

<span class="mw-page-title-main">Keltner channel</span> Chart analysis indicator

Keltner channel is a technical analysis indicator showing a central moving average line plus channel lines at a distance above and below. The indicator is named after Chester W. Keltner (1909–1998) who described it in his 1960 book How To Make Money in Commodities. This name was applied by those who heard about it from him, but Keltner called it the ten-day moving average trading rule and indeed made no claim to any originality for the idea.

<span class="mw-page-title-main">Detrended price oscillator</span>

The detrended price oscillator (DPO) is an indicator in technical analysis that attempts to eliminate the long-term trends in prices by using a displaced moving average so it does not react to the most current price action. This allows the indicator to show intermediate overbought and oversold levels effectively.

The Negative Volume Index and Positive Volume Index indicators are indicators to identify primary market trends and reversals.

The mass index is an indicator, developed by Donald Dorsey, used in technical analysis to predict trend reversals. It is based on the notion that there is a tendency for reversal when the price range widens, and therefore compares previous trading ranges.

<span class="mw-page-title-main">Ultimate oscillator</span>

The ultimate oscillator is a theoretical concept in finance developed by Larry Williams as a way to account for the problems experienced in most oscillators when used over different lengths of time.

In technical analysis of securities trading, the stochastic oscillator is a momentum indicator that uses support and resistance levels. George Lane developed this indicator in the late 1950s. The term stochastic refers to the point of a current price in relation to its price range over a period of time. This method attempts to predict price turning points by comparing the closing price of a security to its price range.

The McClellan oscillator is a market breadth indicator used in technical analysis by financial analysts of the New York Stock Exchange to evaluate the balance between the advancing and declining stocks. The McClellan oscillator is based on the Advance-Decline Data and it could be applied to stock market exchanges, indexes, portfolio of stocks or any basket of stocks.

<span class="mw-page-title-main">Moving average crossover</span>

In the statistics of time series, and in particular the stock market technical analysis, a moving-average crossover occurs when, on plotting two moving averages each based on different degrees of smoothing, the traces of these moving averages cross. It does not predict future direction but shows trends. This indicator uses two moving averages, a slower moving average and a faster moving average. The faster moving average is a short term moving average. For end-of-day stock markets, for example, it may be 5-, 10- or 25-day period while the slower moving average is medium or long term moving average. A short term moving average is faster because it only considers prices over short period of time and is thus more reactive to daily price changes. On the other hand, a long term moving average is deemed slower as it encapsulates prices over a longer period and is more lethargic. However, it tends to smooth out price noises which are often reflected in short term moving averages.

The doji is a commonly found pattern in a candlestick chart of financially traded assets in technical analysis. It is characterized by being small in length—meaning a small trading range—with an opening and closing price that are virtually equal. The efficacy of technical analysis is disputed by the efficient-market hypothesis, which states that stock market prices are essentially unpredictable.

<span class="mw-page-title-main">Ichimoku Kinkō Hyō</span>

Ichimoku Kinko Hyo (IKH) (Japanese: 一目均衡表, Hepburn: Ichimoku Kinkō Hyō), usually shortened to "Ichimoku", is a technical analysis method that builds on candlestick charting to improve the accuracy of forecast price moves.

In financial technical analysis, the know sure thing (KST) oscillator is a complex, smoothed price velocity indicator developed by Martin J. Pring.

The true strength index (TSI) is a technical indicator used in the analysis of financial markets that attempts to show both trend direction and overbought/oversold conditions. It was first published William Blau in 1991. The indicator uses moving averages of the underlying momentum of a financial instrument. Momentum is considered a leading indicator of price movements, and a moving average characteristically lags behind price. The TSI combines these characteristics to create an indication of price and direction more in sync with market turns than either momentum or moving average. The TSI is provided as part of the standard collection of indicators offered by various trading platforms.

Chaikin Analytics

Chaikin Analytics is a platform for stock trading ideas. It was founded in 2011 by Marc Chaikin. The centerpiece of Chaikin Analytics is the Chaikin Power Gauge stock rating. In 2016, it was named one of "Two Top Websites for Quantitative Analysis" by Barron's (newspaper).

<span class="mw-page-title-main">Volume analysis</span> Metric for shares traded over time

Volume Analysis is an example of a type of technical analysis that examines the volume of traded securities to confirm and predict price trends. Volume is a measure of the number of shares of an asset that are traded in a given period of time. As one of the oldest market indicators used for analysis, sudden changes in volume are often the result of news-related events. Commonly used by chartists and technical analysts, volume analysis is centered on the following ideas:

References

  1. Appel, Gerald (2005). Technical Analysis Power Tools for Active Investors. Financial Times Prentice Hall. p. 166. ISBN   0-13-147902-4.
  2. Lawler, Jasper. "What is MACD? A MACD trading strategy example". www.flowbank.com. Retrieved 2021-02-03.
  3. Appel, Gerald (2005). Technical Analysis Power Tools for Active Investors. Financial Times Prentice Hall. ISBN   0-13-147902-4.
  4. Patterson, Jackie Ann (2014). Truth About MACD: What Worked, What Didn't Work, and How to Avoid Mistakes Even Experts Make. Own Mountain Trading Company. pp. 19–21. ISBN   978-1492749844.
  5. Pat Tong Chio (2022). "A comparative study of the MACD-base trading strategies: Evidence from the US stock market". arXiv: 2206.12282 .
  6. The MACD Approach to Derivative (Rate of Change) Estimation
  7. "Moving Average Convergence Divergence". Investopedia. Investopedia LLC. Retrieved 29 June 2016.
  8. "Using the MACD". Investors Underground. Retrieved 29 June 2016.
  9. Patterson, Jackie Ann (2014). Truth About MACD: What Worked, What Didn't Work, and How to Avoid Mistakes Even Experts Make. Own Mountain Trading Company. pp. 45–99. ISBN   978-1492749844.
  10. Murphy, John (1999). Technical Analysis of the Financial Markets. Prentice Hall Press. pp. 252–255. ISBN   0-7352-0066-1.