You are on page 1of 7


ECO 310



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)


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


time series will have a time-varying mean or a time-varying variance

or both.

A white noise process: ut N (0, 2)


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.


Yt = Yt1 + ut

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

Ecient market hypothesis

states that stock prices in ecient markets follow a random walk

process without a drift such that there is no scope for protable 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
such that Yt = Y0 +
ut Therefore, E(Yt ) = Y0 since errors have zero expectation. Similarly,
V ar(Yt ) = t i.e. it is dependent on time, not time invariant. Hence, RWM without a drift is a
We can write:


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 innite memory!

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

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


drift is a
again a

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


Unit Root Stochastic Process.

Let us write (a) in example 1 as

Note that the model becomes (a) if

= 1.

If in fact,

= 1,

Yt = Yt1 +ut where 1 6 6 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


is stationary. Note that if

|| > 1

|| < 1,


then the series will be explosive (we rule this out).

Time Series Class Notes


ECO310, Econometrics

Prof. Erdin

Trend Stationary (TS) and Difference Stationary (DS) Processes

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


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



Pure Random Walk: = 0, 1 = 0,

is white noise, i.e.


2 = 1.

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

This is nonstationary as we get

4Yt = ut . Note that dierenced series is stationary (DS)

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

If we dierence, we get

E(ut ) = 0


walk without

a drift is dierence-stationary (DS).

Random Walk with a drift: 6= 0, 1 = 0,


2 = 1

and this is again nonstationary. If

4Yt = + ut . Note that dierenced series is

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

again stationary (DS) because

again time-invariant. Hence, a

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


is trending

() but this will be called a stochastic trend

(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

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 dierenced series,


4Yt = + 1 t + ut

2 = 1.

We get

is still time-varying

and hence, the mean of the dierenced series is nonstationary! Detrending is still necessary on the
dierenced series to make it stationary.

The phenomenon of Spurious Regression

Suppose we have two random walk series:Yt

are white noise.

= Yt1 + ut

Xt = Xt1 + t such that the errors

instance, in Yt = + Xt + t where


If we use these series in a regression, for

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

coecient but a relatively small

R2 value

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

value for the R as well as highly signicant

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

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

According to Granger and Newbold, an

R2 > d


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

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 dierenced series,


Prof. Erdin


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.


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 .


= 1,


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


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

coecient is severely biased. Therefore, we

manipulate this equation and express it somewhat dierently subtracting the lagged value from both

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

(i.e. there is a unit root, and the series is nonstationary)

< 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


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

< 0

because this means

< 1

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

the series is stationary). We have already ruled out


so the alternative hypothesis can not be

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 signicance of


The alternative

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

The Dickey Fuller Test (DF test).

The test is conducted under the assumption that the

errors (residuals) are serially uncorrelated. In principle, 3 specications 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)

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


is nonstationary or
series is stationary,

possibly around a deterministic trend).

The Stata tests:

Short method:

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


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!

Long Method:

Check the t-statistic of the lagged


or its coecient,

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 dierent dickey-fuller critical values
(df critical) for each 3 specications (trial and error! no specication 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.


The Augmented Dickey-Fuller Test (Augmented DF test).

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,


to the specications to eliminate the serial correlation. Formally, the test is based on the following

Yt = a0 + Yt1 + a1 t +


i Yti + t


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

The number

of lagged dierenced 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

the coecient in front of the lagged

Yt1 ).

In practice, the appropriate lag may be set,

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

d.Y l.Y t l.d.Y l2.d.Y

, for instance, we can issue the command,

estat aic


command and repeat it for

dierent lag specications).

If we have quarterly data, we can set


such that we have 4 lagged dienced variables (to

correct for possible serial correlation).

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

To estimate this regression in Stata, issue the command:

dfuller Y, lags(4) trend regress

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% signicance. Hence, we can not reject the unit root in r3 series! Note that
the Mackinnon p-value= 0.1887 > 0.05=alpha, conrming the previous result.

Transforming nonstationary series


Cointegration: Regression of a unit root series on Another

Suppose that you subject two series,

contain a unit root.
integrated of order 1




to unit root tests, and you nd that they both

Furthermore, rst dierencing makes them both stationary i.e.

(I(1)) processes but their dierenced values are (I(0)).

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 ination 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 prot (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 dierence stationary (with the same
order of integration, for instance, I(1) process).

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





with a

R2 = 0.9932

(line 45)
Since both


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 dierencing eliminates
the unit roots in both




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,


(predict uhat, residuals) and carry out a

cointegration test based on this residual, we may nd out that


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, species that

there is no cointegration between
there is cointegration between






r3t ).

) and

Prof. Erdin

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


Hence, the test for cointegration is a test of a unit root

on the residual of the cointegration regression.

Note that in the smcl le on USinterest rates, several dierent unit root tests on


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:

It is possible to add a time variable,

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.

But you can not reject the null, i.e.

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.


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

a 3 month T-bill yields as follows:

r6 = + r3


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

the theory.


are coecients to be estimated.

Running this regression:


r6 r3

We expect


= 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
conrmed 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

and lagged error is

t1 =

Time Series Class Notes

r3t1 .

ECO310, Econometrics

Prof. Erdin

sradjt = u

(one can create this variable in Stata:

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
dierences which forms our error correction model.

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

Note that the coecient of the sradj variable,
expected be of




assumes particular signicance here and it is

Assume that

r6t1 > + r3t1

at some time



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



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,


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



4r6t < 0

sradjt > 0, then

. Therefore,2 should have a negative sign

for the short-run adjustment to take place towards a long-run equilibrium.

Let us estimate the above model by running the Stata comamnd: reg d.r6 d.r3 sradj. Check the
sign of the estimated

in this regression and conrm that it is negative. Its value indicates what

proportion of disequilibrium is corrected each time period, i.e. it should be less than 1!