## 10.4 Stochastic and deterministic trends

There are two different ways of modelling a linear trend. A *deterministic trend* is obtained using the regression model
\[
y_t = \beta_0 + \beta_1 t + \eta_t,
\]
where \(\eta_t\) is an ARMA process. A *stochastic trend* is obtained using the model
\[
y_t = \beta_0 + \beta_1 t + \eta_t,
\]
where \(\eta_t\) is an ARIMA process with \(d=1\). In the latter case, we can difference both sides so that \(y_t' = \beta_1 + \eta_t'\), where \(\eta_t'\) is an ARMA process. In other words,
\[
y_t = y_{t-1} + \beta_1 + \eta_t'.
\]
This is similar to a random walk with drift (introduced in Section 9.1), but here the error term is an ARMA process rather than simply white noise.

Although these models appear quite similar (they only differ in the number of differences that need to be applied to \(\eta_t\)), their forecasting characteristics are quite different.

### Example: International visitors to Australia

```
as_tsibble(fpp2::austa)
aus_visitors <-%>%
aus_visitors autoplot(value) +
labs(x = "Year", y = "millions of people",
title = "Total annual international visitors to Australia")
```

Figure 10.9 shows the total number of international visitors to Australia each year from 1980 to 2015. We will fit both a deterministic and a stochastic trend model to these data.

The deterministic trend model is obtained as follows:

```
aus_visitors %>%
fit_deterministic <- model(ARIMA(value ~ trend() + pdq(d = 0)))
report(fit_deterministic)
#> Series: value
#> Model: LM w/ ARIMA(2,0,0) errors
#>
#> Coefficients:
#> ar1 ar2 trend() intercept
#> 1.1127 -0.3805 0.1710 0.4156
#> s.e. 0.1600 0.1585 0.0088 0.1897
#>
#> sigma^2 estimated as 0.02979: log likelihood=13.6
#> AIC=-17.2 AICc=-15.2 BIC=-9.28
```

This model can be written as \[\begin{align*} y_t &= 0.416 + 0.171 t + \eta_t \\ \eta_t &= 1.113 \eta_{t-1} -0.380 \eta_{t-2} + \varepsilon_t\\ \varepsilon_t &\sim \text{NID}(0,0.030). \end{align*}\]

The estimated growth in visitor numbers is 0.17 million people per year.

Alternatively, the stochastic trend model can be estimated.

```
aus_visitors %>%
fit_stochastic <- model(ARIMA(value ~ pdq(d=1)))
report(fit_stochastic)
#> Series: value
#> Model: ARIMA(0,1,1) w/ drift
#>
#> Coefficients:
#> ma1 constant
#> 0.3006 0.1735
#> s.e. 0.1647 0.0390
#>
#> sigma^2 estimated as 0.03376: log likelihood=10.62
#> AIC=-15.24 AICc=-14.46 BIC=-10.57
```

This model can be written as \(y_t-y_{t-1} = 0.173 + \varepsilon_t + 0.301 \varepsilon_{t-1}\), or equivalently \[\begin{align*} y_t &= y_0 + 0.173 t + \eta_t \\ \eta_t &= \eta_{t-1} + 0.301 \varepsilon_{t-1} + \varepsilon_{t}\\ \varepsilon_t &\sim \text{NID}(0,0.034). \end{align*}\]

In this case, the estimated growth in visitor numbers is also 0.17 million people per year. Although the growth estimates are similar, the prediction intervals are not, as Figure 10.10 shows. In particular, stochastic trends have much wider prediction intervals because the errors are non-stationary.

```
bind_cols(fit_deterministic, fit_stochastic) %>%
rename(`Deterministic trend` = 1, `Stochastic trend` = 2) %>%
forecast(h = 10) %>%
autoplot(aus_visitors) +
labs(x = "Year", y = "Visitors to Australia (millions)",
title = "Forecasts from trend models")
```

There is an implicit assumption with deterministic trends that the slope of the trend is not going to change over time. On the other hand, stochastic trends can change, and the estimated growth is only assumed to be the average growth over the historical period, not necessarily the rate of growth that will be observed into the future. Consequently, it is safer to forecast with stochastic trends, especially for longer forecast horizons, as the prediction intervals allow for greater uncertainty in future growth.