0% found this document useful (0 votes)
41 views82 pages

Autocorrelation in Random Walks

The document discusses random walks and unit roots in time series analysis. It defines random walks as paths consisting of random steps and describes how they can be expressed as cumulative sums. Random walks play a key role in financial analysis, as prices following random walks would be unpredictable and outperforming the overall market would not be possible consistently.

Uploaded by

linconab93
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
41 views82 pages

Autocorrelation in Random Walks

The document discusses random walks and unit roots in time series analysis. It defines random walks as paths consisting of random steps and describes how they can be expressed as cumulative sums. Random walks play a key role in financial analysis, as prices following random walks would be unpredictable and outperforming the overall market would not be possible consistently.

Uploaded by

linconab93
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Random Walks and Unit Roots

Olusanya E. Olubusoye, Isaac Essi & OlaOluwa S. Yaya

2022-12-01

Olusanya E. Olubusoye, Isaac Essi & OlaOluwa S. Yaya


Random Walks and Unit Roots 2022-12-01 1 / 26
Bibliography

Dickey, D. A., and W. A. Fuller. 1979. “Distribution of the Estimators


for Autoregressive Time Series with a Unit Root.” Journal of the
American Statistical Association 74 (366). American Statistical
Association, Taylor & Francis, Ltd.:427–31.

Olusanya E. Olubusoye, Isaac Essi & OlaOluwa S. Yaya


Random Walks and Unit Roots 2022-12-01 2 / 26
Bibliography

Dickey, D. A., and W. A. Fuller. 1979. “Distribution of the Estimators


for Autoregressive Time Series with a Unit Root.” Journal of the
American Statistical Association 74 (366). American Statistical
Association, Taylor & Francis, Ltd.:427–31.
Granger, C. W. J., and P. Newbold. 1974. “Spurious Regressions in
Econometrics.” Journal of Econometrics 2 (2):111–20.

Olusanya E. Olubusoye, Isaac Essi & OlaOluwa S. Yaya


Random Walks and Unit Roots 2022-12-01 2 / 26
Bibliography

Dickey, D. A., and W. A. Fuller. 1979. “Distribution of the Estimators


for Autoregressive Time Series with a Unit Root.” Journal of the
American Statistical Association 74 (366). American Statistical
Association, Taylor & Francis, Ltd.:427–31.
Granger, C. W. J., and P. Newbold. 1974. “Spurious Regressions in
Econometrics.” Journal of Econometrics 2 (2):111–20.
Racine, J. S. 2019. Reproducible Econometrics using R. Oxford
University Press, New York.

Olusanya E. Olubusoye, Isaac Essi & OlaOluwa S. Yaya


Random Walks and Unit Roots 2022-12-01 2 / 26
Bibliography

Dickey, D. A., and W. A. Fuller. 1979. “Distribution of the Estimators


for Autoregressive Time Series with a Unit Root.” Journal of the
American Statistical Association 74 (366). American Statistical
Association, Taylor & Francis, Ltd.:427–31.
Granger, C. W. J., and P. Newbold. 1974. “Spurious Regressions in
Econometrics.” Journal of Econometrics 2 (2):111–20.
Racine, J. S. 2019. Reproducible Econometrics using R. Oxford
University Press, New York.
Said, S. E., and D. A. Dickey. 1984. “Testing for Unit Roots in
Autoregressive-Moving Average Models of Unknown Order.”
Biometrika 71 (3):599.

Olusanya E. Olubusoye, Isaac Essi & OlaOluwa S. Yaya


Random Walks and Unit Roots 2022-12-01 2 / 26
Bibliography

Dickey, D. A., and W. A. Fuller. 1979. “Distribution of the Estimators


for Autoregressive Time Series with a Unit Root.” Journal of the
American Statistical Association 74 (366). American Statistical
Association, Taylor & Francis, Ltd.:427–31.
Granger, C. W. J., and P. Newbold. 1974. “Spurious Regressions in
Econometrics.” Journal of Econometrics 2 (2):111–20.
Racine, J. S. 2019. Reproducible Econometrics using R. Oxford
University Press, New York.
Said, S. E., and D. A. Dickey. 1984. “Testing for Unit Roots in
Autoregressive-Moving Average Models of Unknown Order.”
Biometrika 71 (3):599.
Yaya, O. S. 2022. Compendium of Time Series Econometrics with
Applications. Ibadan University Press.

Olusanya E. Olubusoye, Isaac Essi & OlaOluwa S. Yaya


Random Walks and Unit Roots 2022-12-01 2 / 26
Introduction
A random walk describes a path consisting of a series of random steps

Olusanya E. Olubusoye, Isaac Essi & OlaOluwa S. Yaya


Random Walks and Unit Roots 2022-12-01 3 / 26
Introduction
A random walk describes a path consisting of a series of random steps
In sum, the walk of a mad man or a drunkard

Olusanya E. Olubusoye, Isaac Essi & OlaOluwa S. Yaya


Random Walks and Unit Roots 2022-12-01 3 / 26
Introduction
A random walk describes a path consisting of a series of random steps
In sum, the walk of a mad man or a drunkard
A variable that follows a simple random walk can be described by
yt = yt−1 + ϵt , t = 1, 2, . . . , T

Olusanya E. Olubusoye, Isaac Essi & OlaOluwa S. Yaya


Random Walks and Unit Roots 2022-12-01 3 / 26
Introduction
A random walk describes a path consisting of a series of random steps
In sum, the walk of a mad man or a drunkard
A variable that follows a simple random walk can be described by
yt = yt−1 + ϵt , t = 1, 2, . . . , T

where the current state (yt ) is predicted based on its immediate past
only (yt−1 ), and irregularities, ϵt ∼ (0, σϵ2 ) is i.i.d.

Olusanya E. Olubusoye, Isaac Essi & OlaOluwa S. Yaya


Random Walks and Unit Roots 2022-12-01 3 / 26
Introduction
A random walk describes a path consisting of a series of random steps
In sum, the walk of a mad man or a drunkard
A variable that follows a simple random walk can be described by
yt = yt−1 + ϵt , t = 1, 2, . . . , T

where the current state (yt ) is predicted based on its immediate past
only (yt−1 ), and irregularities, ϵt ∼ (0, σϵ2 ) is i.i.d.
We can express a random walk as a cumulative sum, i.e.,
yt = (yt−1 ) + ϵt = (yt−2 + ϵt−1 ) + ϵt
t
X t
X
= yt−j + ϵi = y0 + ϵi
i=t−j+1 i=1

Olusanya E. Olubusoye, Isaac Essi & OlaOluwa S. Yaya


Random Walks and Unit Roots 2022-12-01 3 / 26
Introduction
A random walk describes a path consisting of a series of random steps
In sum, the walk of a mad man or a drunkard
A variable that follows a simple random walk can be described by
yt = yt−1 + ϵt , t = 1, 2, . . . , T

where the current state (yt ) is predicted based on its immediate past
only (yt−1 ), and irregularities, ϵt ∼ (0, σϵ2 ) is i.i.d.
We can express a random walk as a cumulative sum, i.e.,
yt = (yt−1 ) + ϵt = (yt−2 + ϵt−1 ) + ϵt
t
X t
X
= yt−j + ϵi = y0 + ϵi
i=t−j+1 i=1

So, the journey is full of ‘noise’, (errors)/irregularities or drunkeness!


Olusanya E. Olubusoye, Isaac Essi & OlaOluwa S. Yaya
Random Walks and Unit Roots 2022-12-01 3 / 26
Importance

Random walks play a key role in the analysis of time series data

Olusanya E. Olubusoye, Isaac Essi & OlaOluwa S. Yaya


Random Walks and Unit Roots 2022-12-01 4 / 26
Importance

Random walks play a key role in the analysis of time series data
In Finance, for example, if price movements in securities follow random
walks then they are unpredictable, and investors cannot consistently
outperform the market as a whole

Olusanya E. Olubusoye, Isaac Essi & OlaOluwa S. Yaya


Random Walks and Unit Roots 2022-12-01 4 / 26
Importance

Random walks play a key role in the analysis of time series data
In Finance, for example, if price movements in securities follow random
walks then they are unpredictable, and investors cannot consistently
outperform the market as a whole
That is the case of Market efficiency in asset pricing (see [Link]
[Link]/search?qs=market%20efficiency%20%26%20yaya)

Olusanya E. Olubusoye, Isaac Essi & OlaOluwa S. Yaya


Random Walks and Unit Roots 2022-12-01 4 / 26
Importance

Random walks play a key role in the analysis of time series data
In Finance, for example, if price movements in securities follow random
walks then they are unpredictable, and investors cannot consistently
outperform the market as a whole
That is the case of Market efficiency in asset pricing (see [Link]
[Link]/search?qs=market%20efficiency%20%26%20yaya)
Being able to determine whether or not this is the case would
determine your investment strategy (if the random walk hypothesis is
true then your optimal strategy is to buy and hold an index fund)

Olusanya E. Olubusoye, Isaac Essi & OlaOluwa S. Yaya


Random Walks and Unit Roots 2022-12-01 4 / 26
Importance

Random walks play a key role in the analysis of time series data
In Finance, for example, if price movements in securities follow random
walks then they are unpredictable, and investors cannot consistently
outperform the market as a whole
That is the case of Market efficiency in asset pricing (see [Link]
[Link]/search?qs=market%20efficiency%20%26%20yaya)
Being able to determine whether or not this is the case would
determine your investment strategy (if the random walk hypothesis is
true then your optimal strategy is to buy and hold an index fund)
It is important for you to understand the properties of random walks,
how they can have insidious effects on classical inference, and how to
properly test for the presence of a random walk

Olusanya E. Olubusoye, Isaac Essi & OlaOluwa S. Yaya


Random Walks and Unit Roots 2022-12-01 4 / 26
Random Walks and their Sample ACFs
Random Walk Random Walk with Drift

30
8

25
6

20
4
Y

15
2

10
0

5
-2

0 20 40 60 80 100 0 20 40 60 80 100

Time Time

Random Walk Random Walk with Drift


1.0

1.0
0.8

0.8
0.6

0.6
ACF

ACF
0.4

0.4
0.2

0.2
0.0

0.0
-0.2

-0.2

0 5 10 15 20 0 5 10 15 20

Lag Lag

Olusanya E. Olubusoye, Isaac Essi & OlaOluwa S. Yaya


Random Walks and Unit Roots 2022-12-01 5 / 26
Unconditional Mean for a Random Walk
Taking expected values of a random walk process, we obtain
E [yt ] = E [yt−s ] = y0 , so the unconditional mean of a random walk is
constant since the expected value of sum of those residuals
(irregularities), ti=1 ϵi is 0, and one is left with constant y0
P

Olusanya E. Olubusoye, Isaac Essi & OlaOluwa S. Yaya


Random Walks and Unit Roots 2022-12-01 6 / 26
Unconditional Mean for a Random Walk
Taking expected values of a random walk process, we obtain
E [yt ] = E [yt−s ] = y0 , so the unconditional mean of a random walk is
constant since the expected value of sum of those residuals
(irregularities), ti=1 ϵi is 0, and one is left with constant y0
P

Given the first t realizations of the {ϵt } process, the conditional mean
of yt+1 is
E [yt+1 |y1 , . . . , yt ] = E [yt + ϵt+1 |y1 , . . . , yt ]
= yt

Olusanya E. Olubusoye, Isaac Essi & OlaOluwa S. Yaya


Random Walks and Unit Roots 2022-12-01 6 / 26
Unconditional Mean for a Random Walk
Taking expected values of a random walk process, we obtain
E [yt ] = E [yt−s ] = y0 , so the unconditional mean of a random walk is
constant since the expected value of sum of those residuals
(irregularities), ti=1 ϵi is 0, and one is left with constant y0
P

Given the first t realizations of the {ϵt } process, the conditional mean
of yt+1 is
E [yt+1 |y1 , . . . , yt ] = E [yt + ϵt+1 |y1 , . . . , yt ]
= yt

Therefore
" s #
X
E [yt+s |y1 , . . . , yt ] = yt + E ϵt+i |y1 , . . . , yt
i=1
= yt for all s > 0

Olusanya E. Olubusoye, Isaac Essi & OlaOluwa S. Yaya


Random Walks and Unit Roots 2022-12-01 6 / 26
Unconditional Variance for a Random Walk
Note that the unconditional variance of yt is time dependent, and is
Var [yt ] = E [(yt − E [yt ])2 ]
 !2 
t
!
X
=E y0 + ϵi − y0 
i=1
" t
!#2
X
=E ϵi
i=1
t
X  
= E ϵ2i
i=1
= tσϵ2

Olusanya E. Olubusoye, Isaac Essi & OlaOluwa S. Yaya


Random Walks and Unit Roots 2022-12-01 7 / 26
Unconditional Variance for a Random Walk
Note that the unconditional variance of yt is time dependent, and is
Var [yt ] = E [(yt − E [yt ])2 ]
 !2 
t
!
X
=E y0 + ϵi − y0 
i=1
" t
!#2
X
=E ϵi
i=1
t
X  
= E ϵ2i
i=1
= tσϵ2

Thus, it follows to write the unconditional variance of yt−s as


Var [yt−s ] = (t − s)σϵ2

Olusanya E. Olubusoye, Isaac Essi & OlaOluwa S. Yaya


Random Walks and Unit Roots 2022-12-01 7 / 26
Unconditional Covariance for a Random Walk

Note that the unconditional covariance is also time dependent, and is

Cov [yt , yt−s ] = E [(yt − E [yt ])(yt−s − E [yt−s ])]


t t−s
" ! !#
X X
=E y0 + ϵi − y0 y0 + ϵi − y0
i=1 i=1
t
" ! t−s !#
X X
=E ϵi ϵi
i=1 i=1
= (t − s)σϵ2

Olusanya E. Olubusoye, Isaac Essi & OlaOluwa S. Yaya


Random Walks and Unit Roots 2022-12-01 8 / 26
Unconditional Covariance for a Random Walk

Note that the unconditional covariance is also time dependent, and is

Cov [yt , yt−s ] = E [(yt − E [yt ])(yt−s − E [yt−s ])]


t t−s
" ! !#
X X
=E y0 + ϵi − y0 y0 + ϵi − y0
i=1 i=1
t
" ! t−s !#
X X
=E ϵi ϵi
i=1 i=1
= (t − s)σϵ2

Since the unconditional variance and covariances of a random walk


change over time (and are explosive), the series cannot be stationary

Olusanya E. Olubusoye, Isaac Essi & OlaOluwa S. Yaya


Random Walks and Unit Roots 2022-12-01 8 / 26
The Autocorrelation Function for A Random Walk

From the above, the autocorrelation function for a finite sample of


data generated by a random walk is given by

Cov [yt , yt−s ]


ρs = p p
Var [yt ] Var [yt−s ]
(t − s)σϵ2
=q q
tσϵ2 (t − s)σϵ2
q
= (t − s)/t

Olusanya E. Olubusoye, Isaac Essi & OlaOluwa S. Yaya


Random Walks and Unit Roots 2022-12-01 9 / 26
The Autocorrelation Function for A Random Walk

From the above, the autocorrelation function for a finite sample of


data generated by a random walk is given by

Cov [yt , yt−s ]


ρs = p p
Var [yt ] Var [yt−s ]
(t − s)σϵ2
=q q
tσϵ2 (t − s)σϵ2
q
= (t − s)/t

In finite samples, ρs < 1 for every s being a positive integer

Olusanya E. Olubusoye, Isaac Essi & OlaOluwa S. Yaya


Random Walks and Unit Roots 2022-12-01 9 / 26
Classical Least Squares Estimators and Random
Walks

Consider the OLS estimator of β1 for the model yt = β0 + β1 yt−1 + ut


given by
PT
(yt − ȳt )(yt−1 − ȳt−1 )
β̂1 = t=2 PT 2
t=2 (yt−1 − ȳt−1 )

Olusanya E. Olubusoye, Isaac Essi & OlaOluwa S. Yaya


Random Walks and Unit Roots 2022-12-01 10 / 26
Classical Least Squares Estimators and Random
Walks

Consider the OLS estimator of β1 for the model yt = β0 + β1 yt−1 + ut


given by
PT
(yt − ȳt )(yt−1 − ȳt−1 )
β̂1 = t=2 PT 2
t=2 (yt−1 − ȳt−1 )

Note that ρ̂1 and β̂1 are related since


PT
t=2 (yt − ȳ )(yt−1 − ȳ )
ρ̂1 = PT 2
t=1 (yt − ȳ )
≈ β̂1

Olusanya E. Olubusoye, Isaac Essi & OlaOluwa S. Yaya


Random Walks and Unit Roots 2022-12-01 10 / 26
You can appreciate from this result that the OLS estimator β̂1 , which
is approximately equal to ρ̂1 , is consistent

Olusanya E. Olubusoye, Isaac Essi & OlaOluwa S. Yaya


Random Walks and Unit Roots 2022-12-01 11 / 26
You can appreciate from this result that the OLS estimator β̂1 , which
is approximately equal to ρ̂1 , is consistent
However you can also appreciate that it is biased downwards in finite
samples for a time series that follows a random walk, which is not the
case when dealing with cross-section data (in cross-section data it is
both unbiased and consistent)

Olusanya E. Olubusoye, Isaac Essi & OlaOluwa S. Yaya


Random Walks and Unit Roots 2022-12-01 11 / 26
You can appreciate from this result that the OLS estimator β̂1 , which
is approximately equal to ρ̂1 , is consistent
However you can also appreciate that it is biased downwards in finite
samples for a time series that follows a random walk, which is not the
case when dealing with cross-section data (in cross-section data it is
both unbiased and consistent)
So, if yt follows a random walk (β1 ≡ 1), since the OLS estimate of β1
is directly related to the value of ρ1 , then the estimated value β̂1 is
biased downwards, i.e., below unity

Olusanya E. Olubusoye, Isaac Essi & OlaOluwa S. Yaya


Random Walks and Unit Roots 2022-12-01 11 / 26
Classical Least Squares Inference and Random Walks

What are the implications of this downward bias in β̂1 for hypothesis
testing?

Olusanya E. Olubusoye, Isaac Essi & OlaOluwa S. Yaya


Random Walks and Unit Roots 2022-12-01 12 / 26
Classical Least Squares Inference and Random Walks

What are the implications of this downward bias in β̂1 for hypothesis
testing?
Well, consider using OLS to test the hypothesis H0 : β1 = 1, i.e., to
test for a random walk

Olusanya E. Olubusoye, Isaac Essi & OlaOluwa S. Yaya


Random Walks and Unit Roots 2022-12-01 12 / 26
Classical Least Squares Inference and Random Walks

What are the implications of this downward bias in β̂1 for hypothesis
testing?
Well, consider using OLS to test the hypothesis H0 : β1 = 1, i.e., to
test for a random walk
If the null hypothesis is true, then the t-statistic, given by

β̂1 − 1
t=
SE (β̂1 )

does not have expectation zero

Olusanya E. Olubusoye, Isaac Essi & OlaOluwa S. Yaya


Random Walks and Unit Roots 2022-12-01 12 / 26
Classical Least Squares Inference and Random Walks

What are the implications of this downward bias in β̂1 for hypothesis
testing?
Well, consider using OLS to test the hypothesis H0 : β1 = 1, i.e., to
test for a random walk
If the null hypothesis is true, then the t-statistic, given by

β̂1 − 1
t=
SE (β̂1 )

does not have expectation zero


Hence, the distribution of this statistic, if the null is true, lies to the
left of the assumed t distribution

Olusanya E. Olubusoye, Isaac Essi & OlaOluwa S. Yaya


Random Walks and Unit Roots 2022-12-01 12 / 26
Classical Least Squares Inference and Random Walks

What are the implications of this downward bias in β̂1 for hypothesis
testing?
Well, consider using OLS to test the hypothesis H0 : β1 = 1, i.e., to
test for a random walk
If the null hypothesis is true, then the t-statistic, given by

β̂1 − 1
t=
SE (β̂1 )

does not have expectation zero


Hence, the distribution of this statistic, if the null is true, lies to the
left of the assumed t distribution
In the time domain, classical inference is useless

Olusanya E. Olubusoye, Isaac Essi & OlaOluwa S. Yaya


Random Walks and Unit Roots 2022-12-01 12 / 26
Unit Root Tests
A unit root is a feature of a random process that can have insidious
effects when attempting to conduct statistical inference

Olusanya E. Olubusoye, Isaac Essi & OlaOluwa S. Yaya


Random Walks and Unit Roots 2022-12-01 13 / 26
Unit Root Tests
A unit root is a feature of a random process that can have insidious
effects when attempting to conduct statistical inference
If economic variables follow random walks (i.e., contain a unit root),
this can have serious implications, both theoretically, and economically

Olusanya E. Olubusoye, Isaac Essi & OlaOluwa S. Yaya


Random Walks and Unit Roots 2022-12-01 13 / 26
Unit Root Tests
A unit root is a feature of a random process that can have insidious
effects when attempting to conduct statistical inference
If economic variables follow random walks (i.e., contain a unit root),
this can have serious implications, both theoretically, and economically
Spurious regression must be admitted

Olusanya E. Olubusoye, Isaac Essi & OlaOluwa S. Yaya


Random Walks and Unit Roots 2022-12-01 13 / 26
Unit Root Tests
A unit root is a feature of a random process that can have insidious
effects when attempting to conduct statistical inference
If economic variables follow random walks (i.e., contain a unit root),
this can have serious implications, both theoretically, and economically
Spurious regression must be admitted
Shocks in the distant past never stop influencing the future

Olusanya E. Olubusoye, Isaac Essi & OlaOluwa S. Yaya


Random Walks and Unit Roots 2022-12-01 13 / 26
Unit Root Tests
A unit root is a feature of a random process that can have insidious
effects when attempting to conduct statistical inference
If economic variables follow random walks (i.e., contain a unit root),
this can have serious implications, both theoretically, and economically
Spurious regression must be admitted
Shocks in the distant past never stop influencing the future

Consider a model given by


yt = βyt−1 + ϵt

Olusanya E. Olubusoye, Isaac Essi & OlaOluwa S. Yaya


Random Walks and Unit Roots 2022-12-01 13 / 26
Unit Root Tests
A unit root is a feature of a random process that can have insidious
effects when attempting to conduct statistical inference
If economic variables follow random walks (i.e., contain a unit root),
this can have serious implications, both theoretically, and economically
Spurious regression must be admitted
Shocks in the distant past never stop influencing the future

Consider a model given by


yt = βyt−1 + ϵt

If we wanted to test for a random walk, this cannot be done with a


standard t statistic using linear regression as, under the null, the
estimate β̂ is biased towards zero as we saw above, hence we would
expect to incorrectly reject the unit root hypothesis in the presence of
a unit root based on this approach
Olusanya E. Olubusoye, Isaac Essi & OlaOluwa S. Yaya
Random Walks and Unit Roots 2022-12-01 13 / 26
Dickey-Fuller (DF) Unit Root Test

@DICKEY_FULLER:1979 consider the simple AR(1) model

yt = βyt−1 + ϵt
yt − yt−1 = βyt−1 + ϵt − yt−1
∆yt = βyt−1 + ϵt − yt−1
= (β − 1)yt−1 + ϵt
= γyt−1 + ϵt

Olusanya E. Olubusoye, Isaac Essi & OlaOluwa S. Yaya


Random Walks and Unit Roots 2022-12-01 14 / 26
Dickey-Fuller (DF) Unit Root Test

@DICKEY_FULLER:1979 consider the simple AR(1) model

yt = βyt−1 + ϵt
yt − yt−1 = βyt−1 + ϵt − yt−1
∆yt = βyt−1 + ϵt − yt−1
= (β − 1)yt−1 + ϵt
= γyt−1 + ϵt

Note that under the null the dependent variable is stationary

Olusanya E. Olubusoye, Isaac Essi & OlaOluwa S. Yaya


Random Walks and Unit Roots 2022-12-01 14 / 26
Dickey-Fuller (DF) Unit Root Test

@DICKEY_FULLER:1979 consider the simple AR(1) model

yt = βyt−1 + ϵt
yt − yt−1 = βyt−1 + ϵt − yt−1
∆yt = βyt−1 + ϵt − yt−1
= (β − 1)yt−1 + ϵt
= γyt−1 + ϵt

Note that under the null the dependent variable is stationary


@DICKEY_FULLER:1979 demonstrated how we can test the
hypothesis H0 : β = 1 (eqv. to testing H0 : γ = 0)

Olusanya E. Olubusoye, Isaac Essi & OlaOluwa S. Yaya


Random Walks and Unit Roots 2022-12-01 14 / 26
Dickey and Fuller consider three different regression equations which
can be used to test for the presence of a unit root

∆yt = γ1 yt−1 + ϵt ,
∆yt = γ0 + γ1 yt−1 + ϵt ,
∆yt = γ0 + γ1 yt−1 + γ2 t + ϵt

Olusanya E. Olubusoye, Isaac Essi & OlaOluwa S. Yaya


Random Walks and Unit Roots 2022-12-01 15 / 26
Dickey and Fuller consider three different regression equations which
can be used to test for the presence of a unit root

∆yt = γ1 yt−1 + ϵt ,
∆yt = γ0 + γ1 yt−1 + ϵt ,
∆yt = γ0 + γ1 yt−1 + γ2 t + ϵt

The first equation is a standard random walk

Olusanya E. Olubusoye, Isaac Essi & OlaOluwa S. Yaya


Random Walks and Unit Roots 2022-12-01 15 / 26
Dickey and Fuller consider three different regression equations which
can be used to test for the presence of a unit root

∆yt = γ1 yt−1 + ϵt ,
∆yt = γ0 + γ1 yt−1 + ϵt ,
∆yt = γ0 + γ1 yt−1 + γ2 t + ϵt

The first equation is a standard random walk


The second a random walk with drift

Olusanya E. Olubusoye, Isaac Essi & OlaOluwa S. Yaya


Random Walks and Unit Roots 2022-12-01 15 / 26
Dickey and Fuller consider three different regression equations which
can be used to test for the presence of a unit root

∆yt = γ1 yt−1 + ϵt ,
∆yt = γ0 + γ1 yt−1 + ϵt ,
∆yt = γ0 + γ1 yt−1 + γ2 t + ϵt

The first equation is a standard random walk


The second a random walk with drift
The third a random walk with drift and a time trend

Olusanya E. Olubusoye, Isaac Essi & OlaOluwa S. Yaya


Random Walks and Unit Roots 2022-12-01 15 / 26
@DICKEY_FULLER:1979 computed the critical values for the t
statistic τ = γ̂1 /SE (γ̂1 ) under the null of a random walk

Olusanya E. Olubusoye, Isaac Essi & OlaOluwa S. Yaya


Random Walks and Unit Roots 2022-12-01 16 / 26
@DICKEY_FULLER:1979 computed the critical values for the t
statistic τ = γ̂1 /SE (γ̂1 ) under the null of a random walk
This test is known as the Dickey-Fuller (DF) unit root test

Olusanya E. Olubusoye, Isaac Essi & OlaOluwa S. Yaya


Random Walks and Unit Roots 2022-12-01 16 / 26
@DICKEY_FULLER:1979 computed the critical values for the t
statistic τ = γ̂1 /SE (γ̂1 ) under the null of a random walk
This test is known as the Dickey-Fuller (DF) unit root test
This statistic τ no longer has a symmetric distribution (it is not
Student-t), so you must check both the upper and lower critical values
for this test

Olusanya E. Olubusoye, Isaac Essi & OlaOluwa S. Yaya


Random Walks and Unit Roots 2022-12-01 16 / 26
@DICKEY_FULLER:1979 computed the critical values for the t
statistic τ = γ̂1 /SE (γ̂1 ) under the null of a random walk
This test is known as the Dickey-Fuller (DF) unit root test
This statistic τ no longer has a symmetric distribution (it is not
Student-t), so you must check both the upper and lower critical values
for this test
Letting τl and τu denote the lower and upper values of the Dickey
Fuller test statistic τ , to test H0 : γ = 0 (i.e., β = 1) we would proceed
as follows:

Olusanya E. Olubusoye, Isaac Essi & OlaOluwa S. Yaya


Random Walks and Unit Roots 2022-12-01 16 / 26
@DICKEY_FULLER:1979 computed the critical values for the t
statistic τ = γ̂1 /SE (γ̂1 ) under the null of a random walk
This test is known as the Dickey-Fuller (DF) unit root test
This statistic τ no longer has a symmetric distribution (it is not
Student-t), so you must check both the upper and lower critical values
for this test
Letting τl and τu denote the lower and upper values of the Dickey
Fuller test statistic τ , to test H0 : γ = 0 (i.e., β = 1) we would proceed
as follows:
If τ < τl then we reject the null of a unit root (random walk) and
conclude that the variable is stationary

Olusanya E. Olubusoye, Isaac Essi & OlaOluwa S. Yaya


Random Walks and Unit Roots 2022-12-01 16 / 26
@DICKEY_FULLER:1979 computed the critical values for the t
statistic τ = γ̂1 /SE (γ̂1 ) under the null of a random walk
This test is known as the Dickey-Fuller (DF) unit root test
This statistic τ no longer has a symmetric distribution (it is not
Student-t), so you must check both the upper and lower critical values
for this test
Letting τl and τu denote the lower and upper values of the Dickey
Fuller test statistic τ , to test H0 : γ = 0 (i.e., β = 1) we would proceed
as follows:
If τ < τl then we reject the null of a unit root (random walk) and
conclude that the variable is stationary
If τ > τu then we reject the null of a unit root (random walk) and
conclude that the variable is non-stationary and explosive

Olusanya E. Olubusoye, Isaac Essi & OlaOluwa S. Yaya


Random Walks and Unit Roots 2022-12-01 16 / 26
@DICKEY_FULLER:1979 computed the critical values for the t
statistic τ = γ̂1 /SE (γ̂1 ) under the null of a random walk
This test is known as the Dickey-Fuller (DF) unit root test
This statistic τ no longer has a symmetric distribution (it is not
Student-t), so you must check both the upper and lower critical values
for this test
Letting τl and τu denote the lower and upper values of the Dickey
Fuller test statistic τ , to test H0 : γ = 0 (i.e., β = 1) we would proceed
as follows:
If τ < τl then we reject the null of a unit root (random walk) and
conclude that the variable is stationary
If τ > τu then we reject the null of a unit root (random walk) and
conclude that the variable is non-stationary and explosive
Otherwise, we fail to reject the null of a unit root

Olusanya E. Olubusoye, Isaac Essi & OlaOluwa S. Yaya


Random Walks and Unit Roots 2022-12-01 16 / 26
Critical Values for the DF Test
If you wanted to get a table of their critical values in R, you can install
the R package fUnitRoots and check out the function adfTable()
Table 1: Critical Values for the Dickey Fuller Test H0 : γ1 = 0 (default, for a
regression with no intercept (constant) nor time trend). Rows present critical
values for different sample sizes, columns present quantiles.

0.010 0.025 0.050 0.100 0.900 0.950 0.975 0.990


25 -2.66 -2.26 -1.95 -1.60 0.92 1.33 1.70 2.16
50 -2.62 -2.25 -1.95 -1.61 0.91 1.31 1.66 2.08
100 -2.60 -2.24 -1.95 -1.61 0.90 1.29 1.64 2.03
250 -2.58 -2.23 -1.95 -1.62 0.89 1.29 1.63 2.01
500 -2.58 -2.23 -1.95 -1.62 0.89 1.28 1.62 2.00
Inf -2.58 -2.23 -1.95 -1.62 0.89 1.28 1.62 2.00

Olusanya E. Olubusoye, Isaac Essi & OlaOluwa S. Yaya


Random Walks and Unit Roots 2022-12-01 17 / 26
Augmented Dickey-Fuller (ADF) Unit Root Test
There is also a widely-used test known as the Augmented Dickey-Fuller
unit root test (ADF)

Olusanya E. Olubusoye, Isaac Essi & OlaOluwa S. Yaya


Random Walks and Unit Roots 2022-12-01 18 / 26
Augmented Dickey-Fuller (ADF) Unit Root Test
There is also a widely-used test known as the Augmented Dickey-Fuller
unit root test (ADF)
This test is based on models of the form
p−1
X
∆yt = γ0 + γ1 yt−1 + γ2 t + ϕj ∆yt−j + ϵt
j=1

Olusanya E. Olubusoye, Isaac Essi & OlaOluwa S. Yaya


Random Walks and Unit Roots 2022-12-01 18 / 26
Augmented Dickey-Fuller (ADF) Unit Root Test
There is also a widely-used test known as the Augmented Dickey-Fuller
unit root test (ADF)
This test is based on models of the form
p−1
X
∆yt = γ0 + γ1 yt−1 + γ2 t + ϕj ∆yt−j + ϵt
j=1

The advantage of this model is that it can accommodate higher-order


autoregressive moving-average processes in ϵt which we examine later

Olusanya E. Olubusoye, Isaac Essi & OlaOluwa S. Yaya


Random Walks and Unit Roots 2022-12-01 18 / 26
Augmented Dickey-Fuller (ADF) Unit Root Test
There is also a widely-used test known as the Augmented Dickey-Fuller
unit root test (ADF)
This test is based on models of the form
p−1
X
∆yt = γ0 + γ1 yt−1 + γ2 t + ϕj ∆yt−j + ϵt
j=1

The advantage of this model is that it can accommodate higher-order


autoregressive moving-average processes in ϵt which we examine later
The critical values from the Dickey-Fuller model with a drift and time
trend remain unchanged when the model is augmented with lagged
values of ∆yt

Olusanya E. Olubusoye, Isaac Essi & OlaOluwa S. Yaya


Random Walks and Unit Roots 2022-12-01 18 / 26
Augmented Dickey-Fuller (ADF) Unit Root Test
There is also a widely-used test known as the Augmented Dickey-Fuller
unit root test (ADF)
This test is based on models of the form
p−1
X
∆yt = γ0 + γ1 yt−1 + γ2 t + ϕj ∆yt−j + ϵt
j=1

The advantage of this model is that it can accommodate higher-order


autoregressive moving-average processes in ϵt which we examine later
The critical values from the Dickey-Fuller model with a drift and time
trend remain unchanged when the model is augmented with lagged
values of ∆yt
See [Link] which addresses issues
arising when testing for unit roots in autoregressive-moving average
models of unknown order
Olusanya E. Olubusoye, Isaac Essi & OlaOluwa S. Yaya
Random Walks and Unit Roots 2022-12-01 18 / 26
In such models, we consider a test of the hypothesis γ1 = 0 and γ2 = 0
for the unit root and linear trend, t, respectively

Olusanya E. Olubusoye, Isaac Essi & OlaOluwa S. Yaya


Random Walks and Unit Roots 2022-12-01 19 / 26
In such models, we consider a test of the hypothesis γ1 = 0 and γ2 = 0
for the unit root and linear trend, t, respectively
We proceed by forming an F -ratio in the standard manner

Olusanya E. Olubusoye, Isaac Essi & OlaOluwa S. Yaya


Random Walks and Unit Roots 2022-12-01 19 / 26
In such models, we consider a test of the hypothesis γ1 = 0 and γ2 = 0
for the unit root and linear trend, t, respectively
We proceed by forming an F -ratio in the standard manner
However, the F -ratio no longer has the standard F distribution under
the null

Olusanya E. Olubusoye, Isaac Essi & OlaOluwa S. Yaya


Random Walks and Unit Roots 2022-12-01 19 / 26
In such models, we consider a test of the hypothesis γ1 = 0 and γ2 = 0
for the unit root and linear trend, t, respectively
We proceed by forming an F -ratio in the standard manner
However, the F -ratio no longer has the standard F distribution under
the null
Again, we use a method proposed by Dickey and Fuller, the ADF test

Olusanya E. Olubusoye, Isaac Essi & OlaOluwa S. Yaya


Random Walks and Unit Roots 2022-12-01 19 / 26
In such models, we consider a test of the hypothesis γ1 = 0 and γ2 = 0
for the unit root and linear trend, t, respectively
We proceed by forming an F -ratio in the standard manner
However, the F -ratio no longer has the standard F distribution under
the null
Again, we use a method proposed by Dickey and Fuller, the ADF test
They computed the appropriate critical values for the F -statistic under
the null of a unit root

Olusanya E. Olubusoye, Isaac Essi & OlaOluwa S. Yaya


Random Walks and Unit Roots 2022-12-01 19 / 26
In such models, we consider a test of the hypothesis γ1 = 0 and γ2 = 0
for the unit root and linear trend, t, respectively
We proceed by forming an F -ratio in the standard manner
However, the F -ratio no longer has the standard F distribution under
the null
Again, we use a method proposed by Dickey and Fuller, the ADF test
They computed the appropriate critical values for the F -statistic under
the null of a unit root
You could also use the R function [Link]() which is in the
tseries package which automatically computes the P-value using the
appropriate critical values

Olusanya E. Olubusoye, Isaac Essi & OlaOluwa S. Yaya


Random Walks and Unit Roots 2022-12-01 19 / 26
Testing for a Unit Root in simulated time series

The [Link]() function requires the R package tseries


##
## Augmented Dickey-Fuller Test
##
## data: e
## Dickey-Fuller = -2.5712, Lag order = 5, p-value = 0.3369
## alternative hypothesis: stationary

Olusanya E. Olubusoye, Isaac Essi & OlaOluwa S. Yaya


Random Walks and Unit Roots 2022-12-01 20 / 26
Random Walks and Spurious Regression
@GRANGER_NEWBOLD:1974 point out that it is quite common to
encounter applied time series analysis with an apparently high degree
of fit as measured by, say, R 2

Olusanya E. Olubusoye, Isaac Essi & OlaOluwa S. Yaya


Random Walks and Unit Roots 2022-12-01 21 / 26
Random Walks and Spurious Regression
@GRANGER_NEWBOLD:1974 point out that it is quite common to
encounter applied time series analysis with an apparently high degree
of fit as measured by, say, R 2
They pointed out how two random walk time series which are
statistically independent may nonetheless show a significant correlation,
and this phenomenon is called spurious correlation

Olusanya E. Olubusoye, Isaac Essi & OlaOluwa S. Yaya


Random Walks and Unit Roots 2022-12-01 21 / 26
Random Walks and Spurious Regression
@GRANGER_NEWBOLD:1974 point out that it is quite common to
encounter applied time series analysis with an apparently high degree
of fit as measured by, say, R 2
They pointed out how two random walk time series which are
statistically independent may nonetheless show a significant correlation,
and this phenomenon is called spurious correlation
In their paper, @GRANGER_NEWBOLD:1974 examine the potential
for “discovering” spurious (nonexistent) relationships in time series
settings

Olusanya E. Olubusoye, Isaac Essi & OlaOluwa S. Yaya


Random Walks and Unit Roots 2022-12-01 21 / 26
Random Walks and Spurious Regression
@GRANGER_NEWBOLD:1974 point out that it is quite common to
encounter applied time series analysis with an apparently high degree
of fit as measured by, say, R 2
They pointed out how two random walk time series which are
statistically independent may nonetheless show a significant correlation,
and this phenomenon is called spurious correlation
In their paper, @GRANGER_NEWBOLD:1974 examine the potential
for “discovering” spurious (nonexistent) relationships in time series
settings
They indicate exactly how “nonsense regression” relating two or more
time series can arise

Olusanya E. Olubusoye, Isaac Essi & OlaOluwa S. Yaya


Random Walks and Unit Roots 2022-12-01 21 / 26
Random Walks and Spurious Regression
@GRANGER_NEWBOLD:1974 point out that it is quite common to
encounter applied time series analysis with an apparently high degree
of fit as measured by, say, R 2
They pointed out how two random walk time series which are
statistically independent may nonetheless show a significant correlation,
and this phenomenon is called spurious correlation
In their paper, @GRANGER_NEWBOLD:1974 examine the potential
for “discovering” spurious (nonexistent) relationships in time series
settings
They indicate exactly how “nonsense regression” relating two or more
time series can arise
This phenomenon is not restricted to random walks and can occur in
many time series settings, particularly when the errors are
autocorrelated
Olusanya E. Olubusoye, Isaac Essi & OlaOluwa S. Yaya
Random Walks and Unit Roots 2022-12-01 21 / 26
Random Walks and Spurious Regression

Below we consider two code chunks, one for cross-section i.i.d. data,
and one for time series data that contains a unit root.

Olusanya E. Olubusoye, Isaac Essi & OlaOluwa S. Yaya


Random Walks and Unit Roots 2022-12-01 22 / 26
Random Walks and Spurious Regression

Below we consider two code chunks, one for cross-section i.i.d. data,
and one for time series data that contains a unit root.
In both cases X is unrelated to Y, yet when X and Y are time series
that contain a unit root, they appear to be significantly related.

Olusanya E. Olubusoye, Isaac Essi & OlaOluwa S. Yaya


Random Walks and Unit Roots 2022-12-01 22 / 26
Random Walks and Spurious Regression

Below we consider two code chunks, one for cross-section i.i.d. data,
and one for time series data that contains a unit root.
In both cases X is unrelated to Y, yet when X and Y are time series
that contain a unit root, they appear to be significantly related.
This illustrates the pitfalls of ignoring the time dimension of your data
and why the study of time series methods is of fundamental
importance for applied economists.

Olusanya E. Olubusoye, Isaac Essi & OlaOluwa S. Yaya


Random Walks and Unit Roots 2022-12-01 22 / 26
Random Walks and Spurious Regression
##
## Call:
## lm(formula = y ~ x)
##
## Residuals:
## Min 1Q Median 3Q Max
## -2.6994 -0.6110 0.1832 0.6013 1.5516
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.09385 0.12840 0.731 0.4684
## x -0.19202 0.11259 -1.706 0.0946 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 '
##
## Residual standard error: 0.9075 on 48 degrees of freedom
## [Link]
Olusanya Olubusoye, IsaacR-squared: 0.05714,
Essi & OlaOluwa S. Yaya
Random Adjusted R-squared:
Walks and Unit Roots 2022-12-01 0.037
23 / 26
Random Walks and Spurious Regression

Note that for the above code chunk, there is no relationship between X
and Y which are both i.i.d. random variables, and the standard
procedures for statistical inference appears to reflect this fact and to be
sound.

Olusanya E. Olubusoye, Isaac Essi & OlaOluwa S. Yaya


Random Walks and Unit Roots 2022-12-01 24 / 26
Random Walks and Spurious Regression

In the next code chunk there is again no relationship between X and Y


but they are both random walks; yet the standard inferential
procedures fail and indicate the presence of a strong relationship when
in fact there is none.

Olusanya E. Olubusoye, Isaac Essi & OlaOluwa S. Yaya


Random Walks and Unit Roots 2022-12-01 25 / 26
Random Walks and Spurious Regression
##
## Call:
## lm(formula = dyn(y ~ x))
##
## Residuals:
## Min 1Q Median 3Q Max
## -5.0402 -0.8390 0.3903 1.1701 3.1612
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 4.93945 0.31171 15.846 < 2e-16 ***
## x -0.44794 0.07835 -5.717 6.76e-07 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 '
##
## Residual standard error: 1.754 on 48 degrees of freedom
## [Link]
Olusanya Olubusoye, IsaacR-squared: 0.4051,
Essi & OlaOluwa S. Yaya
Random Adjusted
Walks and Unit Roots R-squared:
2022-12-01 0.3927
26 / 26

You might also like