Analysis of Stationary Time Series
Analysis of Stationary Time Series
Analysis of Stationary Time Series
1945
1951
1957
1963
1969
1975
1981
1987
1993
1999
2005
Stock Returns
Classical decomposition model: a time series
is considered to consist of three components
viz., Xt= mt+st+ct+t
where mt, st, ct and t are trend, seasonality,
cyclical and random (noise) components.
0
50
100
200
250
300
350
400
150
01/01/1950
01/01/1953
01/01/1956
01/01/1959
01/01/1962
01/01/1965
01/01/1968
01/01/1971
01/01/1974
01/01/1977
01/01/1980
01/01/1983
01/01/1986
01/01/1989
Sunspots
01/01/1992
01/01/1995
01/01/1998
01/01/2001
01/01/2004
01/01/2007
01/01/2010
Sunspots
Generally a plot speaks a thousands
words.
However, plot needs to be studied
carefully.
Following plots elaborate---plot does
not speak so many words as well----
need for mathematical modeling.
y
0 20 40 60 80
0
5
t
10
15
20
y
0 2000 4000 6000 8000 10000
0
5
t
10
15
20
Log y y
2.5 3 3.5 4 4.5 0 20 40 60 80
0
0
5
5
t
t
10
10
15
15
20
20
Log y y
2.5 3 3.5 4 4.5 0 20 40 60 80
0
0
1
1
Log t
Log t
2
2
3
3
Cyclical Component: The oscillatory
component in a time series where the
period of oscillation is more than one
year.
One complete period is called a cycle.
Length of cycle, intensity of cycle,
occurrence of cycle are not fixed and
unpredictable.
EXAMPLE: Every economy goes through
prosperity (boom) and depression.
0
50
100
200
250
300
350
400
150
01/01/1950
01/01/1953
01/01/1956
01/01/1959
01/01/1962
01/01/1965
01/01/1968
01/01/1971
01/01/1974
01/01/1977
01/01/1980
01/01/1983
01/01/1986
01/01/1989
Sunspots
01/01/1992
01/01/1995
01/01/1998
01/01/2001
01/01/2004
01/01/2007
01/01/2010
Sunspots
0
50
-50
150
200
250
300
350
100
01/01/1955
01/02/1955
01/03/1955
01/04/1955
01/05/1955
01/06/1955
01/07/1955
01/08/1955
01/09/1955
01/10/1955
01/11/1955
01/12/1955
01/01/1956
01/02/1956
01/03/1956
01/04/1956
Sunspots
01/05/1956
01/06/1956
01/07/1956
01/08/1956
01/09/1956
01/10/1956
01/11/1956
01/12/1956
Sunspots
Trendline
Assume that Trend is linear.
1996m1
1996m9
1997m5
1998m1
1998m9
1999m5
average
millions)
12 month Moving
Sale of warm blankets(in
Determination of ‘n’.
For monthly data: n=12, 24, 36…
For Quarterly data: n=4,8,…
Few data points are lost (at the beginning and
at the end)
Cannot be used for forecasting.
Does not work well when the trend line is
nonlinear.
The method of moving average can successfully remove seasonal
variations if the period of the moving average is equal to or a
multiple of the period of the seasonal fluctuations; else the
fluctuations will not be removed completely.
10
8
Sale of warm blankets(in
6 millions)
5 month Moving
4
average
2 17 month Moving
Average
0
1990m11
1992m12
1993m10
1995m11
1997m12
1998m10
1995m6
1996m4
1990m1
1990m6
1991m4
1991m9
1992m2
1992m7
1993m5
1994m3
1994m8
1995m1
1996m9
1997m2
1997m7
1998m5
1999m3
1999m8
Note: These averages are so calculated that
seasonality does not get completely removed
from the data.
9
8
7
6
5 Sale of warm
4 blankets(in millions)
3 Average yearly values
2
1
0
1990m11
1992m12
1993m10
1995m11
1997m12
1998m10
1990m1
1990m6
1991m4
1991m9
1992m2
1992m7
1993m5
1994m3
1994m8
1995m1
1995m6
1996m4
1996m9
1997m2
1997m7
1998m5
1999m3
1999m8
18000
16000
14000
Observation
Per Hector Wheat yield in Kg
12000
10000
Yield
8000
6000
4000
2000
0
1945 1950 1955 1960 1965 1970
time
From the above plot, different people may fit
different line based on their naked eye
judgment.
Which one is the best ‘in some sense’?
The method is known as ‘Least Square
Method’.
This method assumes a particular form of
trend, say, linear Trend, in the form as
Tt =a + b x t
where a and b are unknown, to be estimated
from the data.
ILLUSTRATION ON TREND and ITS REMOVAL-I
600,000
560,000
520,000
480,000
440,000
400,000
360,000
82 83 84 85 86 87 88 89 90 91 92 93 94
Dependent Variable: Unemployment Level Belgium
Sample: 1982M01 1994M08
Included observations: 152
600,000
80,000
500,000
40,000
400,000
0
300,000
-40,000
-80,000
82 83 84 85 86 87 88 89 90 91 92 93 94
60,000
40,000
20,000
-20,000
-40,000
-60,000
-80,000
82 83 84 85 86 87 88 89 90 91 92 93 94
Dependent Variable: Detrended Unemployment Level
Sample: 1982M01 1994M08
Included observations: 152
40,000
0
60,000
40,000 -40,000
20,000
-80,000
0
-20,000
-40,000
-60,000
82 83 84 85 86 87 88 89 90 91 92 93 94
100,000
50,000
-50,000
-100,000
-150,000
82 83 84 85 86 87 88 89 90 91 92 93 94
Dependent Variable: Deseasonalized Unemployment Level
Sample: 1982M01 1994M08
Included observations: 152
100,000
60,000
0
40,000
20,000 -100,000
0
-200,000
-20,000
-40,000
-60,000
82 83 84 85 86 87 88 89 90 91 92 93 94
600,000
60,000 500,000
40,000
20,000 400,000
0
300,000
-20,000
-40,000
-60,000
-80,000
82 83 84 85 86 87 88 89 90 91 92 93 94
275
250
225
200
175
150
125
100
95 96 97 98 99 00 01 02 03 04 05 06 07 08
Dependent Variable: IP_INDEX
Sample: 1995M04 2008M09
Included observations: 162
250
40 200
30
150
20
10 100
-10
-20
95 96 97 98 99 00 01 02 03 04 05 06 07 08
30
20
10
30 0
20 -10
-20
10
-10
-20
95 96 97 98 99 00 01 02 03 04 05 06 07 08
250
30
200
20
150
10
0 100
-10
-20
95 96 97 98 99 00 01 02 03 04 05 06 07 08
250
120 200
80 150
40
100
0
-40
-80
95 96 97 98 99 00 01 02 03 04 05 06 07 08
75,000
50,000
25,000
-25,000
-50,000
-75,000
-100,000
82 83 84 85 86 87 88 89 90 91 92 93 94
First difference of the deseasonalized unemployment level
20,000
15,000
10,000
5,000
-5,000
-10,000
-15,000
-20,000
82 83 84 85 86 87 88 89 90 91 92 93 94
twelve period difference(to remove seasonality) of IP index
60
50
40
30
20
10
-10
95 96 97 98 99 00 01 02 03 04 05 06 07 08
first difference of deseasonalized IP Index
40
30
20
10
-10
-20
-30
-40
-50
95 96 97 98 99 00 01 02 03 04 05 06 07 08
It is natural to assume that an observed series
(x1,x2,…,xn) is a particular realisation of a
stochastic process.
A stochastic process is a family of random
variables defined on a probability space.
Specifying the complete form of the
probability distribution is very ambitious, and
we usually content ourselves with
concentrating attention on the first and the
second moments.
However, it is impossible to make inferences
based on the first and the second moments
only. So we make a very important
assumption called stationarity.
A stochastic process is said to be strictly
stationary if its properties are unaffected by a
change of time origin; in other words, the
joint probability distribution at any set of
times t1,t2, …,tk must be the same as the joint
probability distribution at times t1+m, t2+m, …,
tk+m, where m is any arbitrary shift in the time
axis. Obviously, strict stationarity is a strong
condition.
A stochastic process is said to be weakly
stationary (or covariance stationary) if
(i) E(x1) = E(x2) = … = E(xn)= (say)
(ii) V(x1) = V(x2) = … = V(xn)= 2 (say)
and (iii) Cov (xt,xt-k) = k, independent of t.
Obviously, strong stationarity weak
stationarity but not vice versa. Only when
{xt) are jointly normal, then both are
equivalent.
Ergodicity
We also make the assumption of
ergodicity which refers to one type of
asymptotic independence. In words,
asymptotic independence means that two
realizations of a time series become even
closer to independence, the further they are
apart with respect to time. More formally,
asymptotic independence can be defined
as
| F ( X 1 ,..., X n , X 1k , X 2k ,..., X nk )
F ( X1,..., X n ) F ( X1 k ,..., X n k ) | (1)
0 as k .
This means that the joint distribution of two
subsequences of a stochastic process { X t } is
equal to the product of the marginal distribution
functions the more distant the two subsequences
are from each other. A stationary stochastic
process is ergodic if
1 n
lim E ( X t ) ( X t k ) 0 (2)
k 1
n n
holds. This condition stated above would be
satisfied if the autocovariances tend to zero
with increasing k.
Sample Autocorrelations and Partial
Autocorrelations
While a time series plots give some idea about
the nature of the underlying times series, it is
not (always easy or possible) to conclude
whether the time series is stationary or not.
Therefore, it is useful to consider some
statistics related to a time series. To that end,
sample autocorrelations , ̂ k , are obtained as
ˆ k ˆ k / ˆ 0 where ˆ k and ˆ0 are the estimates of
n
and ˆ0 ( xt x ) 2 / n
t 1
n
where x xt / n and n is the number of
t 1
observations in a given time series .
For a series with stationary DGP, the sample
autocorrelations typically die out quickly with
increasing k. In contrast, the sample autocorrelations
decays rather slowly for a non-stationary series. Note
that sample autocorrelations are estimates of the actual
(unknown) autocorrelations of the time series if the
process is stationary.
Partial autocorrelations are also useful
quantities that may convey useful information
on the properties of the DGP of a given time
series. The partial autocorrelation between X t
and X t k is the autocorrelation between X t
and X t k conditional on the intermediate
variables X t 1 , X t 2 , …, X t k 1 i.e.,
it measures the “true” correlation between X t
and X t k after adjustments have been made
for the intervening lags. Formally, the k th
sample partial autocorrelation is the estimated
value of kk , which is,
obtained as the ordinary least squares (OLS)
estimate of the coefficient kk in the
following autoregressive model of order k
x x ... x . u (3)
t k1 t 1 kk t k t
= 1 2
3 2
1 1 ...
5 2
1 2
= (1 12 )
For the second autocorrelation coefficient,
2 = Cov(yt, yt-2) = E[yt-E(yt)][yt-2-E(yt-2)]
Using the same rules as applied above for the lag 1 covariance
2 = E[ytyt-2]
= E[ (ut 1ut 1 12ut 2 ...) (ut 2 1ut 3 12 ut 4 ...)
]
( 2 1 )
2
22 0
(1 1 )
2
ARMA (p,q):
xt- 1xt-1-…- Pxt-p=at- 1at-1 -..-
qat-q.
where at’s are white noise (0, 2a).
Not-stationary== Non-stationary, when
distribution (parameters) changes over time.
Various important examples are: Deterministic
trend and Stochastic trend.
Trend, as we all know, is the long-run
smooth movement of a time series. While
the idea of deterministic trend has been
there for a long time, the concept of
stochastic trend is relatively new.
Deterministic trend can be represented in terms
of the following model:
xt f (t ) ut (4)
t
2
Yt
2
u
250
200
values
150
100
1 101 201 301 401
Time
Figure 1: Pure Random Walk
130
120
Values
110
100
90
1 101 201 301 401
Time
Fig 3: Random Walk with Drift
700
600
500
Values
400
300
200
100
1 101 201 301 401
Time
20
15
Random walk with drift
10
5
Stationary process
0
1 11 21 31 41 51 61 71 81 91
-5
-10
Random walk
-15
This is the most important question before
undertaking any time series analysis.
The answer requires an understanding of the
modern concept of trend. Trend can be of
two types. Examples of these two types of
trend are given below.
Deterministic trend:yt=+bt+ct2+at
Stochastic trend : yt=+yt-1+at where at is a
stationary process.
Note that in the latter, yt can be expressed as
yt=y0+ t+ aj
so that it also has linear trend as in the case
of deterministic trend. The difference lies in
the fact that the noise term i.e., aj is no
longer a stationary process since its mean
and variance are now functions of t. Hence, in
this case although a systematic variation is
exhibited, it is not predictable.
Underlying model:
yt=+yt-1+at i.e., yt=yt-1+at, = -1
Null hypothesis H0: =1 / =0
Alternative hypothesis H1: <1 / <0
Estimating equation:
yt = yt-1+ j yt-j+at
The test, called the augmented Dickey – Fuller
test (ADF) which is originally due to Dickey &
Fuller (1979, 1981), requires testing for the
significance of .
Main problem: The distribution of the test
statistic does not follow any standard
distribution under H0. The critical values have
been computed by Dickey and Fuller. Note
that the most general form of the estimating
equation is
yt=0+ 1t+yt-1+ j yt-j+at .
The critical values are now different from the
original DF critical values.It may be noted that
seasonal dummies may also be included; but
this would not result in further changes in the
limiting distributions, and hence in the
critical values.
LNEX_RATE
3.9
3.8
3.7
3.6
3.5
3.4
95 96 97 98 99 00 01 02 03 04 05 06 07 08
Null Hypothesis: LNEX_RATE has a unit root
t-ratio p-value
Augmented Dickey-Fuller
test statistic -2.237333 0.4653
.06
.04
.02
.00
-.02
-.04
-.06
-.08
95 96 97 98 99 00 01 02 03 04 05 06 07 08
Null Hypothesis: DLNEX_RATE has a unit root
t-ratio p-value
Augmented Dickey-Fuller
test statistic -8.700974 0.0000*
5% level -3.438154
-1
-2
-3
-4
500 1000 1500 2000
Quandt-Andrews unknown breakpoint test
Null Hypothesis: No breakpoints within trimmed data
Equation Sample: 3 2392
Test Sample: 362 2033