Deterministic Trend

A time series with a (linear) deterministic trend can be modeled as

image047z

Now E[yi] = μδi and var(yi) = σ2, and so while the variance is a constant, the mean varies with time i; consequently, this type of time series is also not stationary.

These types of time series can be transformed into a stationary time series by detrending, i.e. by setting zi = yiδi. In this case zi = μ + εi, which is a purely random time series.

In a similar fashion we can speak about a quadratic deterministic trend (yi = μ + δi + εi) or various other varieties of deterministic trends.

The types of random walks described previously are said to have a stochastic trend. We can also have random walks with a deterministic trend. These take the form

image046z

where δ is a constant. These are not stationary and require differencing and detrending to be transformed into a stationary time series.

Example 1: Graph the time series with deterministic trend yi = i + εi) where the ε∼ N(0,1).

The graph is shown in Figure 1. All the cells in column B contain the formula =NORM.S.INV(RAND()) and cell C4 contains the formula =A4+B4 (and similarly for the other cells in column C).

As we can see, once again the graph shows a clear upward trend and the ACF shows a slow descent.

Linear deterministic trend chart

Figure 1 – Deterministic Trend

This time we get rid of the trend by detrending as shown in Figure 2. E.g. cell C4 contains the formula = B4-A4 (where column B replicates the values in column C from Figure 1). We see from the chart that the trend has been eliminated. We also see from the Ljung-Box test (cell F13) that the ACF values for the first 7 lags are statistically equal to zero, consistent with a purely random process.

Detrending

Figure 2 – Detrending