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

## 3.1 Time series components

The main idea behind many forecasting techniques is that any time series can contain several unobservable components, such as:

1. Level of the series - the average value for specific period of time,
2. Growth of the series - the average increase or decrease of the value over a period of time,
3. Seasonality - a pattern that repeats itself with a fixed periodicity.
4. Error - unexplainable white noise.

Level is the basic component that is present in any time series. In the simplest form (without variability), when plotted on its own without other components, it will look like a straight line, shown, for example, in Figure 3.1.

level <- rep(100,40)
plot(ts(level, frequency=4),
type="l", xlab="Time", ylab="Sales", ylim=c(80,160)) Figure 3.1: Level of time series without any variability.

If the time series exhibits growth, the level will change depending on the observation. For example, if the growth is positive and constant, we can update the level in Figure 3.1 to have a straight line with a non-zero slope as shown in Figure 3.2.

growth <- c(1:40)
plot(ts(level+growth, frequency=4),
type="l", xlab="Time", ylab="Sales", ylim=c(80,160)) Figure 3.2: Time series with a positive trend and no variability.

The seasonal pattern will introduce some similarities from one period to another. This pattern does not have to literally be seasonal, like beer sales being higher in Summer than they are in Winter (season of year). Any pattern with a fixed periodicity works: the number of hospital visitors is higher on Mondays than on Saturdays or Sundays because people tend to stay at home over the weekend (day of week seasonality), and sales are higher during daytime than they are at night (hour of the day seasonality). Adding a deterministic seasonal component to the example above will result in fluctuations around the straight line as shown in Figure 3.3.

seasonal <- rep(c(10,15,-20,-5),10)
plot(ts(level+growth+seasonal, frequency=4),
type="l", xlab="Time", ylab="Sales", ylim=c(80,160)) Figure 3.3: Time series with a positive trend, seasonal pattern and no variability.

Finally, we can introduce the random error to the plots above to have more realistic time series as shown in Figure 3.4. Figure 3.4: Time series with random errors.

The plots in Figure 3.4 show artificial time series with the components discussed above. The level, growth and seasonal components in those plots are deterministic, they are fixed and do not evolve over time (growth is positive and equal to 1 from year to year). However, in real life, typically these components will have a more complex dynamics, changing over time and thus demonstrating their stochastic nature. For example, in case of stochastic seasonality, the seasonal shape might change and instead of having peaks in sales in January the data would exhibit peaks in May due to the change in consumers’ behaviour.

Note that each textbook and paper might use slightly different names to refer to the components discussed above. For example, in classical decomposition it is assumed that (1) and (2) jointly represent a “trend” component so a model will contain error, trend and seasonality. There are modifications of this decomposition, which also contain cyclical component(s).

When it comes to ETS, the growth component (2) is called “trend,” so the model consists of the four components: level, trend, seasonal and error term. We will use the ETS formulation in this textbook. According to this formulation the components can interact with each other in one of two ways: additively or multiplicatively. The pure additive model in this case can be summarised as: $\begin{equation} y_t = l_{t-1} + b_{t-1} + s_{t-m} + \epsilon_t , \tag{3.1} \end{equation}$ where $$l_{t-1}$$ is the level, $$b_{t-1}$$ is the trend, $$s_{t-m}$$ is the seasonal component with periodicity $$m$$ (e.g. 12 for months of year data, implying that something is repeated every 12 months) - all these components are produced on the previous observations and are used on the current one. Finally, $$\epsilon_t$$ is the error term, which follows some distribution and has zero mean. The pure additive models were plotted in Figure 3.4. Similarly, the pure multiplicative model is: $\begin{equation} y_t = l_{t-1} b_{t-1} s_{t-m} \varepsilon_t , \tag{3.2} \end{equation}$ where $$\varepsilon_t$$ is the error term that has mean of one. The interpretation of the model (3.1) is that the different components add up to each other, so, for example, the sales increase over time by the value $$b_{t-1}$$, each January they typically change by the amount $$s_{t-m}$$, and that there is still some randomness in the model. The pure additive models can be applied to data that can have positive, negative and zero values. In case of the multiplicative model (3.2), the interpretation is different, showing by how many times the sales change over time and from one season to another. The sales in this case will change every January by $$(s_{t-m}-1)$$% from the baseline. The model (3.2) only work on data with strictly positive values (data with purely negative values are also possible but rare in practice).

It is also possible to define mixed models in which, for example, the trend is additive but the other components are multiplicative: $\begin{equation} y_t = (l_{t-1} + b_{t-1}) s_{t-m} \varepsilon_t \tag{3.3} \end{equation}$ These models work well in practice when the data has large values far from zero. In other cases, however, they might break and produce strange results (e.g. negative values on positive data) so the conventional decomposition techniques only consider the pure models.

### References

• Warren M. Persons, 1919. General Considerations and Assumptions. The Review of Economics and Statistics. 1, 5–107. https://doi.org/10.2307/1928754