Professional Documents
Culture Documents
ECON2209
Slides 08
BF-08
Lecture Plan
Big picture:
yt = mt + st + xt ,
st + p = st ,
s
k =1
t +k
= 0,
E( xt ) = 0
BF-08
BF-08
Optimal forecast
Optimal forecast under MSFE is the conditional
mean of yT+h, yT+h|T = E(yT+h|T), which
minimises MSFE.
eg. ARMA(1,1) optimal forecast and forecast error
Actual: yT +1 = c + 1 yT + T +1 + 1 T ,
Forecast: yT +1|T = E ( yT +1 | T ) = c + 1 yT + 1T ,
eT+1|T = yT+1 yT+1|T
F. Error: eT +1|T = T +1 ;
BF-08
Optimal forecast
eg. ARMA(1,1) forecast (continued)
yT + 2 = c + 1 yT +1 + T + 2 + 1 T +1 ,
yT + 2|T = E ( yT + 2 | T ) = c + 1 E ( yT +1 | T ) = c + 1 yT +1|T ,
eT + 2|T = T + 2 + 1 T +1 + 1eT +1|T .
yT+2|T
yT+3|T
yT +3 = c + 1 yT + 2 + T +3 + 1 T + 2 ,
yT +3|T = c + 1 yT + 2|T ,
eT +3|T = T +3 + 1 T + 2 + 1eT + 2|T .
BF-08
Optimal forecast
Linear forecast: a linear combination of the
elements in T. A linear forecast may be different
from E(yT+h|T).
Best linear forecast (aka. linear projection):
yT + h|T = 0 + 1 yT + 2 yT 1 +
with s being chosen to minimise MSFE.
If the true model (dgp) is ARMA, the linear
projection coincides with E(yT+h|T).
In general, the linear projection may be used as an
approximation to E(yT+h|T).
BF-08
yt = bi t i ,
i =0
b0 = 1,
t ~ WN(0, 2 ).
+ bh T + bh +1 T 1 + .
forecast : yT + h|T
BF-08
eT+h|T
yT+h
yT+h|T
T
7
eT + h|T = T + h + b1 T + h 1 + + bh 1 T +1 ,
MA(h 1)
E (eT + h|T ) = 0,
unbiased
BF-08
inside T
= c + 1 yT + 1 T + T +1 ,
yT +1|T = c + 1 yT + 1 T ,
eT +1|T = T +1 ;
yT + 2 = c + 1 ( yT +1|T + eT +1|T ) + T + 2 + 1 T +1 ,
= c + 1 yT +1|T + T + 2 + 1 T +1 + 1eT +1|T
inside T
yT + 2|T = c + 1 yT +1|T ,
eT + 2|T = T + 2 + 1 T +1 + 1eT +1|T .
BF-08
10
12 = 2
yT + 2 = c + 1 ( yT +1|T + eT +1|T ) + T + 2 + 1T +1 ,
yT + 2|T = c + 1 yT +1|T ,
eT + 2|T = 1eT +1|T + T + 2 + 1T +1 ;
22 = 12 12 + (1 + 12 ) 2
yT +3 = c + 1 ( yT + 2|T + eT + 2|T ) + T +3 + 1T + 2 ,
yT +3|T = c + 1 yT + 2|T ,
eT +3|T = 1eT + 2|T + T +3 + 1T + 2 ;
BF-08
32 = 12 22 + (1 + 12 ) 2
11
1970
1975
1980
1985
1990
AR(0-4)
Search within
ARMA(4,4,)
AIC: MA(0-4)
AR(0-4)
AIC: ARMA(3,1)
SIC: ARMA(2,0)
BF-08
SIC: MA(0-4)
12
120
25
Series: Residuals
Sample 1962Q1 1993Q4
Observations 128
110
20
100
8
6
90
15
4
80
10
7.38e-05
0.041454
6.754276
-3.629406
1.412262
0.547303
6.518596
Jarque-Bera
Probability
72.41962
0.000000
-2
-4
1965
1970
1975
1980
1985
1990
0
-4
Residual
BF-08
Mean
Median
Maximum
Minimum
Std. Dev.
Skewness
Kurtosis
Actual
-2
Fitted
13
116
108
112
104
108
100
104
96
100
92
96
92
88
88
84
84
80
80
1990
1991
1992
1993
1994
BF-08
YF_UP
YF_LO
14
EViews
'caemp.prg
wfcreate(wf=null) q 1961:1 2010:4
smpl 1961:1 1994:4
read caemp.dat y
'Plots
smpl 1961:1 1993:4
y.line
y.correl(16)
'Selecting models within ARMA(4,4)
smpl 1962:1 1993:4
matrix(5,5) aic
matrix(5,5) sic
ls y c
sic(1,1)=@schwarz
aic(1,1)=@aic
ls y c ma(1)
sic(1,2)=@schwarz
aic(1,2)=@aic
ls y c ma(1) ma(2)
sic(1,3)=@schwarz
aic(1,3)=@aic
ls y c ma(1) ma(2) ma(3)
sic(1,4)=@schwarz
aic(1,4)=@aic
ls y c ma(1) ma(2) ma(3) ma(4)
sic(1,5)=@schwarz
aic(1,5)=@aic
BF-08
'Forecast exercise
smpl 1962:1 1993:4
eq1.makeresids res
genr yf=y-res
smpl 1994:1 2006:4
eq1.forecast yhat se
genr yf=yhat
genr yf_up=yhat+1.96*se
genr yf_lo=yhat-1.96*se
smpl 1990:1 1994:4
group fig1 y yf yf_up yf_lo
freeze(Figure1) fig1.line
Figure1.draw(shade, bottom) 1994:1 1994:4
show Figure1
smpl 1990:1 2006:4
group fig2 y yf yf_up yf_lo
freeze(Figure2) fig2.line
Figure2.draw(shade, bottom) 1994:1 2006:4
show Figure2
stop
15
Summary
Under MSFE, what is the optimal forecast?
What is a linear forecast?
What is the linear projection?
How do we find the point forecast and forecast
error from a general linear process?
Do you know how to use the chain rule to produce
point forecasts and forecast error variances for
ARMA(1,1)?
How do you make long horizon forecasts for a
stationary time series?
BF-08
16