Forecasting II (forecasting with ARMA models) “There are two kind of forecasters: those who don´t know and those who don´t know they don´t know” John Kenneth Galbraith (1993) Gloria González-Rivera University of California, Riverside and Jesús Gonzalo U. Carlos III de Madrid Spring 2002 Copyright(© MTS-2002GG): You are free to use and modify these slides for educational purposes, but please if you improve this material send us your new version. Optimal forecast for ARMA models For a general ARMA process ( L) Z t ( L)at ( L) Zt at ( L)at at 1at 1 2 at 2 ..... ( L) Objective: given information up to time n, Z n , Z n 1 ,......Z1 want to forecast ‘l-step ahead’ Zˆ (l ) n at t n l l 1 Z l n j an l j j an l j j an l j j 0 j 0 j l future a ˆZn (l ) l *an *l 1an1 *l 2an2 ...... past a What is * ? Criterium: Minimize the mean square forecast error ˆ (l )) 2 min E ( Z Z n l n * l 1 E ( Z n l Zˆ n (l )) 2 2 a j a j 0 2 2 ( j 0 l j l j ) * 2 E ( Z n l Zˆ n (l )) 2 2 * a 2( l j l j )( 1) 0 * j 0 l j l j * Zˆn (l ) l an l 1an1 l 2an2 ........ Another interpretation of optimal forecast Consider l 1 j 0 j 0 Z l n j an l j l j an j E ( Z n l | Z n , Z n 1.....) l j an j l an l 1an 1 l 2an 2 .... j 0 Hence Zˆ n (l ) E ( Z n l | Z n , Z n 1.....) Given a quadratic loss function, the optimal forecast is a conditional expectation, where the conditioning set is past information Properties of the forecast error l 1 j 0 j 0 Zl n j an l j l j an j Since Z n l Zˆ n (l ) en (l ) l 1 forecast error en (l ) Z n l Zˆ n (l ) j an l j MA(l-1) j 0 1. The forecast Zˆ n (l ) and the forecast error en (l ) are uncorrelated 2. E ( en (l )) 0 Unbiased l 1 3. Var( en (l )) j a 2 2 j 0 4. en (l ) for l 1 are correlated Properties of the forecast error (cont) 1-step ahead forecast errors, e n (1), e n 1(1).....e n l (1) , are uncorrelated en (1) Zn1 Zˆn (1) an1 In general, l-step ahead forecast errors (l>1) are correlated en (l ) Z n l Zˆ n (l ) an l 1an l 1 ...... l 1an 1 en j (l ) Z n j l Zˆ n j (l ) an j l 1an j l 1 ...... l 1an j 1 cov( en (l ), en j (l )) n-j n l j 2 i n i n j i n 1 n n-j+l n+l jl Forecast of an AR(1) process Z t Z t 1 at Zˆ n (l ) ? l 1 Z n 1 Z n an 1 E ( Z n 1 | n ) Z n l2 Z n 2 Z n 1 an 2 E ( Z n2 | n ) 2 Z n l ˆ for any l Z n (l ) Z n The forecast decays geometrically as l increases Forecast of an AR(p) process Z t 1Z t 1 2 Z t 2 ........ p Z t p at Zˆ n (l ) E ( Z n l | Z n , Z n 1 ,.....) ? l 1 Z n 1 1Z n 2 Z n 1 ........ p Z n p 1 an 1 Zˆ n (1) E ( Z n 1 | n ) 1Z n 2 Z n 1 ........ p Z n p 1 l 2 Z n 2 1Z n 1 2 Z n ........ p Z n p 2 an 2 Zˆ n (2) E ( Z n 2 | n ) 1Zˆ n (1) 2 Z n ........ p Z n p 2 for any l Zˆ n (l ) 1Zˆ n (l 1) 2 Zˆ n (l 2) ........ p Zˆ n (l p ) You need to calculate the previous forecasts l-1,l-2,…. Forecast of a MA(1) Z t at at 1 Zˆn (l ) E( Znl | I n ) ? l 1 Z n 1 an 1 an Zˆ n (1) E ( Z n 1 ) an l2 l 1 Z n 2 an 2 an 1 Zˆ n 2 0 Zˆ n (l ) 0 Zn an 1 L That is the mean of the process Forecast of a MA(q) Z t (1 1L 2 L ...... q L )at 2 q ( l l 1L l 2 L2 .... q Lql )an l q Zˆ n (l ) E ( Z n l | I n ) lq 0 1 where an Z q n 1 1L .... q L Forecast of an ARMA(1,1) (1 L) Z t (1 L)at Z n l Z n l 1 an l an l 1 1 L whe re an Zn 1 L l 2 Zˆ n ( 2) Zˆ n (1) (Z n an ) l 2 Zˆ n (l ) Zˆ n (l 1) 2 Zˆ n (l 2) .... l 1Zˆ n (1) l 1 Zˆ n (1) Z n an Forecast of an ARMA(p,q) p ( L) Z t q ( L)at Z nl 1Z nl 1 ..... p Z n l p an l 1an l 1 ..... qanl q Zˆ n (l ) 1Zˆ n (l 1) .... p Zˆ n (l p) aˆn (l ) 1aˆn (l 1) .... qaˆn (l q) where Zˆ n ( j ) E ( Z n j | Z n , Z n 1.....) Zˆ n ( j ) Z n j aˆn ( j ) 0 j 1 j0 j 1 aˆn ( j ) an j Z n j Zˆ n j 1 (1) j0 Example: ARMA(2,2) Zt 1Zt 1 2 Zt 2 at 1at 1 2at 2 l 1 Z n1 1Z n 2 Z n1 an ! 1an 2an1 Zˆ (1) E ( Z | I ) Z Z aˆ aˆ n n 1 n 1 n where Zˆ n ( 0) Z n Zˆ ( 1) Z n ˆn a ˆ n 1 a 2 n 1 n 1 2 ( L) Zn 2 ( L ) Z Zˆ n 1 1 n n 2 (1) 2 n 1 Updating forecasts Suppose you have information up to time n, such that Zˆn (1), Zˆn (2),......Zˆn (l ) When new information comes, Z n 1 can we update the previous forecasts? 1. 2. en (l ) Z n l Zˆ n ( l ) en 1 ( l 1) en 1 ( l 1) l 11 j 0 l 1 j j l 1 j 0 j an l j an 1 l 1 j l j 0 j an l j an l j l an en ( l ) l an j 0 3. Z n l Zˆ n 1 ( l 1) Z n l Zˆ n ( l ) l an Zˆ ( l ) Zˆ ( l 1) a n n 1 l n Zˆ n 1 ( l ) Zˆ n (l 1) l an 1 Problems P1: For each of the following models: (i) (1 - 1L) Z t a t (ii ) (1 1L 2 L2 ) Z t a t (iii ) (1 - 1L)(1 L) Z t a t (a) Find the l-step ahead forecast of Zn+l (b) Find the variance of the l-step ahead forecast error for l=1, 2, and 3. P2: Consider the IMA(1,1) model (1 L)Z t (1 L)a t (a) Write down the forecast equation that generates the forecasts (b) Find the 95% forecast limits produced by this model (c) Express the forecast as a weighted average of previous observations Problems (cont) P3: With the help of the annihilation operator (defined in the appendix) write down an expression for the forecast of an AR(1) model, in terms of Z. P4: Do P3 for an MA(1) model. Appendix I: The Annihilation operator We are looking for a compact lag operator expression to be used to express the forecasts (L) L s 1L1s ... s 1L1 s L0 s 1L1 s 2 L2 ... Ls The annihilation operator is [ Then if (L) ] s L0 s 1L1 s 2 L2 .. Ls Z t (L)a t , E[ Z t s | a t , a t 1 , ...] [ (L) ] a t Ls Appendix II: Forecasting based on lagged Z´s Let ( L) Z t a t Z t ((L)) 1 a t (L)a t Then (L) 1 E[ Z t s | Z t , Z t 1 , ...] [ ] Zt (L) Ls Wiener-Kolmogorov Prediction Formula
© Copyright 2026 Paperzz