Weighted-moving average (WMA) in Excel

In this video, we will demonstrate the use of the WMA function in NumXL to smooth out time series data and create a sample forecast.


welcome to the weighted moving average tutorial.

In this video we will demonstrate the use of the WMA function NumXL Excel to smooth out time series data and create a sample forecast.

As an example we'll be using monthly sales figures from a hypothetical company for the past 24 months let's start now.

  1. first, I'll create a simple four (4) month moving average type the WMA formula in the tool bar and press on the "fx" button on the left.  When the WMA function window pops up, specify the window size for the forecast time or horizon go ahead and type zero or reference the a four cell now. Click OK
  2. The function returned #N/A because we don't have enough data points. Drag the cell to copy the formula, then select the cell and click on the "fx" button.  We need to change the input reference cell to include all data up to this point, so let's select all the data from the C4 to C5 cell. Once done, click OK. Now, copy the formula to the remaining cells. Great!
  3. Next, let's do a simple forecast using the moving average. Go to the end of the cell range and copy the formula to the next one. Edit the formula to include only the cell range in the input data. Lock the N cell range of the input. Now, copy the formula to the other forecast points.
  4. Plot the moving average and notice how it lags behind the sample data. Next, let's do the same as before, but use a predefined set of weights. Enter the WMA formula, and click the "fx" button specify the input range for the weights. Select the cell range that contains the weights. Please note that weight values don't need to be normalized for the forecast time.
  5. Set T equals to zero for in sample smoothing. Now, click OK. Drag the cell to copy the formula, then edit its reference input cell range, and lock the beginning of it then copy the formula to the cells below for an an out-of-sample forecast; select the last cell and copy the formula now edit and lock the input cell range to the sample data copy the formula for the other forecast horizons.
  6. Lastly, plot the weighted moving average along with a forecast note that the WMA is more responsive to change in the sample data because it has higher weights for recent observations this concludes our presentation.

thank you for watching.

Have more questions? Submit a request

0 Comments