You are on page 1of 7

# Prof.

Erdin
ECO 310

1.

## Stationary Vs NoNStationary Stocastic Processes

A stochastic process (a collection of random variables ordered in time, e.g. GDP(t)) is said to
be (weakly)

stationary

if its mean and variance are constant over time, i.e. time invariant (along

with its autocovariance). Such a time series will tend to return to its mean (mean reversion) and
uctuations around this mean will have a broadly constant amplitude. Alternatively, a stationary
process will not drift too far away from its mean value because of the nite variance.
By contrast, a

nonstationary

or both.

with

## such that it is i.i.d (independently and identically distributed)

Cov(ut , uts ) = 0

Example 1.

A Random Walk Model (RWM) is a nonstationary process. There are two types: a)

## without a drift and b) with a drift.

a)

Yt = Yt1 + ut

where value of Y at time t is equal to its previous value and a random shock.

## states that stock prices in ecient markets follow a random walk

process without a drift such that there is no scope for protable speculation in the stock market:
the change in the stock price from one period to the next is essentially random and unpredictable.

Y1 = Y0 + u1 , Y2 = Y1 + u2 , Y3 = Y2 + u3 and replacing, Y3 = Y0 + u1 + u2 + u3
P
such that Yt = Y0 +
ut Therefore, E(Yt ) = Y0 since errors have zero expectation. Similarly,
2
V ar(Yt ) = t i.e. it is dependent on time, not time invariant. Hence, RWM without a drift is a
We can write:

nonstationary

process: Although its mean is constant over time, its variance increases over time. In

this model, shocks persist as the current value is equal to the initial value plus a series of random
shocks over time. A RW has a innite memory!

## Yt = + Yt1 + ut We can write: Y1 = + Y0 + u1 , Y2 = + Y1 + u2 , Y3 = + Y2 + u3

P
P
and replacing, Y3 = + + + Y0 + u1 + u2 + u3 such that Yt =
+ Y0 + ut Therefore,
E(Yt ) = t + Y0 since errors have zero expectation. Similarly, V ar(Yt ) = t 2 Hence, RWM with a
b)

nonstationary
nonstationary

drift is a
again a

process: Both its mean and its variance increase over time such that it is

process.

= 1.

If in fact,

= 1,

## then we have a unit root problem, a

case of nonstationarity (RW models are nonstationary as they contain a unit root!). If
the series

Yt

|| > 1

|| < 1,

then

## Time Series Class Notes

2.

ECO310, Econometrics

Prof. Erdin

## If the trend in a time series is a deterministic function of time, such as

and

t2 ,

we call it a

deterministic trend (predictable). If it is not predictable, we have a stochastic trend. Consider the
following model:

Yt = + 1 t + 2 Yt1 + ut

where

ut

## is white noise, i.e.

and

2 = 1.

iid.
Yt = Yt1 + ut .
because E(4Yt ) =

## 4Yt = ut . Note that dierenced series is stationary (DS)

V ar(4Yt ) = V ar(ut ) = 2 . Both are time-invariant. Hence, a random

If we dierence, we get

E(ut ) = 0

and

walk without

and

2 = 1

## 4Yt = + ut . Note that dierenced series is

E(4Yt ) = E( + ut ) = and V ar(4Yt ) = V ar(ut ) = 2 . Both are
we dierence, we get

## again stationary (DS) because

again time-invariant. Hence, a

random walk with a drift is also dierence-stationary (DS). Also note that in this case,
upward or downward depending on the sign of the drift

Yt

is trending

## (rather than deterministic).

Deterministic Trend: 6= 0, 1 6= 0,

## 2 = 0. We get Yt = + 1 t + ut Note that

the mean of the series, E(Yt ) = E( + 1 t) = + 1 t , which is time-varying but its variance,
V ar(Yt ) = V ar( + 1 t + ut ) = 2 which is time-invariant. Still, the series with a deterministic trend
is non-stationary! Once we know the values of and 1 (we can estimate them by regressing the
series on t), we can also estimate the mean value and forecast it perfectly. Hence, we can subtract
and

the mean from the series (detrending) and create detrended series which are stationary.

## Random walk with drift and deterministic trend: 6= 0, 1 6= 0,

Yt = + 1 t + Yt1 + ut

## Note that the dierenced series,

and

4Yt = + 1 t + ut

2 = 1.

We get

is still time-varying

and hence, the mean of the dierenced series is nonstationary! Detrending is still necessary on the
dierenced series to make it stationary.
3.

are white noise.

= Yt1 + ut

## Xt = Xt1 + t such that the errors

instance, in Yt = + Xt + t where

and

## If we use these series in a regression, for

is white noise error, we can obtain a spurious regression: We will get a highly signicant slope

R2 value

## (in the case of trending variables, we will also get a high

2
value for the R as well as highly signicant

## estimate). Based on this result, one can be tempted

to conclude that the variable X has a signicant impact on Y whereas a priori there should be none.
In fact, this regression is meaningless!

## According to Granger and Newbold, an

R2 > d

where

is durbin-watson statistic, is a good rule of thumb for suspecting that the estimated regression is
spurious.

## Time Series Class Notes

ECO310, Econometrics

## Xt are stationary and can be used in a

regression but if the original series are random walks such that Yt = Yt1 +ut and Xt = Xt1 +t , then
Yt = ut and Xt = t and regressing one on the other should generate a R2 which is practically
close to zero (intuition: a random shock regressed over another should show no correlation) and d
Also it must be noted that the dierenced series,

Yt

Prof. Erdin

and

is close to 2 (i.e. no serial correlation). This is yet another way to verify that the original series are
random walks.
Although quite dramatic, this is a strong reminder that one should be cautious in running regressions with such nonstationary series.

4.

## A Test of Stationarity: unit root test (Dickey-Fuller Test)

There are several tests of stationarity, we will focus on a test which became popular over the past
years: This is the unit root tests (Dickey-Fuller tests).
The starting point is the following autoregressive process:

Yt = Yt1 + ut .

When

= 1,

we

have a unit root and a random walk without a drift. In principle, we can run this regression and
see if

=1

to check for a nonstationary random walk (unit root) process but we can not estimate

a model regressing the series on its lagged value to see if the estimated rho is equal to 1 because
in the presence of a unit root, the t-statistics for the

## coecient is severely biased. Therefore, we

manipulate this equation and express it somewhat dierently subtracting the lagged value from both
sides.

## Yt Yt1 = Yt1 Yt1 + ut or Yt = ( 1)Yt1 + ut

Let us call ( 1) = , then Yt = Yt1 + ut
and test
against HA :

In practice, we can estimate this model (in Stata, reg d.Y l.Y, noconstant) and obtain
the hypothesis:

H0 : = 0

## < 0 (i.e. there is no unit root and

if = 0, then from ( 1) = we

## the series is stationary). Note that this is a one-tailed test, and

can conclude that

=1

## such that there is a unit root (or the

series is nonstationary) and we can not reject the null! Also, note that the alternative hypothesis
sets

< 0

## because this means

< 1

(we reject the null and conclude there is no unit root and

>1

## two-tailed but it should be one-tailed (one-sided).

The problem is that we can not rely on the usual t-test on the signicance of

!!!

The alternative

is to use the Dickey-Fuller test statistic with its own critical values for each of the following three
specications.
4.1.

## The test is conducted under the assumption that the

errors (residuals) are serially uncorrelated. In principle, 3 specications can be tried, depending on
whether the series show a trend or not.

## Yt = Yt1 + ut A random walk (no drift, no time trend)

b) Yt = + Yt1 + ut A random walk (with drift, no time trend)
a)

## Time Series Class Notes

ECO310, Econometrics

Prof. Erdin

## Yt = + Yt1 + t + ut A random walk (with drift, with time trend)

Note that for each case, H0 : = 0 (i.e. there is a unit root, and the series
has a stochastic trend) against HA : < 0 (i.e. there is no unit root and the
c)

it

is nonstationary or
series is stationary,

Short method:

## a) dfuller Y, noconstant regress b) dfuller Y, regress and c) dfuller Y, trend

regress.

The results report a MacKinnon p-value. If this p-value<, then reject the

null in each case. If not, then do not reject the null and conclude there is a unit root!
Alternatively,

Long Method:

## Check the t-statistic of the lagged

Yt1

or its coecient,

and reject

the null if and only if the | t-statistic| > |df critical|. Note that you should take the absolute value of
both values when comparing and furthermore, you should use dierent dickey-fuller critical values
(df critical) for each 3 specications (trial and error! no specication is correct among the three a
priori, some graphical sense of the series may help).
DF critical values: b) at 1%, (-3.43), at 5% (-2.86) and at 10% (-2.57), c) at 1%, (-3.96), at 5%
(-3.41) and at 10% (-3.12)
These critical values also apply for the augmented DF test with lagged terms and Stata under
dfuller also report critical values.

4.2.

## The test is conducted un-

der the assumption that the errors (residuals) may be serially correlated.

## This test is conducted

augmenting the preceding 3 equations by adding the lagged values of the dependent variable,

Yt

to the specications to eliminate the serial correlation. Formally, the test is based on the following
equation.

Yt = a0 + Yt1 + a1 t +

m
X

i Yti + t

i=1
where

## t is a white noise, a0 is an intercept (constant) and , i and a1 are coecients.

The number

of lagged dierenced terms is often determined empirically, the idea being to include enough terms
so that the the error term is indeed serially uncorrelated (so that we can obtain unbiased estimates
of the

Yt1 ).

## In practice, the appropriate lag may be set,

for instance, based on minimizing the Akaike Information Criterion (AIC) (after the regression:

estat aic

reg

## dierent lag specications).

If we have quarterly data, we can set

m=4

## Yt = a0 + Yt1 + a1 t + 1 Yt1 + 2 Yt2 + 3 Yt3 + 4 Yt4 + t

To estimate this regression in Stata, issue the command:

## Time Series Class Notes

Example 2.

ECO310, Econometrics

Prof. Erdin

Consider the class exercise on r6 (6 month T-bill rate) vs r3 (3 month T-bill rate)

with the UnitRootTest_USinterestrates.smcl le under Stata Output folder. In line 28, a df test is
conducted with one lag, no trend but a drift (case b, augmented). The t-statistic for lagged term
is -2.25 (or z(t)=-2.25) . Applying the long test, we obtain the result: Do not reject the null since
|-2.25| < |-2.86| at 5% signicance. Hence, we can not reject the unit root in r3 series! Note that
the Mackinnon p-value= 0.1887 > 0.05=alpha, conrming the previous result.

5.
6.

## Suppose that you subject two series,

contain a unit root.
integrated of order 1

Yt

and

Xt

both are

## It is possible that these

two series contain a common stochastic trend that their regression will not necessarily be spurious.
In this case, despite the trend, they will move together over time such that they will be cointegrated.
Economically speaking, two series will be cointegrated if they have a long term, or equilibrium
relationship between them.

## In theory, we can expect several economic variables to display co-

movement over time, indicating that that there is a stable long term equilibrium between them. For
instance, the quantity theory of money implies that a long term stable relationship exists between the
money growth and ination i.e. these series might be cointegrated (even when they are individually
random walks).

## Testing for Cointegration.

From nance theory, we expect the 6-month T-bill rate and the 3-

month T-bill rate to be cointegrated. Otherwise, one can exploit the discrepancy between these two
rates and make a prot (which should not persist in the long run equilibrium). Before we specify
a cointegration regression between these two variables to check for the presence of cointegration,
we test whether these series are stationary, trend stationary or dierence stationary (with the same
order of integration, for instance, I(1) process).
Regressing

t = 0.1354 + 1.0259r3t
r3t , we get the following equation: r6

r6t

on

r6t

and

with a

R2 = 0.9932

(line 45)
Since both

r3t

are nonstationary (see the unit root tests in the same smcl le), there is

a possibility for a spurious regression. Note also that in line 36 and 37, rst dierencing eliminates
the unit roots in both

r6t

and

r3t

so they are integrated order 1, I(1) processes. So, we can run the

## above regression and call it the cointegration regression!

When we obtain the residuals from this regression,

u
t

u
t

## is stationary such that the two

series do not drift too much apart from each other: the residual which is a linear combination of
these two series is stationary and hence, there is cointegration between the two variables!

## Time Series Class Notes

ECO310, Econometrics

## The test for cointegration, therefore, species that

there is no cointegration between
there is cointegration between

r6t

r6t

and

r3t

and

r3t ).

) and

Prof. Erdin

H0 : u
t has a unit root and nonstationary
HA : u
t has no unit root and stationary

(i.e.
(i.e.

## on the residual of the cointegration regression.

Note that in the smcl le on USinterest rates, several dierent unit root tests on

u
t

have been

tried and in each case, we nd that the Mackinnon p-value < alpha such that we reject the null of
no cointegration in favor of cointegration between these two rates. Indeed, there exists a longrun
equilibrium between the two series.

Important note:

## to the cointegration regression to see if

cointegration exists based on a unit root test of its residuals. As an example, suppose you run the
above cointegration regression, save the residuals under uhat and conduct a unit root test on uhat
to check for cointegration.

## uhat is nonstationary and there

is no cointegration. In this case, also try to rerun the regression with a time variable, again save
uhat2 and perform the cointegration test on uhat2. In this case, there is a possibility that uhat2
will this time be stationary, suggesting cointegration between the interest rates. This result implies
that uhat2 is stationary (no unit root) around a deterministic trend, still implying cointegration.

7.

## Error Correction Model

According to Granger, cointegration check is necessary to avoid spurious regressions. When two
random walk (nonstationary, unit root) variables (integrated of order 1, I(1)) are cointegrated, then
an error correction model can be formulated to study their shortrun dynamics.

Example 3.

Assume that nance theory describes the longrun relationship between a 6 month and

r6 = + r3

where

## is a maturity premium for the 6 month

bill over the 3 month bill. Let us formulate a regression model for this theory:

r6t = + r3t + ut
where

the theory.

and

reg

r6 r3

We expect

and

= 1

in line with

## will create a spurious regression as both of the

series are random walks with unit roots as we established before through dickey-fuller tests, unless
of course they are cointegrated. We have also tested for cointegration between these variables and
conrmed that there exists a longterm stable equilibrium relationship between these series, i.e. there
exists cointegration. This implies that the above regression is a meaningful cointegration regression
describing their longrun comovement.
Once we establish cointegration, we can also study the short-run dynamics in an error-correction
model. This enriches our understanding of how the series adjust to longrun equilibrium when and
if they deviate in the shortrun from this stable pattern of longrun behavior.
error-correction model under the simplifying assumption that

Here is a simple

u
t1 =

## Time Series Class Notes

r6t1
r3t1 .

ECO310, Econometrics

Prof. Erdin

t1

## Let us call this lagged error:

a) reg r6 r3, b) predict uhat, residuals ad c) gen sradj=l.uhat) and add this term to the equation in
dierences which forms our error correction model.

## 4r6t = 0 + 1 4r3t + 2 sradjt + t

Note that the coecient of the sradj variable,
expected be of

negative

sign!

Intuition:

Assume that

## r6t1 > + r3t1

at some time

t1

such

that there is a short-run disequilibrium in this market. As is well-known, this will drive the price
of

r6

t,

correcting partially the disequilibrium (it may take some time for the long-run equilibrium to be

bonds up and hence should reduce, at least to some extent, the yield,

r6t

## in the next period,

restored with equality in the above model), hence, one should expect that when the
there should be a negative change in

r6t

i.e.,

4r6t < 0