Lecture Notes 3: Trend and Seasonality 1 Modeling and Forecasting Trend 1.1

advertisement
Lecture Notes 3: Trend and Seasonality
ECMT 475: Economic Forecasting (Spring 2011)
Guangyi Ma
1
Modeling and Forecasting Trend
1.1
What is trend?
slow, long-run evolution in the variable
might be the result of slowly evolving preferences, technologies, institutions, and demographics
deterministic or stochastic trend
linear vs nonlinear trend
examples
– linear trend: labor force participation rate (female, male)
– nonlinear trend: NYSE volume
1.2
A model with trend component
We can specify a model for a univariate time series by using a linear trend,
yt =
where ut
i:i:d:N 0;
2
0
+
1t
+ ut
.
To capture the nonlinearity observed in data, we can use a model with
a quadratic trend,
yt =
where ut
i:i:d:N 0;
2
0
+
1t
.
1
+
2t
2
+ ut
Sometimes, other types of nonlinear trend are more appropriate, such as
exponential trend (log-linear trend), why?
yt =
0 exp ( 1 t
ln (yt ) = ln (
1.3
0)
+
+ ut )
1t
+ ut
Estimating trend models
We use least square estimation again, since these models are special cases
of linear regression models. Note that in the "quadratic trend" model, yt
is not a linear function of t, but it is a linear function of t; t2 . Similarly,
the exponential trend model can be transfered into a linear regression model
after taking log on yt .
1.4
Forecasting trend
Once we get an estimate from the regression model, we can make out-ofsample forecast: point, interval, or even density forecast if needed. All the
details are described in previous reviews.
1.5
Issues of model selection
One important question is, how do we pick a special model among several
competing ones to …t a series of observations? More generally, when we run
a linear regression, which set of X variables should we include in the right
hand side? Here our goal is to …nd a model with the smallest out-of-sample
1-step-ahead mean squared prediction error. Several critera follow.
MSE or R2 :
1 XT 2
e
t=1 t
T
PT 2
e
= 1 PT t=1 t 2
y)
t=1 (yt
M SE =
R2
They are equivalent since smaller MSE implies larger R2 . This is not a
good model selection criterion because it does not penalize the degree
2
of freedom. One cannot choose the …tted model corresponding to the
largest R2 since R2 will keep increasing (at least not decrease) when
more variables included.
2
A mode…ed MSE or R :
s2 =
R
2
1
T
= 1
XT
T
e2t =
M SE
t=1
k
T k
PT 2
et = (T k)
PT t=1
y)2 = (T 1)
t=1 (yt
They are equivalent too! This selection criterion does penalize the
degree of freedom.
AIC or SIC:
AIC = exp
k
SIC = T T
2k 1 XT 2
e = exp
t=1 t
T T
k
1 XT 2
et = T T M SE
t=1
T
2k
T
M SE
They are di¤erent, both penalize the degree of freedom highter than
the mode…ed MSE. We usually need both of them as reference for
model selection.
2
Modeling and Forecasting Seasonality
Nature and sources of seasonality
– Seasonality comes from calendar cycles due to technology (mostly
weather related), preference, institutions, etc.
– Examples: gasoline sales, liquor sales, durable goods sales, etc.
Modeling seasonality: dummy variables!
Extension: more general calendar e¤ects
Examples: holiday variation, trading-day variation, Monday e¤ect
3
Forecasting seasonality: all regular tools applied
4
Download