Investing & Trading

Weighted Moving Average (WMA) Study

By Samantha Baltodano


TL;DR:

The weighted moving average is a variation of the moving average strategy that places a greater weight on more recent price data. This helps smooth out the lag effect associated with moving average strategies.


What Is the Weighted Moving Average Study?

The weighted moving average (WMA) study is a moving average indicator that calculates the average price of a security over time and places a greater weight on recent prices. 


By applying a greater weight on newer price data, the WMA can help smooth out the lag effect typical of moving average strategies. This allows the WMA to supply buy and sell signals closer to the tops and bottoms of trends. Thus, the WMA can follow trends more closely than the SMA as shown in Figure 1.


Source: Fidelity Investments
Figure 1: WMA trend following vs. SMA trend following

The WMA is calculated by multiplying each close price over an “n” period of days by a predetermined weighting factor. The total value of your chosen weights should add up to equal 1 or 100%. 


Here’s an example for how you can calculate the WMA:


  • Suppose you have the closing price of a security for the last 7 days. Those prices are:


  • Day 1 = $13.41
  • Day 2 = $14.57 
  • Day 3 = $15.07 
  • Day 4 = $16.01 
  • Day 5 = $15.33 
  • Day 6 = $14.75 
  • Day 7 = $14.39


  • Next you’ll want to assign a weight factor to each closing price based on how recent it is and the given period. That factor is equal to the number of days past the first day used in the moving average so that today's weight factor is the greatest, while the first day's factor is equal to 1. The total is then divided by the sum of the factors. For example, the 7-day WMA factor is equal to 7+6+5+4+3+2+1=28. The weights for the 7-day period are:


  • Weighting Factor 1 = 1/28
  • Weighting Factor 2 = 2/28 
  • Weighting Factor 3 = 3/28 
  • Weighting Factor 4 = 4/28
  • Weighting Factor 5 = 5/28
  • Weighting Factor 6 = 6/28
  • Weighting Factor 7 = 7/28


  • Multiply each of the closing prices by their weights.


  • Weighting Average 1 = $13.41 * 1/28 = 0.48
  • Weighting Average 2 = $14.57 * 2/28 = 1.04
  • Weighting Average 3 = $15.07 * 3/28 = 1.61
  • Weighting Average 4 = $16.01 * 4/28 = 2.29
  • Weighting Average 5 = $15.33 * 5/28 = 2.74
  • Weighting Average 6 = $14.75 * 6/28 = 3.16
  • Weighting Average 7 = $14.39 * 7/28 = 3.60


  • Sum each of the weighted averages to get the WMA.


  • 7-day WMA = $14.92


Let’s take a look at another method of calculating the WMA.


  • Suppose you have the closing price of security for the last 3-day period. Those prices are: $10, $15, $20.


  • Assign a weight to each of these prices. Because this is a 3-day period, the most recent price ($20) will get the largest weight of 3. The second day ($15) will have a weight of 2. The first day ($10) will have a weight of 1.


  • Multiply each price by the assigned weight and add each total together. [(3 * $20) + (2 * $15) + (1 * $10)] = $100


  • Divide this value by the sum of the periods for the WMA. The sum of the periods is 3+2+1 = 6. So $100 / 6 = $16.67.


  • The 3-day WMA is $16.67.


Note that either method will get you the same WMA, so choose the method that’s easiest for you.


The weighting average is valuable for determining price trends, indicating support and resistance areas, validating price strength and momentum, and measuring price movement


Summary

  • The WMA study calculates the average price of a security with a greater weight on more recent price data.
  • WMA helps to smooth out the lag effect associated with moving average strategies.
  • The weighting average is valuable for determining price trends, indicating support and resistance areas, validating price strength and momentum, and measuring price movement.


Weighted Moving Average is just one of many studies that Archaide automates. For a full list of strategies and studies available click here.


Like what you read? Check out the rest of our content!