This book is in Open Review. I want your feedback to make the book better for you and other readers. To add your annotation, select some text and then click the on the pop-up menu. To see the annotations of others, click the button in the upper right hand corner of the page

## 11.3 Dynamic X in ETSX

As discussed earlier in this chapter, the parameters of the explanatory variables in ETSX can be assumed to stay constant over time or can be assumed to vary according to some mechanism. The most reasonable mechanism in SSOE framework is the one relying on the same error for different components of the model. Osman and King (2015) proposed one of such mechanisms, relying on the differences of the data. The main motivation of the research was to make the dynamic ETSX model stable, which is a challenging task. However, this mechanism relies on the assumption of non-stationarity of the explanatory variables, which does not always make sense (for example, it is not reasonable in case of promotional data). An alternative approach that we will discuss in this section, is the one originally proposed by Svetunkov (1985) based on stochastic approximation mechanism and further developed in Svetunkov and Svetunkov (2014).

In this method, we consider the following regression model: $$$y_{t} = a_{0,t-1} + a_{1,t-1} x_{1,t} + \dots + a_{n,t-1} x_{n,t} + \epsilon_t , \tag{11.13}$$$ where all parameters vary over time and $$a_{0,t}$$ represents the value from the conventional pure additive ETS model. The updating mechanism for the parameters is straight forward and relies on the ratio of the error term and the respective explanatory variables: a_{i,t} = a_{i,t-1} + \left \lbrace \begin{aligned} &\delta_i \frac{\epsilon_t}{x_{i,t}} \text{ for each } i \in \{1, \dots, n\}, \text{ if } x_{i,t}\neq 0 \\ &0 \text{ otherwise } \end{aligned} \right. , \tag{11.14} where $$\delta_i$$ is the smoothing parameter of the $$i$$-th explanatory variable. The same model can be represented in the state space form, based on the equations, similar to (11.3): \begin{aligned} {y}_{t} = & \mathbf{w}'_t \mathbf{v}_{t-\mathbf{l}} + \epsilon_t \\ \mathbf{v}_t = & \mathbf{F} \mathbf{v}_{t-\mathbf{l}} + \mathrm{diag}\left(\mathbf{w}_t\right)^{-1} \mathbf{g} \epsilon_t \end{aligned} \tag{11.15}

where $$\mathrm{diag}\left(\mathbf{w}_t\right)^{-1}$$ is the inverse of the diagonal matrix based on the measurement vector, for which those values that cannot be inverted (due to division by zero) are substitute by zeroes in order to reflect the condition in (11.14). In addition to what (11.3) contained, we add smoothing parameters $$\delta_i$$ in the persistence vector $$\mathbf{g}$$ for each of the explanatory variables.

If the error term is multiplicative, then the model changes to: \begin{aligned} y_{t} = & \exp \left(a_{0,t-1} + a_{1,t-1} x_{1,t} + \dots + a_{n,t-1} x_{n,t} + \log(1+ \epsilon_t) \right) \\ a_{i,t} = & a_{i,t-1} + \left \lbrace \begin{aligned} &\delta_i \frac{\log(1+\epsilon_t)}{x_{i,t}} \text{ for each } i \in \{1, \dots, n\}, \text{ if } x_{i,t}\neq 0 \\ &0 \text{ otherwise } \end{aligned} \right. \end{aligned} . \tag{11.16}

The formulation (11.16) differs from the conventional pure multiplicative ETS model because the smoothing parameter $$\delta_i$$ is not included inside the error term $$1+\epsilon_t$$, which simplifies some derivations and makes model easier to work with. Mixed ETS models can also have explanatory variables, but we suggest to align the type of explanatory variables model with the error term.

Finally, in order to distinguish the ETSX with static parameters from the ETSX with dynamic ones, we will use the letters "S" and "D" in the names of models. So, the model (11.7) can be called ETSX(A,N,N){S}, while the model (11.16), assuming that $$a_{0,t-1}=l_{t-1}$$, would be called ETSX(M,N,N){D}. We use curly brackets in order to split the ETS states from the type of X. Furthermore, given that the model with static regressors is assumed in many contexts to be the default one, the ETSX(*,*,*){S} model can also be denoted just ETSX(*,*,*).

### 11.3.1 Conditional moments of dynamic ETSX

Similar to how it was discussed in the previous section, we can have two cases in the dynamic model: (1) when explanatory variables are assumed to be known, (2) when explanatory variables are assumed to be random. For illustrative purposes, we will use a non-seasonal model for which the lag vector contains ones only, keeping in mind that other pure additive models can be easily used instead. The cases of other ETS models are not discussed in this part in detail - the moments for these models need to be calculated based on simulations. So, as discussed previously, the model can be written in the following general way, assuming that all $$\mathbf{l}=1$$: \begin{aligned} {y}_{t} = & \mathbf{w}'_t \mathbf{v}_{t-1} + \epsilon_t \\ \mathbf{v}_t = & \mathbf{F} \mathbf{v}_{t-1} + \mathrm{diag}\left(\mathbf{w}_t\right)^{-1} \mathbf{g} \epsilon_t \end{aligned} . \tag{11.17} Based on this model, we can get the recursive relation for $$h$$ steps ahead, similar to how it was done in one of the previos sections: \begin{aligned} {y}_{t+h} = & \mathbf{w}'_{t+h} \mathbf{v}_{t+h-1} + \epsilon_{t+h} \\ \mathbf{v}_{t+h-1} = & \mathbf{F} \mathbf{v}_{t+h-2} + \mathrm{diag}\left(\mathbf{w}_{t+h-1}\right)^{-1} \mathbf{g} \epsilon_{t+h-1} \end{aligned} , \tag{11.18} where the second equation can be represented based on the values available on observation $$t$$: $$$\mathbf{v}_{t+h-1} = \mathbf{F}^{h-1} \mathbf{v}_{t} + \sum_{j=1}^{h-1} \mathbf{F}^{h-1-j} \mathrm{diag}\left(\mathbf{w}_{t+j}\right)^{-1} \mathbf{g} \epsilon_{t+j} . \tag{11.19}$$$ Substituting the equation (11.19) in the measurement equation of (11.18) leads to the final recursion: $$${y}_{t+h} = \mathbf{w}'_{t+h} \mathbf{F}^{h-1} \mathbf{v}_{t} + \mathbf{w}'_{t+h} \sum_{j=1}^{h-1} \mathbf{F}^{h-1-j} \mathrm{diag}\left(\mathbf{w}_{t+j}\right)^{-1} \mathbf{g} \epsilon_{t+j} + \epsilon_{t+h} . \tag{11.20}$$$

### 11.3.2 Known explanatory variables

Based on this recursion, we can calculate the conditional mean and variance for the model. First, we assume that the explanatory variables are controlled by an analyst, so that they are not random: \begin{aligned} & \mu_{y,t+h} = \text{E}(y_{t+h}|t) = \mathbf{w}'_{t+h} \mathbf{F}^{h-1} \mathbf{v}_{t} \\ & \text{V}(y_{t+h}|t) = \left(\mathbf{w}'_{t+h} \sum_{j=1}^{h-1} \mathbf{F}^{h-1-j} \mathrm{diag}\left(\mathbf{w}_{t+j}\right)^{-1} \mathbf{g} \right)^2 \sigma^2 + \sigma^2 \end{aligned} . \tag{11.21}

The formulae for conditional moments in this case look similar to the ones from the pure additive ETS model with only difference being the interaction with time varying measurument vector.

### 11.3.3 Random explanatory variables

In the case of random explanatory variables, the conditional expectation is straightforward and is similar to the one in the static ETSX model: $$$\mu_{y,t+h} = \text{E}(y_{t+h}|t) = \boldsymbol{\mu}'_{w,t+h} \mathbf{F}^{h-1} \mathbf{v}_{t} , \tag{11.22}$$$

where $$\boldsymbol{\mu}'_{w,t+h}$$ is the vector of conditional h steps ahead expectations for each element in the $$\mathbf{w}_{t+h}$$. In case of ETS components, the vector would contain ones. However, when it comes to the conditional variance, it is more complicated, because it introduces complex interactions between variances of different variables and error term. As a result, it would be easier to get the correct variance based on simulations, assuming that the explanatory variables and the error term change according to some assumed distributions.

### References

Osman, A F, and Maxwell L King. 2015. “A new approach to forecasting based on exponential smoothing with independent regressors.” Monash University, Department of Econometrics; Business Statistics. http://econpapers.repec.org/paper/mshebswps/2015-2.htm.

Svetunkov, Ivan, and Sergey Svetunkov. 2014. Forecasting methods. Textbook for universities. Moscow: Urait.

Svetunkov, Sergey. 1985. “Adaptive methods in the process of optimisation of regimes of electricity consumption.” Leningrad Engineering Economic Institute.