Solved – Holt-Winters exponential smoothing formula

exponential-smoothingforecastingtime series

I am trying to implement Holt-Winters exponential smoothing in Java program (I understand that R and Python have implementations of these algorithms, but I can't use those due to other reasons, so they are ruled out).

I have been going through Rob J. Hyndman's book and formula. I am trying to execute the following formula on my sample data manually, but I'm having a hard time understanding some of the notations. If I can run it manually, I can start implementing in code:

Let us say we have 12 data points (Monthly data for a year): 8,9,10,7,9,10,9,8,9,8

The last 8 in this data represents current month data, and I want to forecast the next 3 months' values (which will be something like 9,9,8, I assume). How can I use the formula listed in the above link to get these values is the part with which I am struggling.

Specially I am not clear with two things:

  1. What does $\hat{y}_{t+h|t}$ represent? Is it next month's value (or) next value from the starting point?

  2. How can I calculate the $s_{t-m+h_m^+}$ value?

Any pointers to get started on manual calculation would be appreciated. Thanks for your time and help.

Best Answer

I made code for python that can be found here if you want to check it out. It is fairly easy to understand.

y(t+h) is the last point of data you have with the addition of h steps ahead. For example if you forecast 3 months ahead it would be at point t +3

What I used to make my code was the NIST site.

For your second question I think you are calculating the seasonal data. I am not sure what you mean by s((t-m)+hm+).

If you do not want to implement it yourself here is a java implementation I found