# Linearly Weighted Moving Average (LWMA)

Search Dictionary

## Definition of 'Linearly Weighted Moving Average (LWMA)'

The linearly weighted moving average (LWMA) is a type of moving average that gives more weight to recent data points. This is in contrast to the simple moving average (SMA), which gives equal weight to all data points.

The LWMA is calculated by multiplying each data point by a weight, and then summing the weighted data points. The weights are typically calculated using a linear function, such as:

```
weight = (n - 1) / (n + 1)
```

where n is the number of data points in the moving average.

The LWMA is often used to smooth out data and identify trends. It can also be used to forecast future values.

Here is an example of how to calculate the LWMA for a data set of daily closing prices for a stock:

1. First, we need to decide how many data points we want to use in the moving average. For this example, we will use 10 days.
2. Next, we need to calculate the weights for each data point. We do this by using the following formula:

```
weight = (10 - 1) / (10 + 1)
```

This gives us a weight of 0.9 for each data point.
3. Now, we can calculate the LWMA for each day. To do this, we multiply each data point by its weight, and then sum the weighted data points.

The following table shows the results of this calculation:

| Day | Closing Price | Weight | Weighted Price |
|---|---|---|---|
| 1 | \$100 | 0.9 | \$90 |
| 2 | \$110 | 0.8 | \$88 |
| 3 | \$120 | 0.7 | \$84 |
| 4 | \$130 | 0.6 | \$78 |
| 5 | \$140 | 0.5 | \$70 |
| 6 | \$150 | 0.4 | \$60 |
| 7 | \$160 | 0.3 | \$48 |
| 8 | \$170 | 0.2 | \$34 |
| 9 | \$180 | 0.1 | \$18 |
| 10 | \$190 | 0 | \$0 |

The LWMA for this data set is \$80. This is the average of the weighted data points.

The LWMA can be used to smooth out data and identify trends. In this example, the LWMA shows that the stock price is trending upwards. This information could be used to make investment decisions.

Do you have a trading or investing definition for our dictionary? Click the Create Definition link to add your own definition. You will earn 150 bonus reputation points for each definition that is accepted.

Is this definition wrong? Let us know by posting to the forum and we will correct it.