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

## What Is a Linearly Weighted Moving Average?

A linearly weighted moving average (LWMA) is a [moving average](https://www.investopedia.com/terms/m/movingaverage.asp) calculation that more heavily weights recent price data. The most recent price has the highest weighting, and each prior price has progressively less weight. The weights drop in a linear fashion. LWMAs are quicker to react to price changes than [simple moving averages](https://www.investopedia.com/terms/s/sma.asp) (SMA) and [exponential moving averages](https://www.investopedia.com/terms/e/ema.asp) (EMA).

### Key Takeaways

*   Use a linearly weighted moving average in the same way as an SMA or EMA.
*   Use a LWMA to more clearly define the price trend and [reversals](https://www.investopedia.com/terms/r/reversal.asp), provide trade signals based on [crossovers](https://www.investopedia.com/terms/c/crossover.asp), and indicate areas of potential [support](https://www.investopedia.com/terms/s/support.asp) or resistance.
*   Traders who want a moving average with less [lag](https://www.investopedia.com/terms/l/laggingindicator.asp) than an SMA may wish to utilize a LWMA.

## The Formula for the Linearly Weighted Moving Average (LWMA) Is:

﻿ $\begin{aligned} &\text{LWMA}=\frac{\left(P_n*W_1\right)+\left(P_{n-1}*W_2\right)+\left(P_{n-2}*W_3\right)...}{\sum{W}}\\ &\textbf{where:}\\ &\text{P = Price for the period}\\ &\text{n = The most recent period, n-1 is the prior period,}\\ &\text{and n-2 is two periods prior}\\ &\text{W = The assigned weight to each period, with the}\\ &\text{highest weight going first and then descending linearly}\\ &\text{based on the number of periods being used}\\ \end{aligned}$﻿

![Linear Weighted Moving Average](https://www.investopedia.com/thmb/eDvFPW0rsj0q2gwQLpFYI-178CQ=/1500x0/filters:no_upscale():max_bytes(150000):strip_icc()/LinearWeightedMovingAverage-5c87f99e46e0fb0001336595.png)

*TradingView.*

## How to Calculate the Linearly Weighted Moving Average (LWMA)

1.  Choose a lookback period. This is how many n values will be calculated into the LWMA.
2.  Calculate the linear weights for each period. This can be accomplished in a couple of ways. The easiest is to assign n as the weight for the first value. For example, if using a 100-period lookback, then the first value is multiplied by a weight of 100, the next value is multiplied by a weight of 99. A more complex way is to choose a different weight for the most recent value, such as 30. Now each value will need to drop by 30/100 so that when n-99 (100th period) is reached the weight is one.
3.  Multiply the prices for each period by their respective weights, then get the sum total.
4.  Divide the above by the sum of all the weights.

Let’s say we are interested in calculating the linearly weighted moving average of the [closing price](https://www.investopedia.com/terms/c/closingprice.asp) of a stock over the last five days.

Begin by multiplying today’s price by 5, yesterday’s by 4, and the 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 weights, and you will have the linearly weighted moving average for this period.

((P5\*5)+(P4\*4)+(P3\*3)+(P2\*2)+(P1\*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

The LWMA of this stock over this time period is $90.62.

## What Does the Linearly Weighted Moving Average (LWMA) Tell You?

The linearly weighted moving average is a method of calculating the average 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](https://www.investopedia.com/terms/t/trend.asp).

Generally, when the price is above the LWMA, and the LWMA is rising, the price is above the weighted average which helps confirm an [uptrend](https://www.investopedia.com/terms/u/uptrend.asp). If the price is below the LWMA, and the LWMA is pointed down, this helps confirm a [downtrend](https://www.investopedia.com/terms/d/downtrend.asp) in price.

When the price crosses the LWMA that could signal a trend change. For example, if the price is above the LWMA and then drops below it, that could indicate a shift from an uptrend to a downtrend.

When assessing trends, traders should be aware of the lookback period. The lookback period is how many periods are being calculated into the LWMA. A five-period LWMA will track price very closely and is useful for tracking small trends as the line will be easily breached by even minor price oscillations. A 100-period LWMA will not track the price as closely, meaning there will often be room between the LWMA and the price. This allows for the determination of longer-term trends and reversals.

Like other types of moving averages, the LWMA may sometime be used to indicate [support and resistance](https://www.investopedia.com/trading/support-and-resistance-basics/) areas. For example, in the past, the price bounced off the LWMA on multiple occasions and then moved higher. This indicates the line is acting as support. The line may continue to act as support in the future. Failure to do so could indicate the price trend has undergone a change. It could be reversing to the downside or may be starting a period where it moves more sideways.

> **Fast Fact**
>
> LWMA will often be an option you can toggle when looking at a trading chart. Different investment platforms will offer different LWMA options that you can likely filter on or hide.

## Advantages of Linearly Weighted Moving Averages

There’s a few benefits to using linearly weighted moving averages. LWMA gives more weight to recent data points, making it more sensitive to short-term price movements compared to simple moving averages. This sensitivity allows traders and [investment analysts](https://www.investopedia.com/terms/a/analyst.asp) to react more quickly to changes in market conditions, meaning investors may be using more relevant criteria or information in fast-paced markets or when identifying very short-term trends.

Despite its sensitivity to recent data, LWMA still maintains a level of smoothness in its output. Unlike some other short-term indicators that may exhibit excessive volatility, LWMA strikes a balance between responsiveness and stability. It also allows users to change the weighting scheme, so traders can fine-tune the indicator to suit their style or however they want to prioritize historical data.

LWMA can be applied to various types of financial data ranging from price, [volume](https://www.investopedia.com/terms/v/volume.asp), and other market metrics. Its versatility makes it a valuable tool for traders regardless of the asset class or underlying industry. Traders can use LMWA for almost any type of investment ranging from stocks and currencies to commodities and cryptocurrencies.  

## Downsides to Linearly Weighted Moving Averages

LMWA also comes with some downsides. LWMA can also be more susceptible to outliers or extreme price movements. Because outliers have a greater impact on the weighted average, they can distort the interpretation of the indicator, potentially leading to false signals or overreactions to noise in the data if those outliers correspond to points given higher weights.

Unlike simple moving averages which involve straightforward arithmetic averaging, LWMA requires more complex calculations due to its weighted scheme. Determining the appropriate weighting factors and updating the average with each new data point can difficult and time-intensive, so LWMA is simply a more complex tool compared to other averaging methodologies.

The effectiveness of LWMA depends on the selection of weighting factors, which can introduce subjectivity into the analysis. While some traders may prefer heavier weighting for recent data to capture short-term trends, others may opt for a more balanced approach. The choice of weighting scheme can vary depending on individual preferences, so there may be some risk to inconsistency in how LWMA is calculated and used.

There’s several data considerations as well. Despite its sensitivity to recent data, LWMA may still lag behind major trend reversals, particularly during periods of sharp market volatility. This lag can result in missed opportunities. Similarly, traders may [overfit a model](https://www.investopedia.com/terms/o/overfitting.asp) to fit prior data, leading to poor future performance due to market deviations. In addition, in market conditions where prices oscillate within a relatively narrow range, LWMA may produce false signals or generate excessive noise, making it pretty tough for traders to find true patterns.  

## Alternatives to Linearly Weighted Moving Average

If LWMA doesn’t quite seem the best option for you, there’s several alternatives that exist, each with its own unique characteristics and applications in technical analysis. Some of the most common alternatives include:

*   **Simple Moving Average (SMA):** SMA calculates the arithmetic mean of a set of data points over a specified period. Unlike LWMA, SMA assigns equal weight to all data points. This usually results in in a smoother but less responsive indicator. SMA is popular for identifying long-term trends and filtering out short-term noise, and it’s easier to calculate.
*   **Exponential Moving Average (EMA):** EMA gives more weight to recent data points while gradually diminishing the influence of older data. This weighting scheme allows EMA to react more quickly to price changes compared to SMA, making it suitable for capturing [short-term trends](https://www.investopedia.com/articles/trading/09/short-term-trading.asp) and generating timely trading signals. This method mimics LWMA by having different weights for different points.
*   **Smoothed Moving Average (SMMA):** SMMA is similar to EMA but applies a different smoothing technique. SMMA assigns equal weight to all data points within a smoothing period, meaning there’s usually a smoother curve compared to EMA. SMMA is more often used to identify medium-term trends.
*   **Weighted Moving Average (WMA):** WMA assigns different weights to each data point within the averaging period, similar to LWMA. However, unlike LWMA, which uses a linear weighting scheme, WMA allows traders to completely customize the weighting factors according to their preferences. 
*   **Triangular Moving Average (TMA):** TMA is a variant of SMA that applies a triangular weighting scheme to the data points within the averaging period. TMA assigns the highest weight to the central data point and progressively decreases the weight toward the outer data points, creating a symmetrically weighted average. TMA is often used for smoothing price data and identifying trend direction.

> **Important**
>
> As is the case with any form of technical indicator, an investment may not materialize how you think it may based on prior history. Be mindful how you use LWMA when making investment decisions.

## Common Finance Cases for Linearly Weighted Moving Average

LWMA can be used in a few different ways within finance, primarily when crafting an investment strategy for a specific security. LWMA is mainly used as technical analysis for certain use cases such as: 

*   **Trend Identification:** LWMA is commonly used to identify trends in [financial markets](https://www.investopedia.com/terms/f/financial-market.asp). Traders analyze the relationship between short-term and long-term LWMA lines to determine the direction of the trend. When the short-term LWMA crosses above the long-term LWMA, it may signal an uptrend, whereas a crossover below the long-term LWMA may indicate a downtrend. 
*   **Entry and Exit Signals:** LWMA crossovers can serve as [entry and exit signals](https://www.investopedia.com/terms/e/entry-point.asp) for traders. When the short-term LWMA crosses above the long-term LWMA, it might be a good time to buy (as there’s some upward momentum). On the other hand, when the short-term LWMA crosses below the long-term LWMA, it might be a better time to sell. 
*   **Volatility Measurement:** LWMA can be used to measure and monitor market volatility. By observing the distance between the LWMA line and the price data, traders gauge the level of volatility in the market. Narrowing gaps between the LWMA line and price data means there’s less volatility; knowing this can help an investor shape their investment strategy and plan their trades accordingly.
*   **Support and Resistance Levels:** LWMA lines often act as dynamic [support and resistance levels](https://www.investopedia.com/trading/support-and-resistance-basics/) in financial markets. During uptrends, the short-term LWMA may provide support; during downtrends, the short-term LWMA may act as resistance, preventing prices from rising above the LWMA line.
*   **Confirmation of Trends:** In addition to the bullets above, LWMA can be used in conjunction with other technical analysis tools to confirm the strength of existing trends. When prices remain consistently above or below the LWMA line, it indicates a strong trend in the corresponding direction. Traders may look to see how LWMA signals may compare to other technical indicators.

## LMWA and Timeframes

LMWA can be applied across various timeframes, each serving different purposes in technical analysis. Short-term LWMA typically covers shorter periods, such as 5-day or 10-day averages. LWMA with this short of a period provides traders with insights into immediate price dynamics and very short-term trends useful for potential [day trades](https://www.investopedia.com/articles/trading/05/011705.asp). Traders often use short-term LWMA to generate quick entry and exit signals, particularly in fast-moving markets where responsiveness is crucial.

Medium-term LWMA covers longer periods, such as 20-day or 50-day averages. This is a more balanced period and offers trends over a slightly longer timeframe. Traders commonly use medium-term LWMA to assess the overall direction of the market and identify potential trend reversals or continuations over several weeks to months. With this timeframe, traders are less interested in capturing rapid changes that may fluctuate from day to day.

Long-term LWMA encompasses even longer periods, such as 100-day or 200-day averages. This provides insights into broader market trends and investor sentiment over extended timeframes. Traders and investors use long-term LWMA to analyze the macroeconomic environment, identify major trend shifts, and make strategic investment decisions over longer investment horizons, such as several months to years.

## What Is Linearly Weighted Moving Average (LWMA)?

LWMA is a variation of the moving average indicator that assigns greater importance or weight to more recent data points while still considering historical data. This weighting scheme offers advantages in terms of sensitivity to recent data and reduced lag compared to simple moving averages.

## How Does LWMA Differ from Simple Moving Average (SMA)?

LWMA differs from SMA in its weighting scheme. While SMA assigns equal weight to all data points within the averaging period, LWMA gives more weight to recent data points. This makes LWMA more responsive to short-term price movements but also potentially more susceptible to outliers and noise.

## How Is LWMA Calculated and What Are Its Components?

LWMA is calculated by multiplying each data point by a corresponding weight factor and then summing the results. The weighting factors typically form a linear sequence, with the most recent data point assigned the highest weight and older data points assigned progressively lower weights.

## How Can LWMA Help Identify Trends in Financial Markets?

LWMA can help identify trends in financial markets by analyzing the relationship between short-term and long-term LWMA lines. Crossovers between these lines can signal changes in trend direction, with bullish crossovers indicating potential uptrends and bearish crossovers indicating potential downtrends.

## The Bottom Line

The linearly weighted moving average is a technical analysis tool used to smooth price data by giving more weight to recent prices. Unlike simple moving averages where all data points are weighted equally, LWMA assigns higher weights to more recent data points, making it more responsive to recent price changes.

> **Article Sources**
>
> 1.  Fidelity. "[Weighted Moving Average (WMA)](https://www.fidelity.com/learning-center/trading-investing/technical-analysis/technical-indicator-guide/wma)."