Predicting a value from the previous value

We initially consider only time series with autocorrelation but no trend. With positive autocorrelation, large values tend to followed by other large values and small values tend to be followed by other small values.

Any value can therefore be predicted with a linear equation of the form

yt  =  b0  +  b1 yt−1

This model is a type of auto-regressive model, and is usually called an AR(1) model. It can be used for forecasting one time period ahead, as illustrated below.

The parameters can be estimated by least squares.

Forecasting further into the future

Direct application of the model only allows prediction one time period beyond the end of the observed data.

t  =  b0  +  b1 yt − 1

However a similar equation can be applied to the forecast to extend it another time period into the future, and so on.

t + k  =  b0  +  b1 t + k −1

British Airways share trading

The time series plot below shows the volume of British Airways shares (millions) traded in the first 57 trading days of 2002 — between 2nd January and 21st March.

The scatterplot under the time series shows the autocorrelation between successive values in this series. The line on the scatterplot predicts the volume of shares traded in any day from the previous day's value. Its parameters are initially set to use the previous day's value as the prediction.

Click Least squares to minimise the sum of squared residuals — i.e. to minimise the sum of squared prediction errors.

Click on the time series at day 44 — the highest value in the series. The green lines on the scatterplot shows how the trading volume on day 43 (34.7 million shares) provides a forecast of the value on day 44 (24.25 million shares).

The red lines on the time series plot and also on the scatterplot show the forecasting error. Least squares minimises the sum of squares of these errors over all days for which data is available.

Drag past the end of the available data (i.e. day 57 and later) to see how the same equation is used to forecast further into the future, but with each forecast based on the forecast on the previous day instead of the previous day's actual value.