Académique Documents
Professionnel Documents
Culture Documents
July, 2015
yi = α + βxi + i i = 1...n
yt = α + βxt + t
NO!
(Or rather, only under special circumstances, and such a regression is only
ever part of the answer!)
yt = αy + βy xt + yt
xt = αx + βx yt + xt
yt = a + bxt + et
= a + b(α + βx yt + xt ) + et
yt = α + βyt−1 + t or yt = α + βt−1 + t
yt = α + βyt−1 + t or yt = α + βt−1 + t
yt = α0 + α1 yt−1 + β0 xt + β1 xt−1 + t
in a way that elimantes the two common problems with time series
regressions.
Our sample data {yt }, {xt } refers to observations on the same unit in
sequential time periods, t = 1, . . . , T
Periods may be years, quarters, months, weeks or days, depending on
interst and data availability
Part II looks at testing for permanent shocks and dealing with Integrated
series
The data file ‘macro vars.xls’ contains lots of U.S. data series
GDP is a good example
Look at your data. For data in levels, taking logs is often the first
step in applied work
Not if the data is already in % changes, or an interest rate!
Logarithms make percentage changes comparable by eye, which is
often more relevant.
Recall g = (xt − xt−1 )/xt−1 ⇒ 1 + g = xt /xt−1 , so then
ln(xt ) − ln(xt−1 ) = ln(1 + g ) ≈ ln(g ) for small g .
This now looks mean reverting. Later we will test formally whether a
series is mean reverting or integrated, but don’t forget it’s always
sensible to start by looking at your data.
∆yt = yt − yt−1 is the difference operator.
So far I have talked about mean reverting series, but we can be more
precise
We will model variables which are covariance stationary (stationary
for short)
The mean exists and does not depend on time, E[yt ] = µ for all t
(quick notation ∀t).
The variance exists and is independent of time, var(yt ) = σy2 .
The Autocovariance, cov(yt , yt−k ) = σk2 is indpendent of time, it
depends only on k and not on t
yt = α + βyt−1 + t (1)
Note we lose an extra DoF for every lag we include in the autoregression
Confidence testing as usual, given |b| < 1:
τ = (b − bH0 )/SE (b) ∼ tα/2,DoF
Expect low R 2 compared to cross sectional data.
Plot the residuals of the regression. Do you think they meet A1 - A3?
We will look at formal tests for these assumptions below.
Equation:
yt = α + βt−1 + t
Simple to analyse
Stationary for any β value
t }T
Harder to estimate - b determines {ˆ t }T
t=1 , but {ˆ t=1 is the
regressor which determines b!
Solution: take an MLE approach (as in Probit)
The MLE approach suggests another tool for tackling model selection
Minimise the expected information loss across potential models
Compare 1-step ahead forecasts from 4-lag and preferred AR, MA models
MSE
Variable k=1 k=4 k=8
∆ GDP
∆ Cons
∆ Inv
∆ Inf
Estimate the model to 2005. From 2003q1, produce static 1-period ahead
forecasts up to 2005, then dynamic 4 and 8 period ahead forecasts also
from 2003q1
What happens to the MSE as the forecast horizon increases?
Now estimate the model to 2007 and repeat the process using dynamic
out of sample forecasting up to 2011
MSE
Variable k=1 k=4 k=8
∆ GDP
∆ Cons
∆ Inv
∆ Inf
This is the problem the BoE had (with a more sophisticated model) during
the crisis
The FED did less badly because its model updates the parameters, via the
Kalman filter, when it makes an error. Beyond the scope of this course!
We have used the MSFE to look at different models and the effect of
different time horizons
Out of sample forecasts errors are larger than in-sample, because the
forecast error is really composed of two parts
Think about the way the influence past shocks, t−s decays over time
To go deeper into time series we need to brush up our maths!
We will look at deriving the conditional and unconditional
expectations, variances and autocovariances for simple time-series
models.
The conditional expectation E[yt+1 |yt ] follows from the conditional mean
eqation we write down in AR(1) or MA(1) model
MA(1)
E[yt+k |yt ] = α ∀k ≥ 2
MA(1)
Conditional variance
Unconditional variance
Conditional variance
Unconditional variance
PIC
cov(yt , yt−k )
ρk =
var(yt )
PIC
The ACF shows us how long it takes for the influence of past shocks
to die away, by measuring the correlation between yt and its own past
values.
For stationary processes the ACF becomes statistically insignificant
after a finite number of periods.
Stationary processes have finite memory - the influence of a shock is
finite
PIC:growth ACF
PIC
PIC
PIC
What do you notice about ACF vs. PACF in AR models?
yt = β(yt−1 − βt−2 ) + t
= β(yt−1 − β(yt−2 − βt−3 )) + t
= βyt−1 − β 2 yt−2 + β 3 (yt−3 − βt−4 ) + t
X∞
yt = (−1)i+1 β i yt−i + t
j=1
y1 = y0 + 1 = 1
y2 = y1 + 2 = 1 + 2
...yt = 1 + 2 + · · · + t
Xt−1
var(yt ) = var( t−i )
j=0
2
= tσ
→∞ as t → ∞
∆yt = α + (β − 1)yt−1 + t
= α + ρyt−1 + t
H0 : ρ̂ = 0 ⇒ there is a unit root
HA : ρ̂ < 0 ⇒ No unit root
ρ̂
tDF =
SE (ρ̂)
The test stat tDF follows the Dickey Fuller distribution, which gives much
more negative critical values than the standard normal
PIC
The DF distribution is sensitive to specification of the test
I Inclusion of an intercept
I Inclusion of a trend
I Number of lags
I Sample size
yt = α + β1 yt−1 + β2 yt−2 + t
= α + β1 yt−1 + β2 yt−1 − β2 yt−1 + β2 yt−2 + t
= α + (β1 + β2 )yt−1 − β2 ∆yt−1 + t
∆yt = α + (β1 + β2 − 1)yt−1 − β2 ∆yt−1 + t
= α + ρyt−1 − β2 ∆yt−1 + t
yt = α + γt + βyt−1 + t
∆yt = α + (β − 1)(yt−1 − gt) + t
= α + ρ(yt−1 − gt) + t
⇒ ∆yt = α + t if ρ = 0 (2)
⇒ yt = α + γt + βyt−1 + t if ρ < 0 (3)
Plots of series
If a linear combination of I(1) series is I(0) then the two series cointegrate
xt ∼ I (1) yt ∼ I (1)
yt − βxt ∼ I (0)
Xt = Xt−1 + t
t
X
⇒ Xt = t
s=1
The common stochastic trend has been cancelled out. The pair (1, β) is
called the cointegrating vector as gives is the stationary linear combination
of y and x
Alexander Karalis Isaac (Warwick) Time Series July, 2015 75 / 90
Output and Consumption
ct = βyt +
This allows for the response of ct to its own past, current and lagged
values of yt
ct = β1 yt + β2 yt−1 + β3 ct−1 + t
= β1 yt − β1 yt−1 + β1 yt−1 + β2 yt−1 + β3 ct−1 + t
= β1 ∆yt + (β1 + β2 )yt−1 + β3 ct−1 + t
∆ct = β1 ∆yt + (β1 + β2 )yt−1 + (β3 − 1)ct−1 + t
β1 + β2
= β1 ∆yt + (β3 − 1) ct−1 − yt−1 +t
1 − β3
| {z }
E. C. term
∆yt , ∆ct are I (0), provided there is cointegration, so are the error
term and the equilibrium relationship in the large brackets
ct = βyt + νt
⇒ ν̂t = ct − β̂yt
ct = βyt + νt
The Engle-Granger procedure works well with two variables, but there are
drawbacks
The initial regression is misspecified, ν̂t is usually serially correlated
This two-step step approach introduces more variance than a
dynamically well-specified 1-step procedure
Results, esp. with more than two variables are sensitive to which
variable is taken as the left hand side variable
With more than two variables, there may be more than one
cointegrating relationship, and EG will estimate a linear combination
of these relationships, which has no real interpretation
These problems can be overcome by the Johansen procedure which is a
vector-based approach to estimating cointegrating equations