**Have a Question?**

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

+1 (312) 257-3777

Contact Us

# LESMTH

Returns the linear (aka Brown Double) exponential smoothing out-of-sample forecast estimate.

## Syntax

**LESMTH**(

^{i}**X**,

**Order**,

**alpha**,

**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 smoothing factor (alpha should be between zero(0) and one(1) (exclusive)). If missing or omitted, 0.333 value is used.

**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=level component (series), 3=trend component (series), 4=one-step forecasts (series).

RETURN TYPE | NUMBER RETURNED |
---|---|

0 or omitted | Forecast value |

1 | Smoothing parameter (alpha) |

2 | level component (series) |

3 | trend component (series) |

4 | one-step 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 linear exponential smoothing is best applied to time series that exhibit prevalent trend, but do not exhibit seasonality.
- The recursive form of the Brown’s double exponential smoothing equation is expressed as follows:

Where:

- is the value of the time series at time t.
- is the simple exponential smoothing value of X.
- is the double exponential smoothing value.
- is the level estimate.
- is the slope (aka trend) estimate.
- is the smoothing factor/coefficient for level.
- is the m-step-ahead forecast values for from time t.

- For the LESMTH, we are applying the simple exponential smoothing twice, and compute level and slope from those two series:
- Use as input and as smoothing coefficient, generate .
- Use as input and as smoothing coefficient, generate .

- For , the double exponential smoothing is equivalent to the naïve no change extrapolation (NCE) method, or simply a random walk. I this case, division by zero occurs when we compute slope, and forecast is undefined.
- For , the forecast will be a constant taking its values from the starting value for and :

- LESMTH calculates 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.
- This method requires two starting values () to start the recursive updating of the equation. In NumXL, we set those values as follows:
- is set to the mean of the first four observations, and for a short time series, it is set as the value of the first observation.

- is set to the mean of the first four observations of , and for a short time series, it is set as the value of the first observation.

- is set to the mean of the first four observations, and for a short time series, it is set as the value of the first observation.
- Starting from NumXL version 1.63, the SESMTH
^{i}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 alpha (if available) in the minimization problem, and the initial values for the two-smoothing series () are computed from the input data.
- Starting from NumXL version 1.65. the SESMTH function return the found optimal value for alpha, and the corresponding one-step smoothing series of level, trend and forecast calculated in-sample.
- The time series must have at least three (4) observation with non-missing values 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 1st derivative. 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, and 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 1st derivative. NumXL implements the exact derivative formula (vs. numerical approximation) for performance purposes.
- In general, the SSE function in LESMTH yields a continuous smooth convex 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