Beruflich Dokumente
Kultur Dokumente
ECON2209
Slides 04
BF-04
Lecture Plan
Simple models and estimation of trend
time trend models and OLS
smoothers
de-trending
Big picture:
BF-04
yt = mt + st + xt ,
st + p = st ,
s
k =1
t +k
= 0,
E( xt ) = 0
2
Ch.5 Trend
Textbook notation :
Tt = mt , and TIME t = t.
Logistic Functions
mt = 0 + 1t ;
mt = 0 + 1t + 2t 2 .
Logistic function
mt =
BF-04
1 + 1exp( 2t )
, 2 > 0.
0
my, School of Economics, UNSW
- enter market,
- sales grow,
- market satiates.
t
3
Ch.5 Trend
minimises
)]2 ,
y
t
[
m(
,
t
t =1
Ch.5 Trend
1200
7.5
1000
7.0
6.5
800
6.0
600
5.5
400
5.0
200
4.5
4.0
1965 1970 1975 1980 1985 1990 1995 2000
.2
4
.1
.0
-.1
-.2
-.3
1965 1970 1975 1980 1985 1990 1995 2000
Residual
BF-04
Actual
Fitted
Ch.5 Trend
mt = 0 + i t i ,
i =1
AIC(K) = ln(
SSR
SSR
K +1
K +1
)+2
, SIC(K) = ln(
) + ln(T )
.
T
T
T
T
BF-04
K=1
K =2
K=3
K=4
AIC
-1.326056
-1.580543
-1.958790
-1.911177
SIC
-1.243309
-1.456423
-1.793297
-1.704312
Ch.5 Trend
8
7
6
.2
.1
.0
-.1
-.2
-.3
1965 1970 1975 1980 1985 1990 1995 2000
Residual
Actual
Fitted
Ch.5 Trend
BF-04
Ch.5 Trend
T + h = 0 + i (T + h) i
m
i =1
T+h
Interval forecast:
T + h 2 sT + h , m
T + h + 2 sT + h ],
95% CI [m
sT + h = estimated std deviation of forecast error
= s[1 + xT + h ( X ' X ) 1 xT + h ]1/ 2 ,
s = = standard error of regression.
BF-04
Ch.5 Trend
7.5
7.0
6.5
6.0
5.5
5.0
4.5
4.0
1965 1970 1975 1980 1985 1990 1995 2000
4
1965 1970 1975 1980 1985 1990 1995 2000
BF-04
10
Ch.5 Trend
BF-04
11
w y
i = k
t i
i = k
= 1.
BF-04
12
8.0
7.6
7.6
7.2
7.2
6.8
6.8
6.4
6.4
6.0
6.0
5.6
5.6
82
BF-04
84
86
88
90
92
94
96
98
82
84
86
88
90
92
94
96
98
13
s
i =1
t i
= 0,
E( t ) = 0 ,
1
1
1
yt = ( mt 1 + mt + mt +1 ) + ( st 1 + st + st +1 ) + ( t 1 + t + t +1 ) mt
3
3
3
14
yt 2 + yt 1 + yt + yt +1
,
4
yt+ =
yt 1 + yt + yt +1 + yt + 2
.
4
15
MA12b - MA(2*12)
8.0
.006
.004
7.6
.002
7.2
.000
6.8
-.002
-.004
6.4
-.006
6.0
-.008
5.6
-.010
82
BF-04
84
86
88
90
92
94
96
98
82
84
86
88
90
92
94
96
98
16
yt (k + 1) = wi yt i ,
w = 1.
i =0
i =0
MA2x12 - OMA12
8.0
.07
.06
7.6
.05
7.2
.04
6.8
.03
.02
6.4
.01
6.0
.00
5.6
-.01
82
BF-04
84
86
88
90
92
94
96
98
82
84
86
88
90
92
94
96
98
17
yt = (1 )i yt i ,
0 < <1
i =0
or
yt +1 = yt +1 + (1 ) yt ,
BF-04
y1 = y1 ,
t = 2,3,...
It is possible to choose
to minimise the sum
of squared in-sample
forecast errors.
18
EViews smooth
uses an average as
starting value.
6.4
6.0
5.6
82
84
86
88
EMAV
BF-04
90
92
Y
94
96
98
EMA
19
genr ema(1)=.1*y(1)+.9*ema
is equivalent to
EViews
'Read departstoresTurnover05.xls in Eviews from 1982:04 to 2005:04,
'For clicks, see p25, BF-03
ema(t+1)=.1*y(t+1)+.9*ema(t)
for t = 2,3, ...
= 0. 1
20
yt|t 1 = yt 1 ;
Forecast error :
et = yt yt 1 ;
Update MA :
yt = yt 1 + et ;
(use info at t 1)
(error correction)
Income per Capita & Exp MA forecast: alpha=0.8
1200
1000
800
600
400
200
0
1965 1970 1975 1980 1985 1990 1995 2000
BF-04
21
22
Ch.6 Seasonality
st + p = st ,
s
k =1
t +k
= 0,
E( xt ) = 0
BF-04
23
Ch.6 Seasonality
quarter
D1t
D2t
D3t
D4t
96q1
96q2
96q3
96q4
97q1
97q2
97q3
97q4
98q1
D
j =1
jt
= 1,
D
k =1
j ,t + k
= 1,
st = j D jt ?
j =1
How to normalise : st + k = 0 ?
BF-04
k =1
24
Ch.6 Seasonality
mt = 0 + 1t ,
yt = 1t + i Dit + xt ,
i =1
because
D
j =1
jt
= 1.
st = i Dit ,
st + p = st ,
i =1
p
s
k =1
t +k
i =1
p
1
i.
p i =1
= 0.
25
Ch.6 Seasonality
st = i Dit ,
i =1
i =1
8.0
7.5
.8
Seasonality
.12
7.0
6.5
.6
.4
.2
6.0
.08
5.5
.04
.0
-.2
.00
-.04
1997M07
1998M01
1998M07
-.08
-.12
-1
82
84
86
88
Residual
BF-04
-.4
1997M01
90
92
Actual
94
96
98
82
Fitted
84
86
88
90
Seasonality
92
94
96
98
Trend
26
Ch.6 Seasonality
genr D1=@seas(1)
gets January dummy.
scalar gbar=...
handles scalars.
_ means the line
is to be continued.
smpl ... specifies
subsamples to use.
BF-04
27
Ch.6 Seasonality
st = i Dit ,
i =1
1 p
= i.
p i =1
yT + h = 1 (T + h) + i Di ,T + h
i =1
Interval forecast:
95% CI [ yT + h 2 sT + h , yT + h + 2 sT + h ],
sT + h = estimated std deviation of forecast error
T+h
Note yt = mt + st + xt .
Assumption here is
xt being white noise,
which may not be true.
BF-04
28
Ch.6 Seasonality
8.0
7.6
7.2
6.8
6.4
1999
BF-04
2000
2001
2002
2003
2004
29
Ch.6 Seasonality
BF-04
E ( xt ) = 0
30
Ch.6 Seasonality
y t 36 + 2 y t 24 + 3 y t 12 + 3 y t + 3 y t +12 + 2 y t + 24 + y t +36
.
st =
15
yt = yt st
Seasonal adjustment ~
BF-04
31
Ch.6 Seasonality
32
Ch.6 Seasonality
8.0
7.2
7.6
7.0
7.2
6.8
6.8
6.6
6.4
6.4
6.0
6.2
5.6
Trend: MA2*12
6.0
82
84
86
88
90
92
94
96
98
00
02
04
82
84
86
88
90
92
94
96
98
00
02
04
00
02
04
Seasonally-adjusted Data
7.2
.8
CYCLE
SEAS
7.1
.6
7.0
6.9
.4
6.8
.2
6.7
6.6
.0
6.5
-.2
6.4
6.3
-.4
82
BF-04
84
86
88
90
92
94
96
98
00
02
04
82
84
86
88
90
92
94
96
98
33
Summary
How do we choose the order of a polynomial time trend?
What is a 2-sided smoother? One-sided? EWMA?
Under what conditions a smoother removes seasonality?
What are seasonal dummies? And their characteristics?
How do we separate trend and seasonality in a regression
with time trend and seasonal dummies?
What are seasonal smoothers?
What is a seasonally-adjusted series?
BF-04
34