Moving Average, Weighted Moving Average, and Exponential Moving Average (2024)

Active traders use moving averages to measure momentum. These are technical indicators that calculate the average price of a security over a specific period. Since they take the average, they can help smooth out noisy price fluctuations, making it easier to spot trends. The primary difference between a simple, weighted, and exponential moving average is the formula used to create it.

Key Takeaways

  • Moving averages are technical indicators traders use to see the average price movement over a certain period.
  • The main difference between simple, weighted, and exponential moving averagesis their sensitivity to changes in the data used.
  • The simple moving average (SMA) calculates the average price over a specific period, while the weighted moving average (WMA) gives more weight to present data.
  • The exponential moving average (EMA) is also weighted towardthe most recent prices, but the rate of decrease between one price and its preceding price is not consistent but exponential.

Simple Moving Average

The SMA was more prevalent before the emergence of computers because it is easy to calculate. Today, many platforms provide other types of moving averages and technical indicators without the need for a hand calculator. A moving average calculates the average closing price for a specific period. It typically uses daily closing prices, but other time frames can be used.

Other price data, such as the opening price or the median price, can also be used. As a new price rolls in, it's added to the data, while the oldest price in the series is removed.

For a simple moving average, the formula is the sum ofthe data points over a given period divided by the number of the data points. For example, the closing prices of Apple Inc(AAPL) from March 18 to 22, 2024, was as follows:

Date Closing Price of AAPL
March 22 $172.28
March 21 $171.37
March 20 $178.67
March 19 $176.08
March 18 $173.72

A five-period moving average, based on the prices above, would use the following formula:

MA=P1+P2+P3+P4+P55where:Pn=Pricefortimeperiod\begin{aligned} &\text{MA} = \frac{ P_1 + P_2 + P_3 + P_4 + P_5 }{ 5 } \\ &\textbf{where:} \\ &P_n = \text{Price for time period} \\ \end{aligned}MA=5P1+P2+P3+P4+P5where:Pn=Pricefortimeperiod

or: (172.28 +171.37 + 178.67 + 176.08 +173.72)/5 = 174.22

This result shows that the average price was $174.22. Using moving averages is an effective method for eliminating strong price fluctuations. The main limitation is that data points from older data arenot weighted any differently than data points nearthe beginning of the dataset. This is where weighted moving averages come into play.

Weighted Moving Average

WMAs assign a heavier weighting to more current data points since they are more relevant than data points from the more remote past. The sum of the weighting should add up to one (or 100%). For a simple moving average, the weightings are equally distributed, which is why they are not shown in the table above.

For example, using the same closing prices above, we can calculate the weighted moving average with these prices and the formula below them.

Date Closing Price of AAPL Weighting
March 22 $172.38 5/15
March 21 $171.37 4/15
March 20 $178.67 3/15
March 19 $176.08 2/15
March 18 $172.72 1/15

WMA=Price1×n+Price2×(n1)+Pricenn×(n+1)2where:n=Timeperiod\begin{aligned} &\text{WMA} = \frac{ \text{Price}_1 \times n + \text{Price}_2 \times ( n - 1 ) + \cdots \text{ Price}_n }{ \frac{ n \times ( n + 1 ) }{ 2} } \\ &\textbf{where:} \\ &n = \text{Time period} \\ \end{aligned}WMA=2n×(n+1)Price1×n+Price2×(n1)+Pricenwhere:n=Timeperiod

The denominator of the WMA is the sum of the number of price periods as a triangular number.From the data above, the weighted five-day moving average would be $173.85:

(172.38×5/15)+(171.37×4/15)+178.67×3/15)+(176.08×2/15)+(172.72×1/15)=173.85(172.38 × 5/15) + (171.37 × 4/15) + 178.67 × 3/15) + (176.08 × 2/15) + (172.72 × 1/15) = 173.85(172.38×5/15)+(171.37×4/15)+178.67×3/15)+(176.08×2/15)+(172.72×1/15)=173.85

In this example, the recent data point was given the highest weighting out of an arbitrary 15 points. You can weigh the values out of any value you see fit. The lower value from the weighted average above relative to the simple average suggests that recent selling pressure could be more significant than some traders anticipate. The most popular choice of traders when using weightedmoving averages is to use a higher weighting for recent values.

Exponential Moving Averages

EMAsare also weighted towardthe most recent prices, but the rate of decrease between one price and its preceding price is not the same rate of change but exponential. Rather than every preceding weight being 1.0 smaller than the weight in front of it, there might be a difference between the first two period weights of 1.0, a difference of 1.2 for the two periods after those periods, and so on. The formula for EMA is as follows:

EMA=Pricet×k+SMAy×(1k)where:t=Todayk=2Numberofdaysinperiod+1SMA=SimpleMovingAverageofclosingpriceforthenumberofdaysintheperiody=Yesterday\begin{aligned} &\text{EMA} = \text{Price}_t \times k + \text{SMA}_y \times ( 1 - k ) \\ &\textbf{where:} \\ &t = \text{Today} \\ &k = \frac { 2 }{ \text{Number of days in period} + 1 } \\ &\text{SMA} = \text{Simple Moving Average of closing price} \\ &\text{for the number of days in the period} \\ &y = \text{Yesterday} \\ \end{aligned}EMA=Pricet×k+SMAy×(1k)where:t=Todayk=Numberofdaysinperiod+12SMA=SimpleMovingAverageofclosingpriceforthenumberofdaysintheperiody=Yesterday

Calculating an EMA involves three steps. The first is to determine the SMA for the period. Then, a multiplier is calculated by dividing two by the number of periods and adding one. The final step is to take the closing price and subtract the previous day's EMA and times that by the multiplier plus the previous day's EMA.

The table below shows the previous data again with a five-day EMA.

DateClosing Price of AAPL5 Day EMA
March 22$172.28$173.51
March 21$171.37$174.13
March 20$178.67$175.51
March 19$176.08$173.93
March 18$172.72$172.86

The EMA responds most to price changes and is the most complex calculation among the three moving averages. Ultimately, which one you choose depends on your trading strategy.

Which Moving Average Is Best?

Because anexponential moving average(EMA) uses an exponentially weighted multiplier to give more weight to recent prices, some believe it is a better indicator of a trend than aWMAor SMA. Many analysts think that the EMA responds better to changes in trends. By contrast, the more basic smoothing provided by the SMA could mean it's better for finding simple support and resistance areas on a chart and moving averages help with smoothing price data that can otherwise be visuallynoisy.

The EMA and WMA are used for similar purposes since they rely more on the most recent prices. Traders will use EMAs or WMAs over the SMA when concerned that lags in the data might lower the responsiveness of the moving average indicator.

All moving averages have a significant drawback in that they arelagging indicators. Since moving averages are based on prior data, they suffer a time lag before they reflect a change in trend. Therefore, a stock price may move sharply before a moving average can show a trend change. A shorter moving average suffers from less lag than a longer moving average.

Still, lags are helpful for specific technical indicators, such as moving average crossovers. For example, the technical indicator known as thedeath crossoccurs when the 50-day SMA moves below the 200-day SMA, which is considered a bearish signal. An indicator going the opposite direction, the golden cross, occurs when the 50-day SMA crosses above the 200-day SMA and is regarded as a bullish signal.

What Is the Difference Between a Moving Average and a Rolling Average?

The terms moving average and rolling average are often used interchangeably, but they can be distinguished by how they are applied. Both involve averaging data points to smooth out short-term fluctuations and highlight longer-term trends. Moving averages are a subset of rolling averages, with specific types (e.g., SMA, WMA, and EMA) tailored for analyzing financial time series data.

What is a Triangular Moving Average?

A triangular moving average (TMA) is designed to provide a smoother average of a time series. It's called "triangular" because the weights given to the prices form a triangle, which emphasizes the middle portfolio of the time series. Essentially, a TMA is a double-smoothed SMA, which means it applies the smoothing process twice.

What Is a Double Exponential Moving Average?

The double exponential moving average (DEMA) is a technical indicator that aims to reduce the lag of traditional moving averages and improve responsiveness to recent price changes. Developed by Patrick Mulloy and introduced in 1994, the DEMA is not simply a double application of an EMA but a unique composite of a single EMA and a double EMA that provides a faster reaction to price moves.

The Bottom Line

Moving averages, including the SMA, WMA, and EMA, are tools in technical analysis, each designed to smooth out price data to identify trends over time. While the SMA offers a straightforward average of prices over a specific period, the WMA assigns more weight to recent prices, aiming to make it more responsive to new information. The EMA goes a step further by applying an exponentially weighted multiplier to give even greater emphasis to the most recent prices, enhancing its sensitivity to price changes and reducing lag more effectively than the SMA and WMA. These variations are for different strategies and preferences, enabling analysts and investors to choose the moving average that best aligns with their needs.

Article Sources

Investopedia requires writers to use primary sources to support their work. These include white papers, government data, original reporting, and interviews with industry experts. We also reference original research from other reputable publishers where appropriate. You can learn more about the standards we follow in producing accurate, unbiased content in oureditorial policy.

  1. P. J. Kaufman. "Trading Systems and Methods," Page 250. John Wiley & Sons, 2019, sixth edition.

  2. TradingView. "Apple Inc."

  3. P. J. Kaufman. "Trading Systems and Methods," Pages 251-252. John Wiley & Sons, 2019, sixth edition.

  4. P. J. Kaufman. "Trading Systems and Methods," Page 257-264. John Wiley & Sons, 2019, sixth edition.

  5. P. J. Kaufman. "Trading Systems and Methods," Page 311, 944–945, 967–969. John Wiley & Sons, 2019, sixth edition.

  6. P. J. Kaufman. "Trading Systems and Methods," Pages 252–253. John Wiley & Sons, 2019, sixth edition.

  7. P. J. Kaufman. "Trading Systems and Methods," Page 365-369. John Wiley & Sons, 2019, sixth edition.

  8. TradingView. "DEMA."

Take the Next Step to Invest

×

The offers that appear in this table are from partnerships from which Investopedia receives compensation. This compensation may impact how and where listings appear. Investopedia does not include all offers available in the marketplace.

Related Articles
What is EMA? How to Use Exponential Moving Average With Formula Linearly Weighted Moving Average (LWMA): What It Is, and How It Works Guppy Multiple Moving Average (GMMA): Formulas and Calculations How to Use a Moving Average to Buy Stocks Exponential Moving Average vs. Simple Moving Average: What's the Difference? How Is the Exponential Moving Average (EMA) Formula Calculated?

Partner Links

Related Terms

What is EMA? How to Use Exponential Moving Average With Formula

An exponential moving average (EMA) is a type of moving average that places a greater weight and significance on the most recent data points.

more

Linearly Weighted Moving Average (LWMA): What It Is, and How It Works

A linearly weighted moving average is a type of moving average where more recent prices are given greater weight in the calculation, and prior prices are given less weight.

more

Guppy Multiple Moving Average (GMMA): Formulas and Calculations

The Guppy Multiple Moving Average (GMMA) is a technical indicator used to anticipate a breakout trend in the price of an asset.

more

What Is MACD?

Moving average convergence/divergence (MACD) is a momentum indicator that shows the relationship between two moving averages of a security’s price.

more

Simple Moving Average (SMA): What It Is and the Formula

A simple moving average (SMA) calculates the average of a selected range of prices, usually closing prices, by the number of periods in that range.

more

Signal Lines: What It Is, Calculation, and Limitations

Signal lines are used in technical indicators, especially oscillators, to generate buy and sell signals or suggest a change in a trend. Learn more about how they work.

more

  • #
  • A
  • B
  • C
  • D
  • E
  • F
  • G
  • H
  • I
  • J
  • K
  • L
  • M
  • N
  • O
  • P
  • Q
  • R
  • S
  • T
  • U
  • V
  • W
  • X
  • Y
  • Z

Investopedia is part of the Dotdash Meredithpublishingfamily.

By clicking “Accept All Cookies”, you agree to the storing of cookies on your device to enhance site navigation, analyze site usage, and assist in our marketing efforts.

Moving Average, Weighted Moving Average, and Exponential Moving Average (2024)

References

Top Articles
Latest Posts
Article information

Author: Terence Hammes MD

Last Updated:

Views: 5986

Rating: 4.9 / 5 (69 voted)

Reviews: 84% of readers found this page helpful

Author information

Name: Terence Hammes MD

Birthday: 1992-04-11

Address: Suite 408 9446 Mercy Mews, West Roxie, CT 04904

Phone: +50312511349175

Job: Product Consulting Liaison

Hobby: Jogging, Motor sports, Nordic skating, Jigsaw puzzles, Bird watching, Nordic skating, Sculpting

Introduction: My name is Terence Hammes MD, I am a inexpensive, energetic, jolly, faithful, cheerful, proud, rich person who loves writing and wants to share my knowledge and understanding with you.