Forecasting
Forecasting
Forecasting
Lecture 15
Forecasting
Forecasting
• A shock is often used to describe an unexpected change in a variable
or in the value of the error terms at a particular time period.
1
RS – EC2 - Lecture 15
• Notation:
- Forecast for T+l made at T: 𝑌 ,𝑌 | ,𝑌 𝑙 .
2
RS – EC2 - Lecture 15
𝑌 𝐸𝑌 |𝐼
- Estimation ˆ (Estimate of )
(Evaluation in-sample)
Yˆt ˆYt 1 (Predictio n)
- Forecast
(Evaluation out-of-sample) Yˆ t 1 ˆYˆ (Forecast)
t
3
RS – EC2 - Lecture 15
• Assume that we have data Y1, Y2, ... , YT . We want to forecast YT+l.
Then,
YT 0 1YT 1 pYT p T 1T 1 qT q
4
RS – EC2 - Lecture 15
YˆT E YT YT , YT 1 , , Y1
T 1T 1
0, j0
where E T j YT , , Y1
T j , j 0
• Then, we define the forecast error:
e T Y T YˆT
1
T 1 T 1 1 T 1
i0
i T i
YT 1 0 T 1 1 T 2 T 1
YˆT 1 0 1 T 2 T 1
e 1 Y Yˆ 1
T T 1 T T 1
5
RS – EC2 - Lecture 15
• As we forecast into the future, the forecasts are not very interesting
(unconditional forecasts!). That is why ARMA (or ARIMA)
forecasting is useful only for short-term forecasting.
YˆT 2 1 . 96 1 12
6
RS – EC2 - Lecture 15
1
i0
i T i T eT T
YˆT YˆT 1 1 YT YˆT 1 1
YˆT 1 YˆT 1 YT 1 YˆT 1
• Example: l = 1, T = 100.
Yˆ101 1 Yˆ100 2 1 Y101 Yˆ100 1
7
RS – EC2 - Lecture 15
E Y T Y1 , , Y T exp E ln Y T ln Y1 , , ln Y T
2
• If X ~ N(, 2), then, E exp X exp .
2
8
RS – EC2 - Lecture 15
9
RS – EC2 - Lecture 15
10
RS – EC2 - Lecture 15
SSE
MSE 2 . 74
n 1
• Calculate this for =0.2, 0.3,…, 0.9, 1 and compare the MSEs.
Choose with minimum MSE 21
22
11
RS – EC2 - Lecture 15
12
RS – EC2 - Lecture 15
1 Y Y Y Y Y Ys
2.T0 s 1 1 s 2 2 s s
s s s s
or T0 Yt / s Yt / s / s
s 2s
t 1 t s 1 25
26
13
RS – EC2 - Lecture 15
14
RS – EC2 - Lecture 15
Evaluation of forecasts
• Summary of loss functions of out-of-sample forecast accuracy:
T m T m
1 1
Mean Error = ( yˆi yi )
m i T 1 ei
m i T 1
T m T m
1 1
Mean Absolute Error (MAE) = | yˆi yi |
m i T 1
| ei |
m i T 1
T m T m
1 1
Mean Squared Error (MSE) = ( yˆi yi )2
m i T 1
ei 2
m i T 1
T m T m
1 1
Root Mean Square Error (RMSE)= ( yˆi yi )2
m iT 1
ei 2
m iT 1
T m
1
ei 2
m iT 1
U
Theil’s U-stat = 1
T
T y
i 1
i
2
15
RS – EC2 - Lecture 15
Var [ d ] / T
d
N ( 0 ,1), d
m
d
i T 1
i
16
RS – EC2 - Lecture 15
•Note: If {etM1} & {etM2} are perfectly correlated, the numerator and
denominator of the DM test are both converging to 0 as T → ∞.
Avoid DM test when this situation is suspected (say, two
nested models.) Though, in small samples, it is OK.
17
RS – EC2 - Lecture 15
18
RS – EC2 - Lecture 15
Combination of Forecasts
• Idea – from Bates & Granger (Operations Research Quarterly, 1969):
- We have different forecasts from R models:
YˆTM 1 , YˆTM 2
,.... YˆTMR
• Q: Why not combine them?
• We can derived optimal weights –i,e., ωj’s that minimize the variance
of the forecast. Under the uncorrelated assumption:
R
Mj * j 2
j 1
j 2
19
RS – EC2 - Lecture 15
20
RS – EC2 - Lecture 15
21
RS – EC2 - Lecture 15
• BMA puts the most weight on the model with the smallest BIC.
22
RS – EC2 - Lecture 15
45
23