0% found this document useful (0 votes)
142 views46 pages

CH 5 Time Series

This is an important PPT for time series economics.

Uploaded by

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

CH 5 Time Series

This is an important PPT for time series economics.

Uploaded by

aschalew
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 46

Time Series Data

A time series is a set of observations on the values that a


variable takes at different times. Such data may be collected at
regular time intervals, such as
• Daily (e.g., stock prices, weather reports),
• Weekly (e.g., money supply figures),
• Monthly (e.g., the unemployment rate, the Consumer Price
Index),
• Quarterly (e.g., GDP),

• Annually (e.g., government budgets).


01/01/2025 1
• Unlike the arrangement of cross-sectional data, the
chronological ordering of observations (variables) in a time
series expresses potentially important information.

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).

• The main purpose of time-series analysis is to study the


dynamics or temporal structure of the 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:

• If ρ=1, the model becomes a RWM (that a RWM without drift).

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 .

where ut is a white noise error term(error term holding


assumptions of classical linear regression model) and t is time
measured chronologically.

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:

• now the model is stationary. Therefore, a RWM without drift is a


difference stationary process (DSP). In other words , even if RWM is non-
stationary(has unit root problem in levels), it is stationary after first
differencing.
01/01/2025 12
Random walk with drift
• If in the initial mode, β1 ≠ 0, β2 = 0, β3 = 1, we get;

which is a random walk with drift and is therefore nonstationary. If we


write it 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:

• is a difference stationary process (DSP) process because the non-


stationarity in Yt is eliminated by taking first differences of the time
series.
• Generally if a given non-stationary time series can be made
stationary after differencing , we call it difference stationary process
(DSP) process.

01/01/2025 14
Trend stationary process
• If in the initial model, β1 ≠ 0, β2 ≠ 0, β3 = 0, we obtain;

which is called a trend stationary process (TSP).


• Although the mean of Yt is β1 + β2t, which is not constant, its
variance is ( = σ2).
• Once the values of β1 and β2 are known, the mean can be
forecasted perfectly. Therefore, if we subtract the mean of Yt from
Yt, the resulting series will be stationary, hence the name trend
stationary.
01/01/2025 15
Integrated Stochastic Processes
• The random walk model is a specific case of a more general class of
stochastic processes known as integrated processes.
• We recall that the RWM without drift is non-stationary, but its first
difference is stationary. Therefore, the RWM without drift is
integrated of order 1,denoted as I(1).
• Similarly, if a time series has to be differenced twice (i.e. difference
of the first differences) to make it stationary, we call such a time
series integrated of order 2 denoted as I(2).

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).

• Stationarity and non Stationarity test using Stata


– Null Hypothesis: Variable is not stationary (Has unit root)
– Alternative Hypothesis: Variable is stationary (Has not unit
root)

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,

where ut is a white noise error term.

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:

• We can alternatively write it as:

where δ=(ρ−1) and as usual ∆ is the first-difference operator


01/01/2025 23
• In practice we estimate the first difference equation, that is;

and test the (null) hypothesis that δ = 0.


• If δ = 0, then ρ = 1, that is we have a unit root problem,
meaning the time series under consideration is non-stationary.
• Note that if δ = 0,

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;

follows the τ (tau) statistic.


• In the literature the tau statistic is known as the Dickey–Fuller
(DF) statistics and given in any econometrics text book.

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

• The ADF test here consists of estimating the following


regression:

• where εt is a pure white noise error term and where ∆Yt−1 =


(Yt−1 − Yt−2), ∆Yt−2 = (Yt−2 − Yt−3), etc.

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)

 Granger Representation Theorem: If two variables Y and X are cointegrated, the


relationship between the two can be expressed as an error correction mechanism (ECM).
 The ECM postulates that changes in the dependent variable depend on changes in the
independent variable and the lagged equilibrium error term, ut-1.
 If this error term is zero, there will not be any disequilibrium between the two variables and in that
case the long-run relationship will be given by the cointegrating relationship.
 But if the equilibrium error term is nonzero, the relationship between the two variables will be out of
equilibrium.
 For multiple time series, we need to use the vector error correction model (VECM).

You might also like