What is a Linearly Weighted Moving Average
BREAKING DOWN Linearly Weighted Moving Average
Linearly Weighted Moving Average is a method of calculating the momentum of the price of an asset over a given period of time. This method weights recent data more heavily than older data, and is used to analyze market trends. Momentum, one of the most common oscillators used in analyzing market trends, is designed to look at price fluctuations over a period of time. Such calculations can be useful for forecasting future performance and informing investment strategy.
Analysts implement several moving average strategies in looking at market trends. The first, and simplest, implementation is the simple moving average, or the arithmetic average of prices over a period of time. In this strategy, each price in the time period analyzed is weighted equally. The ease of this calculation helps to make quick calculations to determine if the value of an asset is trending upward or downward.
More complex analyses became possible as computers became more accessible. The linearly weighted moving average was established as one of the first methods of more accurately measuring price momentum, although many analysts prefer to rely on exponential moving average for a more accurate and sensitive measure of price trends. An exponential moving average is calculated similarly to a linear weighted moving average, but uses an exponentially weighted multiplier. Some analysts find that while an exponential average functions best as a indicator for performance in the near term, a weighted average can be useful for analyzing performance over longer stretches of time.
Calculating a Linearly Weighted Moving Average
Let’s say we are interested in calculating the linearly weighted moving average of the closing price of a stock over the period of the last five days.
Begin by multiplying today’s price by 5, yesterday’s by 4, and price of the day before by 3. Continue multiplying each day’s price by its position in the data series until reaching the first price in the data series, which is multiplied by 1. Add these results together, divide by the sum of the multipliers, and you will have the linearly weighted moving average for this period.
This formula will look like this, where D stands for the price stock price on a given day in the series.
((D5*5)+(D4*4)+(D3*3)+(D2*2)+(D1*1)) / (5+4+3+2+1)
Let’s say that the price of this stock fluctuates as so:
Day 5: $90.90
Day 4: $90.36
Day 3: $90.28
Day 2: $90.83
Day 1: $90.91
((90.90*5)+(90.36*4)+(90.28*3)+(90.83*2)+(90.91*1)) / (5+4+3+2+1) = 90.62
Thus, the Linearly Weighted Moving Average of this stock over this time period is $90.62