Holt-Winters & Exponential Smoothing for Time Series Forecasting

Mehul Gupta
Data Science in your pocket
3 min readJun 26, 2019

--

In my previous article, I have explored how AR, MA, ARMA, ARIMA & SARIMA works(link at bottom). Moving forward, I would be going through some more models often less explored.

Consider the series X1,X2,X3,X4,X5,X6…..

Single Exponential Smoothing-

This smoothing method is used for univariate time series where a smoothing factor is calculated over the actual values present. it isn’t actually a forecasting model but a smoothing one where we are calculating a smoothing value given actual values. But it can be used for prediction purposes as well!!!. This can be done using the following equations-

let us consider we want to calculate the 5th value. It can be calculated using

S5=alpha*X4+(1-alpha)*S4

here X4 is the actual value, S5 is smoothed value for X5, and S4 is smoothed value for X4.

But a series of questions comes up!

How is the first Smoothing constant calculated?

smoothing values starts from S2 = X1 (first value available)

How is this helping in forecasting values where actual values are not present?

For example, if X6, X7, X8, X9…. have to be predicted, and only values till X5 are given, we would be taking the last available value i.e. X5 in the first term and our smoothed values would be our forecasted values. Example-

S6=alpha*X5 + (1-alpha)*S5

S7=alpha*X5 + (1-alpha)*S6

S8=alpha*X5 + (1-alpha)*S7………

Before moving on with Holt-Winters, Recapitulate the concepts of additive & multiplicative models from here.

Holt-Winters/Triple Exponential Smoothing(ADDITIVE MODELS ONLY)-

Holt winters are often heard but still a black box algorithm for many!! It can handle both univariate trends and seasonality and hence no need to handle them externally. Before moving forward, let's have a face-to-face with some horrible equations(I would be assuming seasonality for yearly data, assuming above given data is monthly, hence seasonality param M=12 )-

Assuming we are forecasting for the 14th term(T=13), hence

Seasonality_13=gamma*(X13-Smooth_12-Trend_12)+(1-gamma)*Seasonality_1

Here, the last term ‘Seasonality_1’ is because of (T-1-M)=1, gamma is constant

Trend_13=beta*(Smooth_13-Smooth_12) + (1-beta)*Trend_12

Here, beta is constant

Smooth_13=alpha(X13-Seasonality_1) + (1-alpha)*(Smooth_12-Trend_12)

Here, alpha is constant, Seasonality_1 because T-1-M=1

X14|13=Smooth_13+H*Trend_13+Seasonality_2

Here,

  • X14|13 means given 13th term, calculating 14th term & hence T=13
  • H is step_ahead_variable equal to the difference between the position of the term we want to predict against the given term position. For Example, if X15|12, H =3 and so on. Here, it is 14–13=1
  • The subscript ‘_2’ with Seasonality_2 is using the equation T+H-M(((H-1)/M)+1)

Here T=13,H=1,M=12 therefore it becomes 13+1–12(((1–1)/12)+1)=14–12(0+1)=2

  • The beginning terms for Trend, and Seasonality can be equated to the first value of the series & further trends and seasonality components can be calculated accordingly.

if X30|12= Smooth_12 + 18*Trend_12 + Seasonality_6

This is because, H=30–12=18, ‘_6’ because 18+12–12(((18–1)/12)+1)=30–12(1+1)=6 as taking only integer part from 17/12 gives us 1.

That’s all. Here, I skipped over double exponential smoothing which handles trends but not seasonality. Do explore Holt winter Multiplicative model equations as well. Next, I would be covering how to check over multivariate time series forecasting using Vector Models.

--

--