## 10.3 The bottom-up approach

A simple method for generating coherent forecasts is the bottom-up approach. This approach involves first generating forecasts for each series at the bottom-level, and then summing these to produce forecasts for all the series in the structure.

For example, for the hierarchy of Figure 10.1, we first generate $$h$$-step-ahead forecasts for each of the bottom-level series: $\yhat{AA}{h},~~\yhat{AB}{h},~~\yhat{AC}{h},~~ \yhat{BA}{h}~~\text{and}~~\yhat{BB}{h}.$ (We have simplified the previously used notation of $$\hat{y}_{T+h|T}$$ for brevity.) Summing these, we get $$h$$-step-ahead coherent forecasts for the rest of the series: \begin{align*} \tilde{y}_{h} & =\yhat{AA}{h}+\yhat{AB}{h}+\yhat{AC}{h}+\yhat{BA}{h}+\yhat{BB}{h}, \\ \ytilde{A}{h} & = \yhat{AA}{h}+\yhat{AB}{h}+\yhat{AC}{h}, \\ \text{and}\quad \ytilde{B}{h} &= \yhat{BA}{h}+\yhat{BB}{h}. \end{align*} (In this chapter, we will use the “tilde” notation to indicate coherent forecasts.) As in Equation (10.3), we can employ the summing matrix here and write $\begin{bmatrix} \tilde{y}_{h} \\ \ytilde{A}{h} \\ \ytilde{B}{h} \\ \ytilde{AA}{h} \\ \ytilde{AB}{h} \\ \ytilde{AC}{h} \\ \ytilde{BA}{h} \\ \ytilde{BB}{h} \end{bmatrix} = \begin{bmatrix} 1 & 1 & 1 & 1 & 1 \\ 1 & 1 & 1 & 0 & 0 \\ 0 & 0 & 0 & 1 & 1 \\ 1 & 0 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 & 0 \\ 0 & 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 0 & 1 \end{bmatrix} \begin{bmatrix} \yhat{AA}{h} \\ \yhat{AB}{h} \\ \yhat{AC}{h} \\ \yhat{BA}{h} \\ \yhat{BB}{h} \end{bmatrix}.$

Using more compact notation, the bottom-up approach can be represented as $\tilde{\bm{y}}_{h}=\bm{S}\hat{\bm{b}}_{h},$ where $$\tilde{\bm{y}_t}$$ is an $$n$$-dimensional vector of coherent $$h$$-step-ahead forecasts, and $$\hat{\bm{b}}_{h}$$ is an $$m$$-dimensional vector of $$h$$-step-ahead forecasts for each of the bottom-level series.

An advantage of this approach is that we are forecasting at the bottom-level of a structure, and therefore no information is lost due to aggregation. On the other hand, bottom-level data can be quite noisy and more challenging to model and forecast.

### The hts package for R

Forecasts can be produced using the forecast() function applied to objects created by hts() or gts(). The hts package has three in-built options to produce forecasts: ETS models, ARIMA models or random walks; these are controlled by the fmethod argument. It also use several methods for producing coherent forecasts, controlled by the method argument.

For example, suppose we wanted bottom-up forecasts using ARIMA models applied to the prison data. Then we would use

forecast(prison.gts, method="bu", fmethod="arima")

which will apply the auto.arima() function to every bottom-level series in our collection of time series. Similarly, ETS models would be used if fmethod="ets" was used.