Weighted Moving Average Method

Abhishek Dayal
0

The Weighted Moving Average (WMA) method is a variation of the Simple Moving Average (SMA) method used in time series forecasting. Unlike the SMA, which assigns equal weight to all data points in the time window, the WMA gives different weights to each data point based on predefined weights. This means that certain data points have a higher impact on the moving average calculation than others.


Weighted Moving Average Method by Study Terrain
Weighted Moving Average Method



How to Calculate Weighted Moving Average (WMA):

1. Select a Time Window: Decide on the number of data points (n) to include in the moving average calculation. This time window represents the period over which the moving average will be calculated.

2. Assign Weights: Assign weights to each data point in the time window. The sum of all weights should add up to 1.

3. Multiply and Sum: Multiply each data point by its corresponding weight and sum the results.

4. Repeat: Slide the time window one data point forward and repeat steps 3 to calculate the moving average for the next time period.


Example:

Let's consider a simple example of calculating a 3-day Weighted Moving Average for a time series data:

Time Period | Sales Data

Day 1    |    50

 Day 2    |    55

 Day 3    |    60

 Day 4    |    70

 Day 5    |    65

 Day 6    |    75

Assuming we use weights of 0.3, 0.5, and 0.2 for the last three data points, respectively:

To calculate the 3-day Weighted Moving Average (WMA):

Day 1 WMA: (50 * 0 + 55 * 0 + 60 * 0) / (0 + 0 + 0) = Not applicable (division by zero) 

Day 2 WMA: (55 * 0 + 60 * 0 + 70 * 0.3) / (0 + 0 + 0.3) = Not applicable (division by zero) 

Day 3 WMA: (60 * 0 + 70 * 0.3 + 65 * 0.5) / (0 + 0.3 + 0.5) = 67.67 (rounded to 2 decimal places) 

Day 4 WMA: (70 * 0.3 + 65 * 0.5 + 75 * 0.2) / (0.3 + 0.5 + 0.2) = 68.33 (rounded to 2 decimal places) 

Day 5 WMA: (65 * 0.5 + 75 * 0.2 + 0 * 0) / (0.5 + 0.2 + 0) = 68.33 (rounded to 2 decimal places) 

Day 6 WMA: (75 * 0.2 + 0 * 0 + 0 * 0) / (0.2 + 0 + 0) = Not applicable (division by zero)


Interpreting the Results:

As seen in the example above, the WMA method takes into account the different weights assigned to each data point, resulting in a weighted moving average that responds more dynamically to recent changes in the time series data.

The choice of weights depends on the characteristics of the data and the desired emphasis on recent data points versus older ones. Weights can be selected based on intuition, historical performance, or through optimization techniques.

While the Weighted Moving Average method allows for greater flexibility in capturing underlying trends and patterns in time series data, it is essential to choose appropriate weights carefully to avoid biases or overfitting to the recent past. Like the SMA method, the WMA is a simple forecasting technique, and more sophisticated methods may be necessary for more complex time series analysis.


Tags

Post a Comment

0Comments

Post a Comment (0)