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 in NumXL 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.
First, I'll create a simple four 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 A4 cell. Now click OK.
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!
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.
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, 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.
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!
Article is closed for comments.