Models for NonStationary Time Series The ARIMAp d

  • Slides: 46
Download presentation
Models for Non-Stationary Time Series The ARIMA(p, d, q) time series

Models for Non-Stationary Time Series The ARIMA(p, d, q) time series

The ARIMA(p, d, q) time series Many non-stationary time series can be converted to

The ARIMA(p, d, q) time series Many non-stationary time series can be converted to a stationary time series by taking dth order differences.

Let {xt|t T} denote a time series such that {wt|t T} is an ARMA(p,

Let {xt|t T} denote a time series such that {wt|t T} is an ARMA(p, q) time series where wt = Ddxt = (I – B)dxt = the dth order differences of the series xt. Then {xt|t T} is called an ARIMA(p, d, q) time series (an integrated auto-regressive moving average time series. )

The equation for the time series {wt|t T} is: b(B)wt = d + a(B)ut

The equation for the time series {wt|t T} is: b(B)wt = d + a(B)ut The equation for the time series {xt|t T} is: b(B)Ddxt = d + a(B)ut or f(B) xt = d + a(B)ut. . Where f(B) = b(B)Dd = b(B)(I - B) d

Suppose that d roots of the polynomial f(x) are equal to unity then f(x)

Suppose that d roots of the polynomial f(x) are equal to unity then f(x) can be written: f(B) = (1 - b 1 x - b 2 x 2 -. . . - bpxp)(1 -x)d. and f(B) could be written: f(B) = (I - b 1 B - b 2 B 2 -. . . - bp. Bp)(I-B)d= b(B)Dd. In this case the equation for the time series becomes: f(B)xt = d + a(B)ut or b(B)Dd xt = d + a(B)ut. .

Comments: 1. The operator f(B) =b(B)Dd = 1 - f 1 x - f

Comments: 1. The operator f(B) =b(B)Dd = 1 - f 1 x - f 2 x 2 -. . . - fp+dxp+d is called the generalized autoregressive operator. (d roots are equal to 1, the remaining p roots have |ri| > 1) 2. The operator b(B) is called the autoregressive operator. (p roots with |ri| > 1) 3. The operator a(B) is called moving average operator.

Example – ARIMA(1, 1, 1) The equation: (I – b 1 B)(I – B)xt

Example – ARIMA(1, 1, 1) The equation: (I – b 1 B)(I – B)xt = d + (I + a 1)ut (I – (1 + b 1) B + b 1 B 2)xt = d + ut + a 1 ut 1 xt – (1 + b 1) xt-1 + b 1 xt-2 = d + ut + a 1 ut – 1 or xt = (1 + b 1) xt-1 – b 1 xt-2 + d + ut + a 1 ut – 1

Modeling of Seasonal Time Series

Modeling of Seasonal Time Series

If a time series, {xt: t T}, that is seasonal we would expect observations

If a time series, {xt: t T}, that is seasonal we would expect observations in the same season in adjacent years to have a higher auto correlation than observations that are close in time (but in different seasons. For example for data that is monthly we would expect the autocorrelation function to look like this

The AR(1) seasonal model This model satisfies the equation: The autocorrelation for this model

The AR(1) seasonal model This model satisfies the equation: The autocorrelation for this model can be shown to be: This model is also an AR(12) model with b 1 = … = b 11 = 0

Graph: r(h)

Graph: r(h)

The AR model with both seasonal and serial correlation This model satisfies the equation:

The AR model with both seasonal and serial correlation This model satisfies the equation: This model is also an AR(13) model. The autocorrelation for this model will satisfy the equations:

The Yule-Walker Equations:

The Yule-Walker Equations:

or:

or:

Some solutions for rh

Some solutions for rh

 • Excel file for determining Autocorrelation function

• Excel file for determining Autocorrelation function

The general ARIMA model incorporating seasonality where

The general ARIMA model incorporating seasonality where

Prediction

Prediction

Three Important Forms of a Non-Stationary Time Series

Three Important Forms of a Non-Stationary Time Series

The Difference equation Form: xt = f 1 xt-1 + f 2 xt-2 +.

The Difference equation Form: xt = f 1 xt-1 + f 2 xt-2 +. . . +fp+dxt-p-d + ut +a 1 ut-1 + a 2 ut-2 +. . . + aqut-q b(B)Ddxt = d + a(B)ut

The Random Shock Form: xt = m(t) + ut +y 1 ut-1 + y

The Random Shock Form: xt = m(t) + ut +y 1 ut-1 + y 2 ut-2 +y 3 ut-3 +. . . xt = m(t) +y(B)ut

The Inverted Form: xt = p 1 xt-1 + p 2 xt-2 +p 3

The Inverted Form: xt = p 1 xt-1 + p 2 xt-2 +p 3 xt-3+. . . p(B)xt = t + ut

Example Consider the ARIMA(1, 1, 1) time series (I – 0. 8 B)Dxt =

Example Consider the ARIMA(1, 1, 1) time series (I – 0. 8 B)Dxt = (I + 0. 6 B)ut (I – 0. 8 B) (I –B) xt = (I + 0. 6 B)ut (I – 1. 8 B + 0. 8 B 2) xt = (I + 0. 6 B)ut xt = 1. 8 xt - 1 - 0. 8 xt - 2 + ut+ 0. 6 ut -1 Difference equation form

The random shock form (I – 1. 8 B + 0. 8 B 2)

The random shock form (I – 1. 8 B + 0. 8 B 2) xt = (I + 0. 6 B)ut xt = (I – 1. 8 B + 0. 8 B 2)-1(I + 0. 6 B)ut xt = (I + 2. 4 B + 3. 52 B 2 + 4. 416 B 3 + 5. 1328 B 4 + … )u xt = ut + 2. 4 ut - 1 + 3. 52 ut - 2 + 4. 416 ut - 3 + 5. 1328 ut - 4 + t …

The Inverted form (I – 1. 8 B + 0. 8 B 2) xt

The Inverted form (I – 1. 8 B + 0. 8 B 2) xt = (I + 0. 6 B)ut (I + 0. 6 B)-1(I – 1. 8 B + 0. 8 B 2)xt = ut (I - 2. 4 B + 2. 24 B 2 – 1. 344 B 3 + 0. 8064 B 4 +… )xt = ut xt = 2. 4 xt - 1 - 2. 24 xt - 2 + 1. 344 xt - 3 - 0. 8064 xt - 4 + … + ut

Forecasting an ARIMA(p, d, q) Time Series • Let PT denote {…, x. T-2,

Forecasting an ARIMA(p, d, q) Time Series • Let PT denote {…, x. T-2, x. T-1, x. T} = the “past” until time T. • Then the optimal forecast of x. T+l given PT is denoted by: • This forecast minimizes the mean square error

Three different forms of the forecast 1. Random Shock Form 2. Inverted Form 3.

Three different forms of the forecast 1. Random Shock Form 2. Inverted Form 3. Difference Equation Form Note:

Random Shock Form of the forecast Recall xt = m(t) + ut +y 1

Random Shock Form of the forecast Recall xt = m(t) + ut +y 1 ut-1 + y 2 ut-2 +y 3 ut-3 +. . . or x. T+l = m(T + l) + u. T+l +y 1 u. T+l-1 + y 2 u. T+l-2 +y 3 u. T+l-3 +. . . Taking expectations of both sides and using

To compute this forecast we need to compute {…, u. T-2, u. T-1, u.

To compute this forecast we need to compute {…, u. T-2, u. T-1, u. T} from {…, x. T-2, x. T-1, x. T}. Note: xt = m(t) + ut +y 1 ut-1 + y 2 ut-2 +y 3 ut-3 +. . . Thus and Which can be calculated recursively

The Error in the forecast: The Mean Sqare Error in the Forecast Hence

The Error in the forecast: The Mean Sqare Error in the Forecast Hence

Prediction Limits forecasts (1 – a)100% confidence limits for x. T+l

Prediction Limits forecasts (1 – a)100% confidence limits for x. T+l

The Inverted Form: p(B)xt = t + ut or xt = p 1 xt-1

The Inverted Form: p(B)xt = t + ut or xt = p 1 xt-1 + p 2 xt-2 +p 3 x 3+. . . + t + ut where p(B) = [a(B)]-1 f(B) = [a(B)]-1[b(B)Dd] = I - p 1 B - p 2 B 2 - p 3 B 3 -. . .

The Inverted form of the forecast Note: xt = p 1 xt-1 + p

The Inverted form of the forecast Note: xt = p 1 xt-1 + p 2 xt-2 +. . . + t + ut and for t = T+l x. T+l = p 1 x. T+l-1 + p 2 x. T+l-2 +. . . + t + u. T+l Taking conditional Expectations

The Difference equation form of the forecast x. T+l = f 1 x. T+l-1

The Difference equation form of the forecast x. T+l = f 1 x. T+l-1 + f 2 x. T+l-2 +. . . + fp+dx. T+l-p-d + u. T+l +a 1 u. T+l-1 + a 2 u. T+l-2 +. . . + aqu. T+l-q Taking conditional Expectations

Example: ARIMA(1, 1, 2) The Model: xt - xt-1 = b 1(xt-1 - xt-2)

Example: ARIMA(1, 1, 2) The Model: xt - xt-1 = b 1(xt-1 - xt-2) + ut + a 1 ut + a 2 ut or xt = (1 + b 1)xt-1 - b 1 xt-2 + ut + a 1 ut + a 2 ut or f(B)xt = b(B)(I-B)xt = a(B)ut where f(x) = 1 - (1 + b 1)x + b 1 x 2 = (1 - b 1 x)(1 -x) and a(x) = 1 + a 1 x + a 2 x 2.

The Random Shock form of the model: xt =y(B)ut where y(B) = [b(B)(I-B)]-1 a(B)

The Random Shock form of the model: xt =y(B)ut where y(B) = [b(B)(I-B)]-1 a(B) = [y(B)]-1 a(B) i. e. y(B) [f(B)] = a(B). Thus b 1 B 2) (I + y 1 B + y 2 B 2 + y 3 B 3 + y 4 B 4 +. . . )(I - (1 + b 1)B + = I + a 1 B + a 2 B 2 Hence a 1 = y 1 - (1 + b 1) or y 1 = 1 + a 1 + b 1. a 2 = y 2 - y 1(1 + b 1) + b 1 or y 2 =y 1(1 + b 1) - b 1 + a 2. 0 = yh - yh-1(1 + b 1) + yh-2 b 1 or yh = yh-1(1 + b 1) - yh-2 b 1 for h ≥ 3.

The Inverted form of the model: p(B) xt = ut where p(B) = [a(B)]-1

The Inverted form of the model: p(B) xt = ut where p(B) = [a(B)]-1 b(B)(I-B) = [a(B)]-1 f(B) i. e. p(B) [a(B)] = f(B). Thus (I - p 1 B - p 2 B 2 - p 3 B 3 - p 4 B 4 -. . . )(I + a 1 B + a 2 B 2) = I - (1 + b 1)B + b 1 B 2 Hence 3. -(1 + b 1) = a 1 - p 1 or p 1 = 1 + a 1 + b 1 = -p 2 - p 1 a 1 + a 2 or p 2 = -p 1 a 1 - b 1 + a 2. 0 = -ph - ph-1 a 1 - ph-2 a 2 or ph = -(ph-1 a 1 + ph-2 a 2) for h ≥

Now suppose that b 1 = 0. 80, a 1 = 0. 60 and

Now suppose that b 1 = 0. 80, a 1 = 0. 60 and a 2 = 0. 40 then the Random Shock Form coefficients and the Inverted Form coefficients can easily be computed and are tabled below:

The Forecast Equations

The Forecast Equations

The Difference Form of the Forecast Equation

The Difference Form of the Forecast Equation

Computation of the Random Shock Series, Onestep Forecasts One-step Forecasts Random Shock Computations

Computation of the Random Shock Series, Onestep Forecasts One-step Forecasts Random Shock Computations

Computation of the Mean Square Error of the Forecasts and Prediction Limits Mean Square

Computation of the Mean Square Error of the Forecasts and Prediction Limits Mean Square Error of the Forecasts Prediction Limits

Table: MSE of Forecasts to lead time l = 12 (s 2 = 2.

Table: MSE of Forecasts to lead time l = 12 (s 2 = 2. 56)

Raw Observations, One-step Ahead Forecasts, Estimated error , Error

Raw Observations, One-step Ahead Forecasts, Estimated error , Error

Forecasts with 95% and 66. 7% prediction Limits

Forecasts with 95% and 66. 7% prediction Limits

Graph: Forecasts with 95% and 66. 7% Prediction Limits

Graph: Forecasts with 95% and 66. 7% Prediction Limits