4 Linear models for non-stationary and seasonal time series.

4.1

The term non-stationary covers a host of stochastic processes. The simplest forms arise when either the mean of the series is varying, or if the process is represented by a random walk.

4.2 Random walk models.

The variations observed in many series are explained as the cumulative sum of independent variables from IID(μ,σ2) distributions, the two parameters being the mean and variance of the distribution. Reverting now to calling the observed series xt, if the mean μ is zero the series is called a simple random walk and the independent variables are white noise et:
4.2.1

xt=xt-1+et.

A non-zero mean μ represents a mean increase per unit time and the model is called a random walk with drift. To see if this model is appropriate for a time series xt the first differences of the series:
4.2.2

xt-xt-1=(1-B)xt=xt

are calculated, and should appear to be white noise et, or μ+et if μ0.

The typical appearance of a simple random walk is difficult to appreciate intuitively. The series is best predicted by the most recent level and is equally likely to move up or down, yet the eye persists in seeing patterns of changing trends and cycles. It may be considered as a borderline case of the AR(1) model as ϕ1. Figure 24 shows a real series of daily interest rates, and an artificially generated random walk. The similarities in behaviour are quite striking. Random walk models are widely used in financial time series analysis, typically after taking logarithms of the original series. An added feature, though, is that the variance of the white noise disturbance (or returns) et, which is called the volatility of the series, may change slowly over time. It then becomes important to model the process et.

Figure 24: First Link, Second Link, Caption: Series of daily interest rates and an artificial random walk series.

4.3 The exponentially weighted moving average, EWMA, predictor.

Forecasting is a topic yet to be covered, but is one of the main application areas of time series modelling. One of the earliest and simplest forecasting schemes, apart from fitting trend lines, was the EWMA predictor. This does not assume any particular structure of the observations and can be routinely used for any data. However, this was particularly designed to predict future values of a series which had a fluctuating level. The compromise between averaging many values to get a good estimate of the level, and using only a few values so as to estimate the recent level rather than an out-of-date level, was achieved by a choice of discounting factor θ applied to past values. The average used at time t, x¯t to predict xt+1 was therefore of the theoretical form:
4.3.1

x¯t=(1-θ)(xt+θxt-1+θ2xt-2+),

where the factor (1-θ) is present so that the weights sum to one, giving a true average. The practical point is that this average could easily be calculated by a recursive or updating formula:
4.3.2

x¯t=(1-θ)xt+θx¯t-1.

As each new ‘day’ came with its most recent record of xt, the old EWMA x¯t-1 was updated by this to give the new EWMA. These last two equations are conveniently written using operator notation:
4.3.3

x¯t=(1-θ)(1-θB)-1xt and (1-θB)x¯t=(1-θ)xt.

Consideration of when this might be ‘the best thing’ to do leads to the assumption that the prediction errors et=xt-x¯t-1 are white noise, completely unpredictable from (independent of) past information. On substituting for x¯t-1 this becomes:
4.3.4

xt = x¯t-1+et
(1-θB)xt = (1-θ)xt-1+(1-θB)et
(1-B)xt = (1-θB)et.

Thus the first difference xt of xt follows a MA(1) model.

This is known as the Integrated Moving Average or IMA(1,1) model for the series xt. The series of weekly business transactions is well represented by this model - recall that the first differences (after a log transformation) followed a MA(1) model (see Figures 6–8).

Alternatively, in an IMA(1,1) series {xt} given by (1-B)xt=(1-θB)et where {et} is white noise, is predicted using EWMA, then the errors in prediction xt-x¯t-1 is the white noise et. To see it, note that

et=(1-B)(1-θB)xt=(1-B)(1+θB+θB2+)xt.

Collecting the coefficients of {Bj;j0}, the right hand side is equal to xt-x¯t-1.

Figure 25 shows a plot of that series, with the EWMA prediction of each term in the series added to the figure. The smoothing parameter was estimated to be θ=0.66, a typical value. For the purposes of illustration, another plot is shown using θ=0.9. The EWMA is then much smoother - but a less accurate predictor.

Figure 25: First Link, Second Link, Caption: EWMA predictions of the weekly transactions series, using smoothing parameters 0.66 and 0.9.