\( \newcommand{\mathbbm}[1]{\boldsymbol{\mathbf{#1}}} \)

19.1 Exponential Smoothing

19.1.1 ETS, es()

The es() function from the smooth package implements the conventional ETS model (from Hyndman et al., 2008) with some modifications. The fundamental difference of the function from the ets() from the forecast package is that it is implemented in the SSOE framework discussed in Section 7.1, i.e. with lagged values of the state vector and a smaller transition matrix. In fact, starting from the smooth v3.2.0, it is just a wrapper of the adam() function, restricting it to:

  • The single seasonal ETS (multiple seasonal cycles are supported by adam(), as discussed in Chapter 12);
  • The Normal distribution for the \(\epsilon_t\) (Sections 5.5 and 6.5);
  • Continuous data only (no support for the occurrence model from Chapter 13);
  • ETS and regression (no ARIMA elements as in Chapter 9);
  • Location model only (no scale model from Chapter 17).

Still, the function supports the main features of ETS and introduces those that are not available in either ets() from the forecast package or ETS() from the fable:

  1. Explanatory variables in the ETSX model from Chapter 10;
  2. A variety of loss functions, including the custom one, as discussed in Chapter 11;
  3. Different initialisation methods (see Section 11.4);
  4. Diagnostic plots from Chapter 14;
  5. Components and explanatory variables selection and combinations via approaches discussed in Chapter 15;
  6. Covariance matrix of parameters and related methods for reapplication of an ETS model (Chapter 16);
  7. Data simulation as in Section 16.1;
  8. All types of prediction intervals and other related aspects discussed in Chapter 18.

Being a wrapper of the adam(), es() is agnostic of the input data, working with any object, including ts, zoo, tibble, etc as long as the provided object has only one column. The seasonal lag can be regulated in the function using the lags variable, the same way it is done in adam(). The explanatory variables in es() are provided in a form of a matrix in the variable xreg (similarly to how it is done in arima() from the stats package).

19.1.2 Complex Exponential Smoothing, ces()

Complex Exponential Smoothing (CES) is a model lying outside of the conventional ETS taxonomy. It does not have explicit level/trend components, but instead it has a non-linear trend, which changes its shape depending on the value of the complex smoothing parameter. I developed this model in my PhD, and it is explained in detail in the Svetunkov et al. (2022) paper. It is formulated as a set of the following equations: \[\begin{equation} \begin{aligned} & y_t = l_{t-1} + \epsilon_t \\ & l_t = l_{t-1} - (1 - \alpha_1) c_{t-1} + (\alpha_0 - \alpha_1) \epsilon_t \\ & c_t = l_{t-1} + (1 - \alpha_0) c_{t-1} + (\alpha_0 + \alpha_1) \epsilon_t \end{aligned} , \tag{19.1} \end{equation}\] where \(\epsilon_t\) is the white noise error term, \(l_t\) is the level component, \(c_t\) is the non-linear trend component, and \(\alpha_0\) and \(\alpha_1\) are the smoothing parameters. The model can also be formulated in the same SSOE framework (5.5) discussed in Section 5.1, which makes it easy to implement using the same code and to compare with ADAM ETS and/or ARIMA via information criteria. As for the term “complex”, it arises because of how the model was originally formulated in its linear form, using complex variables: \[\begin{equation} \hat y_{t} + i \hat e_{t} = (\alpha_0 + i\alpha_1)(y_{t-1} + i e_{t-1}) + (1 - \alpha_0 + i - i\alpha_1)(\hat y_{t-1} + i \hat e_{t-1}) , \tag{19.2} \end{equation}\] where \(i^2=-1\) is the imaginary unit. The model itself allows distributing the weights over the actual observations in a harmonic or in an exponential way, capturing long-term non-linear patterns in the data. It works well in a median combination of models, together with ETS, ARIMA, and Theta, as it was shown in Petropoulos and Svetunkov (2020).

In addition to the non-seasonal CES, there is a modification that allows capturing either additive or multiplicative seasonality via lagged components, similarly to (19.1), which is formulated as: \[\begin{equation} \begin{aligned} & y_t = l_{0,t-1} + l_{1,t-m} + \epsilon_t \\ & l_{0,t} = l_{0,t-1} - (1 - \alpha_1) c_{0,t-1} + (\alpha_0 - \alpha_1) \epsilon_t \\ & c_{0,t} = l_{0,t-1} + (1 - \alpha_0) c_{0,t-1} + (\alpha_0 + \alpha_1) \epsilon_t \\ & l_{1,t} = l_{1,t-m} - (1 - \beta_1) c_{1,t-m} + (\beta_0 - \beta_1) \epsilon_t \\ & c_{1,t} = l_{1,t-m} + (1 - \beta_0) c_{1,t-m} + (\beta_0 + \beta_1) \epsilon_t \end{aligned} . \tag{19.3} \end{equation}\] Similarly to the non-seasonal CES, (19.3) can be formulated in the SSOE framework discussed in Section 5.1. Based on that, it is possible to select between the seasonal and the non-seasonal CES using information criteria. The model is also extendible to include other components or explanatory variables. Finally, while it is possible to formulate the model with a variety of distributions, the implementation so far only supports the Normal distribution.

The function ces() in the smooth package supports many features discussed in this monograph:

  1. Explanatory variables, similar to the ETSX model from Chapter 10, done via xreg variable;
  2. A variety of loss functions, as discussed in Chapter 11, via loss variable;
  3. Different initialisation methods (see Section 11.4);
  4. Diagnostic plots (Chapter 14);
  5. Explanatory variables selection (Section 15.3);
  6. Data simulation (similar to the ADAM discussed in Section 16.1, done using the sim.ces() function or the simulate() method applied to an estimated ces() model);
  7. All types of prediction intervals and other related aspects discussed in Chapter 18.

Finally, the auto.ces() function does selection between the seasonal and non-seasonal CES models using information criteria. By default, in addition to the models discussed above, it will also consider a “simple” seasonal CES with a classical additive seasonal component, similar to the one in the conventional ETS, and will select the model with the lowest AICc.

References

• Hyndman, R.J., Koehler, A.B., Ord, J.K., Snyder, R.D., 2008. Forecasting with Exponential Smoothing: The State Space Approach. Springer Berlin Heidelberg. https://doi.org/10.1007/978-3-540-71918-2
• Petropoulos, F., Svetunkov, I., 2020. A Simple Combination of Univariate Models. International Journal of Forecasting. 36, 110–115. https://doi.org/10.1016/j.ijforecast.2019.01.006
• Svetunkov, I., Kourentzes, N., Ord, J.K., 2022. Complex Exponential Smoothing. Naval Research Logistics (NRL). 31. https://doi.org/10.1002/nav.22074