Forecasting using
Forecasting using R 1
Outline
Average forecasts
T
1X
yT +1|T = yt
T
t =1
Average forecasts
T
1X
yT +1|T = yt
T
t =1
Average forecasts
T
1X
yT +1|T = yt
T
t =1
Average forecasts
T
1X
yT +1|T = yt
T
t =1
where 0 1.
where 0 1.
yt+1|t = yt + (1 )yt|t1
yt+1|t = yt + (1 )yt|t1
Initialization
Last term in weighted moving average is
(1 )T `0 .
So value of `0 plays a role in all subsequent
forecasts.
Weight is small unless close to zero or T
small.
Common to set `0 = y1 . Better to treat it as a
parameter, along with .
Initialization
Last term in weighted moving average is
(1 )T `0 .
So value of `0 plays a role in all subsequent
forecasts.
Weight is small unless close to zero or T
small.
Common to set `0 = y1 . Better to treat it as a
parameter, along with .
Initialization
Last term in weighted moving average is
(1 )T `0 .
So value of `0 plays a role in all subsequent
forecasts.
Weight is small unless close to zero or T
small.
Common to set `0 = y1 . Better to treat it as a
parameter, along with .
Initialization
Last term in weighted moving average is
(1 )T `0 .
So value of `0 plays a role in all subsequent
forecasts.
Weight is small unless close to zero or T
small.
Common to set `0 = y1 . Better to treat it as a
parameter, along with .
5000
4500
4000
3500
Year
= 0.01
5500
No. strikes in US
5000
4500
4000
3500
Year
Optimization
We can choose and `0 by minimizing MSE:
T
1 X
MSE = (yt yt|t1 )2
T1
t =2
Optimization
We can choose and `0 by minimizing MSE:
T
1 X
MSE = (yt yt|t1 )2
T1
t =2
= 0.01
MSE= 1976007
5500
No. strikes in US
5000
4500
4000
3500
Year
1.4
1.2
= 0.68
1.0
0.8
alpha
Multi-step forecasts
yT +h|T = yT +1|T , h = 2, 3, . . .
Multi-step forecasts
yT +h|T = yT +1|T , h = 2, 3, . . .
Multi-step forecasts
yT +h|T = yT +1|T , h = 2, 3, . . .
Multi-step forecasts
yT +h|T = yT +1|T , h = 2, 3, . . .
= 0.2
= 0.6
= 0.89
500
Oil (millions of tonnes)
480
460
440
420
Year
accuracy(fit1)
accuracy(fit2)
accuracy(fit3)
Component form
yt+h|t = `t
`t = yt + (1 )`t1
Component form
yt+h|t = `t
`t = yt + (1 )`t1
Component form
yt+h|t = `t
`t = yt + (1 )`t1
Optimization
Need to find and by minimizing the value
of MSE.
We also optimize MSE for `0 and b0 .
Optimizing in four dimensions is getting tricky!
accuracy(fit1)
accuracy(fit2)