**Have a Question?**

**Phone:** +1 (888) 427-9486

+1 (312) 257-3777

Contact Us

# TESMTH

Attachment | Size | |
---|---|---|

Example - TESMTH.xlsx |

Returns the (Holt-Winters) triple exponential smoothing out-of-sample forecast estimate.

## Syntax

**TESMTH**(

^{i}**X**,

**Order**,

**Alpha**,

**Beta**,

**Gamma**,

**L**,

**Optimize**,

**T**,

**Return Type**)

**X**

is the univariate time series data (a one-dimensional array of cells (e.g. rows or columns)).

**Order**

is the time order in the data series (i.e. the first data point's corresponding date (earliest date=1 (default), latest date=0)).

Order | Description |
---|---|

1 | ascending (the first data point corresponds to the earliest date) (default) |

0 | descending (the first data point corresponds to the latest date) |

**Alpha**

is the level smoothing factor (alpha should be between zero(0) and one(1) (exclusive)). If missing or omitted, 0.333 value is used.

**Beta**

is the trend smoothing factor (beta should be between zero(0) and one(1) (exclusive)). If missing or omitted, 0.333 value is used.

**Gamma**

is the seasonal change smoothing factor (gamma should be between zero(0) and One(1) (exclusive)). If missing or omitted, 0.50 value is used.

**L**

is the season Length or duration in units of steps.

**Optimize**

is a flag (True/False) for searching and using optimal value of the smoothing factor. If missing or omitted, optimize is assumed False.

**T**

is the forecast time/horizon beyond the end of X. If missing, a default value of 0 (Latest or end of X) is assumed.

**Return Type**is a number that determines the type of return value: 0(or missing)=Forecast,1=Alpha,2=Beta,3=Gamma,4=level component(series),5=trend component(series),6=seasonal component(series),7=one-step forecasts(series).

Return Type | Description |
---|---|

0 or omitted | Forecast value |

1 | Level smoothing parameter (alpha) |

2 | Trend smoothing parameter (beta) |

3 | Seaonal smoothing parameter (gamma) |

4 | level component (series) |

5 | trend component (series) |

6 | seasonal component (series) |

7 | one-step (in-sample) forecasts (series) |

## Remarks

- The time series is homogeneous or equally spaced.
- The time series may include missing values (e.g. #N/A) at either end.
- The time series must have only positive values observation, Otherwise, TESMTH function returns #VALUE!
- The multiplicative Holt-Winters exponential smoothing method is a robust forecasting method for seasonal time series with additive trend.
- The multiplicative Holt-Winters seasonal model is appropriate for a time series in which the amplitude of the seasonal pattern is
__proportional to the average level of the series__, i.e. a time series displaying multiplicative seasonality. - The recursive form of the Holt-Winters triple exponential smoothing equation is expressed as follows:

Where:

- is the value of the time series at time t.
- is the season Length or duration.
- is a smoothed estimate of the level component.
- is a smoothed estimate of the trend component.
- is a smoothed estimate of the seasonal indices component.
- is the level smoothing coefficient.
- is the trend smoothing coefficient.
- is the seasonal smoothing coefficient.
- is the m-step-ahead forecast values for from time t.

- The seasonal factors are deﬁned so that they sum to the length of the season (L), i.e.

- In TESMTH, we compute three simple, but interdependent, exponential series: level, trend and seasonal indices. They are inter-dependent in sense that three components must be updated each period.
- The smoothing coefficient is again used to control speed of adaptation to local level, a second smoothing constant is used to control the degree of a local trend, and finally, a third smoothing constant is introduced to control the degree of local seasonal Indices carried through to multi-step-ahead forecast periods.
- For and the start values for seasonal Indices () is set to one(1), the Holt-Winters triple exponential smoothing produces the same forecasts as Holt’s double exponential smoothing (DESMTH
^{i}). - The TESMTH calculate a point forecast. There is no probabilistic model assumed for the simple exponential smoothing, so we can’t derive a statistical confidence interval for the computed values.
- In practice, the Mean Squared Error (MSE) for prior out-of-sample forecast values are often used as a proxy for the uncertainty (i.e. variance) in the most recent forecast value.
- The Holt-Winters triple exponential method requires an L+2 starting values () to start the recursive updating of the equations. As a rule of thumb, a minimum of two full seasons (or 2L periods) of historical data is needed to initialize a set of seasonal factors ()
- In academic literature, the common method for estimating the seasonal indices as ratio of actual observation to the average seasonally adjusted values for that season. In NumXL, we adopted better procedures by Hyndman R based on decomposition, that require fewer observations, and produce better estimates.
- If the number of available observation is less than two full seasons, but more than one season.
- Use a simple linear model with time trend and first order Fourier approximation to the multiplicative seasonality (e.g. Holt-Winters)

Where:

- is the linear trend.
- are parameters of unknown values.

- Next, find the optimal values of parameters by minimizing the overall SSE for
- Divide by the estimated linear trend ()
- Calculate the seasonal Indices by averaging the detrended time series for each month in every season:

- Scale the computed seasonal indices, so that their sum is equal to L.

- Set , and .

- Use a simple linear model with time trend and first order Fourier approximation to the multiplicative seasonality (e.g. Holt-Winters)
- If the number of available observations is more than two full seasons, we use a procedure based on double moving average based decomposition:
- Calculate a 2xL (centered) moving average to the first 2-3 seasons of the data. This will give us a good approximation to the (level + trend) component.
- Detrend the data, by dividing by the estimated smoothing data in (i)
- Calculate the seasonal indices by averaging the detrended time series (ii) for each month in every season available.

- Scale the computed seasonal indices, so that their sum is equal to L
- Finally, divide by the seasonal Indices in (iv) to get seasonal adjusted data
- Fit a linear trend to the seasonal adjusted data to get initial estimate of and .

- If the number of available observation is less than two full seasons, but more than one season.
- Starting from NumXL version 1.63, the TESMTH has a built-in optimizer to find the best value of () that minimize the SSE (loss function ()) for the one-step forecast calculated in-sample.

- For initial values, the NumXL optimizer will use the input value of () (if available) in the minimization problem, and the initial values for the level, trend and seasonal indices series () are are computed from the input data.
- Starting from NumXL version 1.65. the TESMTH function return the found optimal value for (), and the corresponding one-step smoothing series of level, trend, seasonal indices and forecast calculated in-sample.
- The time series must have at least two full seasons of observations to use the built-in optimizer.
- NumXL implements the spectral projected gradient (SPG) method for finding the minima with a boxed boundary.
- The SPG requires loss function value and the gradient (). NumXL implements the exact derivative formula (vs. numerical approximation) for performance purposes.

- Internally, during the optimization, NumXL computes recursively both the smoothed time series, levels, trends, seasonal indices and all the in-sample derivatives, which are used for the loss function and its derivative.
- The SPG is an iterative (recursive) method, and it is possible that the minima can’t be found the within allowed number of iterations and/or tolerance. In this case, NumXL will not fail, instead NumXL uses the best alpha found so far.
- The SPG has no provision to detect or avoid local minima trap. There is no guarantee of global minima.

- The SPG requires loss function value and the gradient (). NumXL implements the exact derivative formula (vs. numerical approximation) for performance purposes.
- In general, the SSE function in TESMTH yields a continuous smooth non-monotone curve, that SPG minimizer almost always finds an optimal solution in a very few iterations.

## References

- James Douglas Hamilton; Time Series Analysis; Princeton University Press; 1st edition(Jan 11, 1994), ISBN: 691042896
- Tsay, Ruey S.; Analysis of Financial Time Series; John Wiley & SONS; 2nd edition(Aug 30, 2005), ISBN: 0-471-690740
- D. S.G. Pollock; Handbook of Time Series Analysis, Signal Processing, and Dynamics; Academic Press; Har/Cdr edition(Nov 17, 1999), ISBN: 125609906

Attachment | Size |
---|---|

Example - TESMTH.xlsx | 15.88 KB |