0% found this document useful (0 votes)
12 views31 pages

Time Series

Uploaded by

chernetgirma11
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)
12 views31 pages

Time Series

Uploaded by

chernetgirma11
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
You are on page 1/ 31

10/24/23 Henok S 0

Definition and nature of time series data


ØTime series data, as the name indicates, are data that have been
collected over a period of time on one or more variable.
ØTime series data are data collected for a single entity at
multiple points in time can be used to answer quantitative
questions for which cross sectional data are inadequate.
• One such questions, what is the causal effect on a variable of
interest, Y, of a change in another variable, X, over time? In other
words, what is the dynamic causal effect on Y of a change in X?

10/24/23 Henok S 1
Con…
ØTime series data are commonly recorded or observed at a regular
frequency.
• The frequency is simply a measure of the interval over, or the
regularity with which, the data are collected or recorded.
For example daily (stock price, weather report), weekly (money supply),
monthly (unemployment rate, consumer price index (CPI)), quarterly
(GDP), annually (government budgets).
• Since time series data are ordered in time, past value influence future
values and hence this often results in a violation of the assumption
of no serial correlation in the residuals of a standard OLS model
(Cov[εi, εj] = 0 if i ≠ j).
10/24/23 Henok S 2
Problems that could be studied using time series data
üThe effect on a county’s exchange rate of an increase in its trade deficit
üThe causal relationships between hotel investment and tourist flow over time
üHow the value of a country’s stock’s stock index has varied with that
country’s macroeconomic fundamentals
üRelationship between population and economic growth
üHow the value of a company’s stock price has varied when it announced the
value of its dividend payment

10/24/23 Henok S 3
Graphical presentation of time series variables
• A very useful approach to examine features of time series variables is
to start from their graphic representation. It helps us to identify
those characteristics (like trend, cyclicality, and volatility) which can
be identified visually. (see in the next slides)

10/24/23 Henok S 4
Ethiopian annual private consumption expenditure (1971 to 2011)
Generally speaking, the annual private consumption in the country has been
increasing over time with the strong upward trend.
Private Final Consumption Expenditure
450,000.0
400,000.0
350,000.0
300,000.0
250,000.0
200,000.0
150,000.0
100,000.0
50,000.0
-

10/24/23 Henok S 5
Data for Ethiopian economy: monthly prices of perishable commodities:
onion, tomato and potato: prices of onion and tomato vary considerably
over period with peaks followed by valleys, or cycles in the series
8

7
onion tomato potato

6
average price/kg

0
O-07

O-08

O-09

O-10

O-11
J-08

J-08
J-08

J-09

J-09
J-09

J-10

J-10
J-10

J-11

J-11
J-11
M-08

M-08

M-09

M-09

M-10

M-10

M-11

M-11
A-08

A-08

A-09

A-09

A-10

A-10

A-11

A-11
S-07

S-08

S-09

S-10

S-11
N-07
D-07

N-08
D-08

N-09
D-09

N-10
D-10

N-11
F-08

F-09

F-10

F-11
10/24/23 Henok S 6
Stochastic Processes
• A random or stochastic process is a collection of random variables
ordered in time.
• If we let Y denote a random variable, and if it is continuous, we
denote it as Y(t), but if it is discrete, we denoted it as Yt.
• An example of the latter is GDP, CPI etc. Since most economic data are
collected at discrete points in time, for our purpose we will use the notation
Yt rather than Y(t). If we let Y represent GDP, for our data we haveY1,Y2,
Y3, . . . ,Y86,Y87,Y88, where the subscript 1 denotes the first observation (i.e.,
GDP for the first quarter of 1970) and the subscript 88 denotes the last
observation (i.e., GDP for the fourth quarter of 1991).
• Keep in mind that each of these Y’s is a random variable.
10/24/23 Henok S 7
Con…
• In what sense can we regard GDP as a stochastic process? Consider for
instance the GDP of $2872.8 billion for 1970–I. In theory, the GDP figure for
the first quarter of 1970 could have been any number, depending on the economic
and political climate then prevailing.The figure of $2872.8 is a particular
realization of all such possibilities.Therefore, we can say that GDP is a
stochastic process and the actual values we observed for the period 1970–I to
1991–IV are a particular realization of that process (i.e., sample).
• The distinction between the stochastic process and its realization is
similar to the distinction between population and sample in cross-
sectional data. Just as we use sample data to draw inferences about a
population, in time series we use the realization to draw inferences about the
underlying stochastic process.
10/24/23 Henok S 8
Stationary Stochastic Processes
• A stochastic process is said to be stationary if its mean and variance are
constant over time and the value of the covariance between the two time
periods depends only on the distance or gap or lag between the two time
periods and not the actual time at which the covariance is computed.
• To explain stationarity, let 𝑌" be a stochastic time series with these properties:
• Mean: 𝐸(𝑌" ) =𝜇
• Variance: 𝑉𝑎𝑟(𝑌" )=E(𝑌" -𝜇)2 =𝜎 ,
• Covariance: γk=E -𝑌" − 𝜇)(𝑌"/0 − μ)
• where γk, the covariance (or autocovariance) at lag k, is the covariance
between the values of 𝑌" and 𝑌"/0 , that is, between twoY values k periods
apart. If k = 0, we obtain γ0, which is simply the variance ofY (σ2); if k =
1, γ1 is the covariance between two adjacent values ofY.
10/24/23 Henok S 9
Non-stationary time series
• If a time series is not stationary in the sense just defined, it is called a
non-stationary time series. In other words, a non-stationary
time series will have a time varying mean or a time-varying variance or
both.
Why do we need to test for Non-Stationarity?
1. The stationarity or otherwise of a series can strongly influence its
behaviour and properties - e.g. persistence of shocks will be
infinite for non-stationary series

10/24/23 Henok S 10
Con…
2. Spurious regressions: If two variables are trending over time, a
regression of one on the other could have a high R2 even if the two
are totally unrelated.
3. If the variables in the regression model are not stationary, then it
can be proved that the standard assumptions for asymptotic
analysis will not be valid. In other words, the usual “t-ratios” will
not follow a t-distribution, so we cannot validly undertake
hypothesis tests about the regression parameters.
• As a consequence, it is not possible to generalize it to other time periods.
Therefore, for the purpose of forecasting, such (non stationary) time series may
be of little practical value.
10/24/23 Henok S 11
Stochastic Processes
• We distinguish two types of random walks:
1. Random Walk without Drift: Suppose 𝑢" is a white noise error term
with mean 0 and variance σ2.Then the series 𝑌" is said to be a random walk
if
𝑌" = 𝑌"23 + 𝑢"
In the above equation the value of Y at time t is equal to its value at time (t-1)
plus a random shock. Now we can write
𝑌3 = 𝑌5 + 𝑢3
𝑌, = 𝑌3 + 𝑢,=𝑌5 + 𝑢3 + 𝑢,
𝑌6 = 𝑌, + 𝑢6 =𝑌5 + 𝑢3 + 𝑢,+𝑢6
In general, if the process started at some time 0 with a value of 𝑌5, we have
𝑌" = 𝑌5 + ∑ 𝑢8
10/24/23 Henok S 12
Con…
𝐸(𝑌" ) = 𝐸(𝑌5 + ∑ 𝑢8 ) Since 𝐸(𝑢" ) is assumed to be zero
Therefor 𝐸(𝑌" )=𝑌5
Also, 𝑉𝑎𝑟(𝑌" ) = 𝑉𝑎𝑟(𝑌5 + ∑ 𝑢8 ) = 𝑉𝑎𝑟(𝑌5 ) + 𝑉𝑎𝑟(∑ 𝑢8 )
𝑉𝑎𝑟(𝑌" )=𝑡𝜎 ,
vThe mean ofY is equal to its initial, or starting value, which is constant, but as t
increases, its variance increases indefinitely, thus violating a condition of stationarity. In
a nutshell, the RWM without drift is a non-stationary stochastic process. In practice 𝑌5
is often set at zero, in which case 𝐸(𝑌" ) = 0.
vAn interesting feature of RWM is the persistence of random shocks (i.e., random errors),
which is clear from the previous slide: 𝑌" is the sum of initial 𝑌5 plus the sum of random
shocks. As a result, the impact of a particular shock does not die away.That is why
random walk is said to have an infinite memory.
10/24/23 Henok S 13
Con…
2. Random Walk with Drift
𝑌" = 𝛿 + 𝑌"23 + 𝑢"
where δ is known as the drift parameter. The name drift comes from the fact that if we
write the preceding equation as;
𝑌" − 𝑌"23 = ∆𝑌"= 𝛿 + 𝑢"
It shows that 𝑌" drifts upward or downward, depending on δ being positive or negative.
𝑌" = 𝛿 + 𝑌"23 + 𝑢"
𝑌3 = 𝛿 + 𝑌5 + 𝑢3
𝑌, = 𝛿 + 𝑌3 + 𝑢, = 𝛿 + 𝛿 + 𝑌5 +𝑢3 +𝑢,
𝑌6 = 𝛿 + 𝑌, + 𝑢6 = 𝛿 + 𝛿 + 𝛿 + 𝑌5 +𝑢3 +𝑢, +𝑢6
Thus we can generalize as follows;
𝑌" = t𝛿 + 𝑌5 + ∑ 𝑢8
Using the same procedure the mean and variance of RWM with drift is:
10/24/23 𝐸(𝑌") = 𝑌5 + 𝑡𝛿 and
Henok S 𝑉𝑎𝑟(𝑌")=𝑡𝜎 , 14
Trend Stationary (TS) and Difference Stationary (DS) Stochastic
Processes
A trending mean is a common violation of stationarity.There are two popular models
for non stationary series with a trending mean.
vTrend stationary:The mean trend is deterministic. Once the trend is estimated
and removed from the data, the residual series is a stationary stochastic process.
vDifference Stationary:The mean trend is stochastic. Differencing the series D
times yields a stationary stochastic process.
vThe distinction between a deterministic and stochastic trend has important
implications for the long term behavior of a process.
• Time series with a deterministic trend always revert to the trend in the long run
(the effects of shocks are eventually eliminated). Forecast intervals have constant
width.
• In the case of stochastic trend, time series with a stochastic trend never recover
from shocks to the system (the effects of shocks are permanent). Forecast intervals
grow over time.
10/24/23 Henok S 15
Con…
• Consider the following model of the time series 𝑌" .
𝑌" = 𝛽3 + 𝛽," + 𝛽6 𝑌"23 + 𝑢" ……….(1)
Where 𝑢" is a white noise error term and where t is time measured
chronologically. Now we have the following possibilities:
• Random walk Model: If 𝛽3 = 0, 𝛽, = 0, 𝛽6 = 1, we get
𝑌" = 𝑌"23 + 𝑢"
This is nothing but a RWM without drift and is therefore non
stationary. But note that, if we write as
∆𝑌" = (𝑌" −𝑌"23 ) = 𝑢"
It becomes stationary, as noted before. Hence, a RWM without drift
is a difference stationary process (DSP).
10/24/23 Henok S 16
Con…
• Random walk with drift: If in (1) 𝛽3 ≠ 0, 𝛽, = 0, 𝛽6 = 1, we get
𝑌" = 𝛽3 + 𝑌"23 + 𝑢"
This is a random walk with drift and is therefore non stationary. If we write it
as
(𝑌" −𝑌"23 ) = ∆𝑌" = 𝛽3 + 𝑢"
• This means 𝑌" will exhibit a positive (𝛽3 > 0) or negative (𝛽3 < 0) trend.
Such a trend is called a stochastic trend. The above equation is a DSP
process because the non stationarity in 𝑌" can be eliminated by taking first
differences of the time series.

10/24/23 Henok S 17
Con…
• Deterministic trend: If in (1), 𝛽3 ≠ 0, 𝛽, ≠ 0, 𝛽6 = 0, we obtain
𝑌" = 𝛽3 + 𝛽," + 𝑢"
This is called a trend stationary process (TSP). Although the mean of 𝑌" is 𝛽3 + 𝛽," , which is not
constant, its variance. Once the values of 𝛽3 and 𝛽, are known, the mean can be forecast perfectly.
Therefore, if we subtract the mean of 𝑌" from 𝑌" , the resulting series will be stationary, hence the name
trend stationary. This procedure of removing the (deterministic) trend is called detrending.
• Random walk with drift and deterministic trend: If, 𝛽3 ≠0, 𝛽, ≠ 0, 𝛽6 = 1, we obtain:
𝑌" = 𝛽3 + 𝛽," + 𝑌"23 + 𝑢"
We have a random walk with drift and a deterministic trend, which can be seen if we write this
equation as ∆𝑌" = 𝛽3 + 𝛽," + 𝑢" which means that 𝑌" is non-stationary

10/24/23 Henok S 18
Integrated Stochastic Processes

ØConsider the random walk model which is a specific case of a more general class of
stochastic processes known as integrated processes. Recall that the RWM without drift is
non stationary, but its first difference is stationary.
ØTherefore, we call the RWM without drift integrated of order 1, denoted as I(1).
Similarly, if a time series has to be differenced twice (i.e., take the first difference of the
first differences) to make it stationary, we call such a time series integrated of order 2.
ØIn general, if a (non stationary) time series has to be differenced d times to make it
stationary, that time series is said to be integrated of order d. A time series 𝑌" integrated of
order d is denoted as 𝑌" ~ I(d).
ØIf a time series 𝑌" is stationary to begin with (i.e., it does not require any differencing), it
is said to be integrated of order zero, denoted by 𝑌" ~ I(0). Most economic time series are
generally I(1); that is, they generally become stationary only after taking their first
differences.
10/24/23 Henok S 19
Properties of Integrated Time Series
• The following properties of integrated time series may be noted: Let 𝑋" ,
𝑌" ,and 𝑍" be three time series.
1. If 𝑋" ~I(0) and 𝑌" ~ I(1), then 𝑍" = (𝑋" + 𝑌") = I(1); that is, a linear
combination or sum of stationary and non-stationary time series is non-
stationary.
2. If 𝑋" ~I(d), then 𝑍" = (a + b𝑋") = I(d), where a and b are constants.That is,
a linear combination of an I(d) series is also I(d).Thus, if 𝑋" ~ I(0), then 𝑍" =
(a + b𝑋") ~ I(0).
3. If 𝑋" ~ I(d1) and 𝑌" ~ I(d2), then 𝑍" = (a𝑋" + b𝑌") ~ I(d2), where d1 <
d2.
4. If 𝑋" ~ I(d) and 𝑌" ~ I(d), then 𝑍" = (a𝑋" + b𝑌") ~ I(d*); d* is generally
equal to d, but in some cases d* < d
10/24/23 Henok S 20
Test of Stationary
Consider the following equation
𝑌" = ρ𝑌"23 + 𝑢" −1≤ρ≤1
ØIf ρ is in fact 1, we face what is known as the unit root problem,
that is, a situation of non-stationarity.
Ø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.
ØIf, however, |ρ| ≤ 1, that is if the absolute value of ρ is less than
one, then it can be shown that the time series 𝒀𝒕 is stationary in the
sense we have defined it.
10/24/23 Henok S 21
Con…
There are three tests to know whether a given time series data is
stationary or not:
1. Graphical analysis and
2. The Correlogram test and
3. Unit root test

10/24/23 Henok S 22
Graphical Analysis
• Before one pursues formal tests, it is always advisable to plot the time
series under study. Such a plot gives an initial clue about the likely
nature of the time series.
• If the plot is showing an upward trend or down trend one may
suspect that the time series under consideration is non stationary.

10/24/23 Henok S 23
These are Examples of Non stationary Time Series

10/24/23 Henok S 24
These are Examples of Stationary Time Series

10/24/23 Henok S 25
Unit Root Test
• A test of stationarity (or non stationarity) that has become widely
popular over the past several years is the unit root test. We start
with
𝑌" = ρ𝑌"23 + 𝑢" −1≤ρ≤1
We know that if ρ = 1, that is, in the case of the unit root, becomes a
random walk model without drift, which we know is a non-stationary
stochastic process. Therefore, why not simply regress 𝑌" on its (one
period) lagged value 𝑌"23and find out if the estimated ρ is statistically
equal to 1? If it is, then 𝑌" is non- stationary.

10/24/23 Henok S 26
Con…
• For theoretical reasons, we manipulate as follows: Subtract 𝑌"23
from both sides of (2) to obtain:
𝑌" − 𝑌"23 = ρ𝑌"23 − 𝑌"23 + 𝑢"
∆𝑌" = (ρ − 1)𝑌"23 + 𝑢" … … … … … … … … . . (2)
This can be written as
∆𝑌" =𝜃𝑌"23 + 𝑢" ……………………………… (3)
Where 𝜽 = (ρ − 1) and ∆ , as usual, is the first-difference operator.
In practice, therefore, instead of estimating (2), we estimate (3) and
test the (null) hypothesis that 𝜃 = 0. If 𝜃 = 0, then ρ = 1, that is we
have a unit root, meaning the time series under consideration is non-
stationary.
10/24/23 Henok S 27
Con…
• Now let us turn to the estimation of (3). This is simple enough; all
we have to do is to take the first differences of 𝑌" and regress them
on 𝑌"23and see if the estimated slope coefficient in this regression
(𝜃) is zero or not. If it is zero, we conclude that 𝑌" is non-
stationary. But if it is negative, we conclude that 𝑌" is stationary.
• The only question is which test we use to find out if the estimated
coefficient of 𝑌"23in (3) is zero or not. You 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 𝑌"23 does not follow the t distribution even in large
samples; that is, it does not have an asymptotic normal distribution.
10/24/23 Henok S 28
Con…
• What is the alternative? Dickey and Fuller have shown that under the null
hypothesis that 𝜃 = 0, the estimated t value of the coefficient of 𝑌"23in (3)
follows the τ (tau) statistic. In the literature the tau statistic or test is known
as the Dickey–Fuller (DF) test, in honor of its discoverers.
• The actual procedure of implementing the DF test involves several decisions. In
our discussion of the nature of the unit root process, the DF test is estimated in
three different forms (and under three different null hypotheses);
ü𝑌" is a random walk: ∆𝑌" =𝜃𝑌"23 + 𝑢" ………………………..(4)
ü𝑌" is a random walk with drift: ∆𝑌" = 𝛽3 + 𝜃𝑌"23 + 𝑢" ………..(5)
ü𝑌" is a random walk with drift around a stochastic trend: ∆𝑌" = 𝛽3+ 𝛽," + 𝜃𝑌"23 + 𝑢"
…………………………………………………………….(6)
10/24/23 Henok S 29
Con…
• Where t is the time or trend variable. In each case, the null
hypothesis is that θ = 0; that is, there is a unit root or the time
series is non-stationary. The alternative hypothesis is that, θ is less
than zero; that is, the time series is stationary.
• Before making decision we have to closely watch the sign of the
coefficient of 𝑌"23 ( θ) in the previous slide three equations, 4,5 and 6.
If it is positive, we should rule out the model. Because, the time
series would be explosive, that is, it is not stable.
Decision Rule
If the computed absolute value of the tau statistic (|τ |) exceeds the
DF 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.
10/24/23 Henok S 30

You might also like