CH 5 Time Series
CH 5 Time Series
01/01/2025 2
• Univariate time-series analysis- analysis of single
sequence of data describing the behavior of one variable
in terms of its own past values.
• Example: Autoregressive models:
ut = ρut−1 + εt first order autoregressive or
yt= ρ1 yt−1+ ρ2yt−2+εt second order autoregressive
01/01/2025 3
• Analysis of several sets of data(variables) for the same
sequence of time periods is called multivariate time-series
analysis.
• Examples, analysis of the relationships among price level,
money supply and GDP on the basis of say quarterly or annual
collected data).
01/01/2025 4
Stationarity and non Stationarity test
• Broadly speaking, a stochastic process is said to be stationary
if its mean and variance are constant over time.
• In short, if a time series is stationary, its mean and variance
remain the same no matter at what point we measure them;
that is, they are time invariant.
• Such a time series will tend to return to its mean (called mean
reversion) and fluctuations around this mean.
5
Cont’d
Most economic time series in level form are nonstationary.
Such series often exhibit an upward or downward trends over a
sustained period of time.
But such a trend is often stochastic and not deterministic.
Regressing a nonstationary time series on one or more
nonstationary time series may often lead to the phenomenon of
spurious or meaningless regression.
01/01/2025 6
Non-stationary Stochastic Processes
• In practical research one often encounters non-stationary time
series. The classic example is the Random Walk Model (RWM).
• According to RWM, it is often said that stock prices follow a
random walk; that is, they are non-stationary.
• We distinguish two types of random walks:
random walk model without drift (with no intercept term) Yt = Yt−1 + ut
random walk model with drift (constant term is present).
Yt Yt 1 ut
01/01/2025 7
Unit Root Stochastic Process
• The random walk model is an example of what is known in the
literature as a unit root process. Let us write the RWM as:
01/01/2025 8
• If ρ is in fact equal to 1, we face what is known as the unit
root problem, that is, a situation of non-stationarity
because in this case the variance of Yt is not stationary.
• The name unit root is due to the fact that ρ=1. Thus, the
terms non-stationarity, random walk, and unit root can be
treated as synonymous.
01/01/2025 9
• If, however, |ρ| < 1, that is if the absolute value of ρ is less
than one, then the time series Yt is stationary in the sense we
have defined it.
• In practical research, it is important to find out whether a time
series possesses has unit root (or if it is non-stationery).
• Note that the term unit root process is similar to non-
stationery process.
01/01/2025 10
Difference Stationary (DS) and Trend Stationary (TS) stochastic
processes
• To make the distinction between these two concepts more
formal and clear, consider the following model of the time
series Yt .
01/01/2025 11
Now we may have the following possibilities:
• Pure random walk: If in the model given above β1 = 0, β2 = 0, β3 = 1,
we get;
which is RWM without drift and is therefore we have seen that it is non-
stationary. But if we write this as:
this means Yt will exhibit a positive trend (β1 > 0) or negative trend(β1 <
0) and such a trend is called a stochastic trend.
01/01/2025 13
• Therefore, the equation:
01/01/2025 14
Trend stationary process
• If in the initial model, β1 ≠ 0, β2 ≠ 0, β3 = 0, we obtain;
01/01/2025 16
• In general, if a (nonstationary) time series has to be differenced d
times to make it stationary, that time series is said to be integrated
of order d and is denoted as I(d). Example Yt ∼ I(d).
• If a time series Yt is stationary to begin with or it is stationary at
levels (i.e., it does not require any differencing), it is said to be
integrated of order zero.
• Most economic time series data are generally I(1); that is, they
generally become stationary only after taking their first
differences.
01/01/2025 17
Properties of Integrated Series
1. A linear combination or sum of stationary and
nonstationary time series is non-stationary.
2. A linear combination of an I(d) series is also I(d).
01/01/2025 18
1. Graphical Analysis
• Any time before conducting formal tests, it is always advisable to
plot the time series under study because such a plot gives an initial
clue about the likely nature of the time series.
• Take, for instance, the GDP time series shown below. You will see
that over the period of study GDP has been increasing, that is,
showing an upward trend, suggesting perhaps that the mean of the
GDP has been changing.
01/01/2025 19
• This may suggest that the GDP series is not stationary. Such an
intuitive feeling is the starting point for a more formal tests of
stationarity.
01/01/2025 20
2. The unit root test
• A test of stationarity (or nonstationarity) that has become
widely popular over the past several years is the unit root test.
• The starting point is the unit root (stochastic) process that we
discussed earlier. We start with,
01/01/2025 21
• We know that if ρ = 1, that is, in the case of the unit root, the
equation becomes a random walk model without drift, which
we know is a non-stationary stochastic process.
• Therefore, we simply regress Yt on its (one period) lagged value
Yt−1 and find out if the estimated ρ is statistically equal to 1? If it
is, then Yt is non-stationary(we have the unit root problem).
• This is the general idea behind the unit root test of stationarity.
01/01/2025 22
• For theoretical reasons, we manipulate the above equation as
follows: Subtract Yt−1 from both sides of the equation to
obtain:
01/01/2025 24
• Since ut is a white noise error term, it is stationary, which means
that the first differences of a random walk time series are
stationary.
• One might be tempted to say, why not use the usual t test?
Unfortunately, under the null hypothesis that δ=0 (i.e., ρ=1), the t
value of the estimated coefficient of Yt−1 does not follow the t
distribution even in large samples; that is, it does not have an
asymptotic normal distribution.
01/01/2025 25
• The Dickey–Fuller (DF) test.
• Dickey and Fuller have shown that under the null hypothesis
that δ = 0, the estimated t value of the coefficient of Yt−1 in
equation;
01/01/2025 26
• Interestingly, if the hypothesis that δ = 0 is rejected (i.e., the time
series is stationary), we can use the usual (Student’s) t test.
• To allow for the various possibilities, the DF test is estimated in
three different forms, that is, under three different null hypotheses.
• In each case, the null hypothesis is that δ = 0; that is, there is a unit
root(the time series is non-stationary). The alternative hypothesis is
that δ is less than zero; that is, the time series is stationary.
01/01/2025 27
• The actual estimation procedure for DF test is as follows:
1. Estimate the model by OLS with time trend;
2. Divide the estimated coefficient of Yt−1 in each case by its
standard error to compute the (τ) tau statistic; and
3. Refer to the DF statistics
01/01/2025 28
• Decision: If the computed absolute value of the tau statistic (|
τ|) exceeds the DF or MacKinnon critical tau values, we reject
the hypothesis that δ = 0, in which case the time series is
stationary.
• On the other hand, if the computed |τ| does not exceed the
critical tau value, we do not reject the null hypothesis, in which
case the time series is non-stationary.
01/01/2025 29
The Augmented Dickey–Fuller (ADF) Test
• In conducting the DF test as in above, it was assumed that the
error term ut was uncorrelated with its lag.
• But in case the ut are correlated, Dickey and Fuller have
developed a test, known as the augmented Dickey–Fuller (ADF)
test.
• This test is conducted by “augmenting” the preceding three
equations by adding the lagged values of the dependent
variable ∆Yt .
01/01/2025 30
• To be specific, suppose we have
01/01/2025 31
• The number of lagged difference terms to include is often
determined empirically, the idea being to include enough
terms so that the error term in this model is serially
uncorrelated.
• In ADF we still test whether δ = 0 and the ADF test follows the
same asymptotic distribution as the DF statistic, so the same
critical values can be used.
01/01/2025 32
Stata commands for ADFT
• We use the following commands to conduct unit root test for GDP.
dfuller gdp, trend lags(1)
Or if you want the regression to be displayed;
dfuller gdp, trend regress lags(1)
We use similar test for consumption as:
dfuller consumption, trend lags(1)
Or if you want the regression to be displayed;
dfuller consumption, trend regress lags(1)
• The command shows regression of the dependent variable up on
itself lagged one year and first difference.
01/01/2025 33
Illustrative example
• Use stata time series data on GDP and Electricity consumption
for a country during 1958-1994. The file name is ‘TIME SERIES’
• First declare that your data is a time series process using the
command:
tsset year
• Next to visually detect whether the data is trended (non-
stationary) for both variables use the command:
twoway (tsline gdp) (tsline CONSUM)
• We test the null hypothesis that the variable under
consideration is a unit root process.
01/01/2025 34
The graph is given below
100002000030000400005000060000
0 20 40 60
year
gdp CONSUM
01/01/2025 35
ADF test Result for GDP(in level)
01/01/2025 36
• Decision and conclusion: we can see from the table that ADF
test statistics in absolute value is 2.567 and this value is less
than the critical values at 1%,5% and also 10%.
• This tells us that GDP is a unit root process(i.e. it is
nonstationary process).
• Since GDP is nonstationary (is a unit root process) at levels, we
take first difference and check whether the unit root problem
is resolved.
01/01/2025 37
First difference result
01/01/2025 38
• We can see from the table that, at first differencing the ADF
test statistics is -4.523 which is larger than the critical values at
1,5 and 10%.
• Thus we reject the null hypothesis and we conclude that GDP
at first differencing is stationary. That is, the first differencing
removed the unit root problem. Thus, GDP is said to be
integrated of order 1, i.e GDP~I(1).
• We can do similar test for consumption
01/01/2025 39
ADF test for consumption at levels
01/01/2025 40
• ADF test statistics = -2.773 whose absolute value is less than
than critical values at any level of significance. Thus, we do not
reject the null hypothesis and conclude that consumption has a
unit root problem(non-stationary).
• Now we take the first difference of consumption and check
whether it the unit root problem is resolved.
• At first difference ADF test statics is -9.091 greater than critical
values and thus reject nuhll hypothesis. We conclude that first
differencing removed the problem and consumption is
integrated order of 1
01/01/2025 41
ADF test for cons.at First difference
01/01/2025 42
Cointegration
There is a unique case where a regression of a nonstationary series on another nonstationary
series does not result in spurious regression.
This is the situation of cointegration.
If two time series have stochastic trends (i.e. they are nonstationary), a regression of one on
the other may cancel out the stochastic trends, which may suggest that there is a long-run, or
equilibrium, relationship between them even though individually the two series are
nonstationary.
Keep in mind that unit root and nonstationarity are not synonymous. A stochastic process
with a deterministic trend is nonstationary but not unit root.
Tests of Cointegration
Engle-Granger (EG) and augmented Engle-Granger (AEG) tests
In the context of testing for cointegration, the Dickey-Fuller (DF) and augmented
Dickey-Fuller (ADF) tests are known as Engle-Granger (EG) and augmented Engle-
Granger (AEG) tests, which are now incorporated in several software packages.
Shortcomings of the EG methodology
If you have more than three variables, there might be more than one cointegrating
relationship.
Once we go beyond two time series, we will have to use Johansen methodology to test
for cointegrating relationships among multiple variables.
Unit Root Tests and Cointegration Tests
Tests for unit roots are performed on single time series, whereas cointegration deals with
the relationship among a group of variables, each having a unit root.
It is better to test each series for unit roots, as some of the series in a group may have
more than one unit root, in which case they will have to be differenced more than once
to make them stationary.
If two time series Y and X are integrated of different orders then the error term in the regression of Y
and X is not stationary and this regression equation is said to be unbalanced.
On the other hand, if the two variables are integrated of the same order, then the regression equation
is said to be balanced.
Cointegration and Error Correction Mechanism (ECM)