1 time series introduction 2012 - thus spake vm · pdf file01-05-2011 · enders,...
TRANSCRIPT
10/15/2012
1
15 October 2012Vijayamohan: CDS MPhil: Time Series 1 1
Time Series Time Series Time Series Time Series EconometricsEconometricsEconometricsEconometrics
1111
VijayamohananVijayamohananVijayamohananVijayamohananPillaiPillaiPillaiPillai NNNN
15 October 2012Vijayamohan: CDS MPhil: Time Series 1 2
Essential Readings: Time series:
Enders, Walter (1995) Applied Econometric Time Series,John Wiley & Sons.
Hamilton, James D (1994) Time Series Analysis, PrincetonUniversity Press.
Hendry, David F. (1995) Dynamic Econometrics, OxfordUniversity Press.
Makridakis, S., Wheelwright, S. C. and McGee, V. E.(1983) Forecasting – Methods and Applications, Secondedition, John Wiley & Sons.
10/15/2012
2
15 October 2012Vijayamohan: CDS MPhil: Time Series 1 3
Essential Readings: Time series:
My CDS Working Papers:
WP 312: Electricity Demand Analysis and Forecasting – TheTradition is Questioned!
WP 346: A Contribution to Peak Load Pricing: Theory andApplication
15 October 2012Vijayamohan: CDS MPhil: Time Series 1 4
Essential Readings: Panel Data Analysis:
Baltagi, B. H. (2001) Econometric Analysis of PanelData, 2nd edition, John Wiley.
Cheng, Hsian (1986) Analysis of Panel Data,Cambridge University Press.
10/15/2012
3
15 October 2012Vijayamohan: CDS MPhil: Time Series 1 5
A Time Series
Per Capita Net State Domestic
Product of Kerala at Constant (1993-94) Prices
(in Rs.)
1960 1965 1970 1975 1980 1985 1990 1995 2000
5000
6000
7000
8000
9000
10000
1960 1965 1970 1975 1980 1985 1990 1995 2000
5000
6000
7000
8000
9000
10000
Per Capita Per Capita Year NSDP (Rs.) Year NSDP (Rs.)1960-61 4313.79 1980-81 5392.591961-62 4214.82 1981-82 5404.591962-63 4206.08 1982-83 5472.791963-64 4269.36 1983-84 5186.761964-65 4286.69 1984-85 5438.951965-66 4441.45 1985-86 5566.171966-67 4476.00 1986-87 5367.131967-68 4607.29 1987-88 5523.341968-69 4976.05 1988-89 5993.691969-70 5006.78 1989-90 6305.481970-71 5175.36 1990-91 6683.071971-72 5352.05 1991-92 6830.411972-73 5391.20 1992-93 7324.321973-74 5272.47 1993-94 8063.361974-75 5235.12 1994-95 8780.751975-76 5365.44 1995-96 9149.741976-77 5211.88 1996-97 9494.411977-78 5194.39 1997-98 9517.951978-79 5262.51 1998-99 10024.561979-80 5410.00 1999-00 10502.18
15 October 2012Vijayamohan: CDS MPhil: Time Series 1 6
The modern era in time series started in 1927 with George Udny Yule (Scottish statistician: 1871-1951)
"On a Method of Investigating Periodicities in Disturbed Series, with Special Reference to Wolfer'sSunspot Numbers", Philosophical Transactions of the Royal Society of London, Ser. A, Vol. 226 (1927), pp. 267–298.
10/15/2012
4
15 October 2012Vijayamohan: CDS MPhil: Time Series 1 7
Yule showed such a series can be better described as a function of its past values.
Thus he introduced the concept of autoregression, even though he restricted himself to an order of four or fewer terms.
15 October 2012Vijayamohan: CDS MPhil: Time Series 1 8
Yule's approach was extended by Sir Gilbert Thomas Walker ((((British physicist and statistician: British physicist and statistician: British physicist and statistician: British physicist and statistician: 1868186818681868----1958)1958)1958)1958) ::::
defined (1931) the general autoregressive scheme.
Gilbert Walker Gilbert Walker Gilbert Walker Gilbert Walker On Periodicity in Series of Related On Periodicity in Series of Related On Periodicity in Series of Related On Periodicity in Series of Related Terms,Terms,Terms,Terms, Proceedings of the Royal Society of Proceedings of the Royal Society of Proceedings of the Royal Society of Proceedings of the Royal Society of
London, Ser. A, Vol. 131, (1931) 518London, Ser. A, Vol. 131, (1931) 518London, Ser. A, Vol. 131, (1931) 518London, Ser. A, Vol. 131, (1931) 518--------532.532.532.532.
Evgeny Evgenievich (or Eugen) Slutsky(Russian Statistician, Economist:(Russian Statistician, Economist:(Russian Statistician, Economist:(Russian Statistician, Economist: 1880188018801880----1948)1948)1948)1948)
presented (1937) the moving-average scheme.
10/15/2012
5
15 October 2012Vijayamohan: CDS MPhil: Time Series 1 9
Herman Ole Andreas Wold(1908- 1992)
(Swedish Statistician)
provided (1938; 1954)the theoretical foundation of combined ARMA processes.
15 October 2012Vijayamohan: CDS MPhil: Time Series 1 10
George Edward Pelham Box and Gwilym Meirion Jenkins (1970; 1976) codified the applied univariate time series ARIMA modelling
Box, George and Jenkins, Gwilym(1970) Time series analysis: Forecasting and control, San Francisco: Holden-Day.
10/15/2012
6
15 October 2012Vijayamohan: CDS MPhil: Time Series 1 11
Stationarity
A time series is stationary
if it fluctuates if it fluctuates if it fluctuates if it fluctuates around a constant around a constant around a constant around a constant mean. mean. mean. mean.
A nonnonnonnon----stationarystationarystationarystationary series
includes a longer-term secular trend.
15 October 2012Vijayamohan: CDS MPhil: Time Series 1 12
Stationarity
But, a large number of actual time series
are not stationary;
however, not an insolvable problem,
several methods to transform a non-stationary series into a stationary one.
10/15/2012
7
15 October 2012Vijayamohan: CDS MPhil: Time Series 1 13
YEAR MONTHS WPI All Commodities
1971-72 april 101.7may 102.3june 104.7july 106august 107.2september 107.5october 106.6november 105.1december 103.9january 107february 107march 108.1
1972-73 april 108.7may 109.7….. ……….. ……
1987-88 april 381.2may 390.3june 394july 400.6august 409.6september 408.9october 409.5november 411.1december 410.4january 416february 415.8march 417.6
Wholesale Price Index
(All Commodities)
15 October 2012Vijayamohan: CDS MPhil: Time Series 1 14
Notation for the time series
� A time series variable: yt.
Yt = the random variable Y at period t.
�A time series: (yt, yt−1, yt−2, . . . , y1, y0).
� T = standard number of
observations in a time series.
10/15/2012
8
15 October 2012Vijayamohan: CDS MPhil: Time Series 1 15
Time series process
a stochastic process
A sequence of random variables
ordered in time.
Random (stochastic) variable:
takes values in a certain range
with probabilities,
specified by a pdf.
15 October 2012Vijayamohan: CDS MPhil: Time Series 1 16
Time series: Stochastic Difference Equation.
Difference equations:
Mathematics of Economic Dynamics.
deal with time as a discrete variable –changing only from period to period –
DE expresses the value of a variable as a function of its own lagged values, time and other variables:
yt = a +b yt – 1:
a linear first order difference equation.
10/15/2012
9
15 October 2012Vijayamohan: CDS MPhil: Time Series 1 17
If a random variable, ut , added,
yt = a + b yt–1 + ut :
Stochastic DE : Time Series.
First order Autoregressive, AR(1), process.
ut : equilibrium error, disturbance,
: information shock →→→→ ‘innovation’ →→→→
the only new information to yt.
: assumed to be a ‘white noise process’.
Noise, white noise: from signal theory, physics
15 October 2012Vijayamohan: CDS MPhil: Time Series 1 18
Noise
Filter
Noise
Signal (Input)
Output
Noise? Disturbance : Error
Filtering =
Decomposing output into input (signal) and noise.
10/15/2012
10
15 October 2012Vijayamohan: CDS MPhil: Time Series 1 19
Signal (Input)
Output
Noise
Filter
Noise
FilteringFilteringFilteringFiltering = = = = DecomposingDecomposingDecomposingDecomposing output output output output into into into into input (input (input (input (signalsignalsignalsignal) and ) and ) and ) and noisenoisenoisenoise....
Time series = Signal (input) + Noise;
= Regression function + Noise.
Filters: Regression; Auto Regression; Moving Average; ….
15 October 2012Vijayamohan: CDS MPhil: Time Series 1 20
White noise
analogous to white light which contains all frequencies.
a random signal (or process) with a flat power spectral density.
The signal's power spectral density has equal power in any band.
10/15/2012
11
15 October 2012Vijayamohan: CDS MPhil: Time Series 1 21
Inte
nsit
y (d
b)
Frequency (Hz)
White NoiseCalculated spectrum of a generated approximation of white noise
An example realization of a
white noise process.
15 October 2012Vijayamohan: CDS MPhil: Time Series 1 22
A flat power spectral density =
Zero mean
Constant variance
Zero autocovariance = No autocorrelation.
A white noise process
10/15/2012
12
15 October 2012Vijayamohan: CDS MPhil: Time Series 1 23
So, in yt = a + b yt–1 + ut :
ut : White noise
(a) E(ut) = E(ut - 1) = …. = 0
(b) Var(ut) = Var(ut - 1) = …. = σ2
(c) Cov(ut; ut–k ) = Cov(ut–s; ut–s–k) = …. = 0,
for all k and s; k ≠≠≠≠ 0:
‘No memory’.
(d) ut is normally distributed. (This assumption
not essential.)
15 October 2012Vijayamohan: CDS MPhil: Time Series 1 24
White noise process = stationary process
Not vice versa!
For a stationary process,
Mean, variance, and covariance : all constant;
independent of t:
Termed covariance stationarity.
(or second order,
weak,
wide sense stationarity).
10/15/2012
13
15 October 2012Vijayamohan: CDS MPhil: Time Series 1 25
Stationarity in two senses:
1. First-order (Strict) Stationarity
2. Second-order (Weak) Stationarity
15 October 2012Vijayamohan: CDS MPhil: Time Series 1 26
1. First-order (Strict) Stationarity
The time series process Xt is completely (strictly)
stationary, if its joint pdf is not affected by a time
translation.
i.e., at whatever point in time it starts, a sample of
T successive observations will have the same pdf
for all t :
Time invariant probabilistic structure.
The process is in ‘stochastic equilibrium’.
10/15/2012
14
15 October 2012Vijayamohan: CDS MPhil: Time Series 1 27
1. First-order (Strict) Stationarity
Formally:
The process {X(t)} is strictly stationary
if, for any admissible t1, t2, …, tn, and
any interval k,
the joint pdf of {X(t1), X(t2), …, X(tn)} is
identical with the joint pdf of
{X(t1+k), X(t2+k), …, X(tn+k)}.
15 October 2012Vijayamohan: CDS MPhil: Time Series 1 28
2. Second-order (Weak) Stationarity
A process Yt is weakly stationary if :
1. E(Yt) = (constant mean )
2. Cov(Yt, Yt-k) = (depends only on k not on t)
For k = 0, the second condition implies
a constant .
i.e., the first and second order moment structure of Yt is
constant over time .
∞∞∞∞<<<<µµµµ
∞∞∞∞<<<<kγγγγ
2)( σσσσ====tYVar
10/15/2012
15
15 October 2012Vijayamohan: CDS MPhil: Time Series 1 29
2. Second-order (Weak) Stationarity
i.e., the first and second order moment structure of Yt
is constant over time .
‘Wide-sense stationarity’ or ‘ covariance stationarity’ :
No constant mean condition is too restrictive for
most economic time series ( having clear trends ).
We restrict our attention to weak stationarity and
use `stationarity' to mean weak stationarity .
15 October 2012Vijayamohan: CDS MPhil: Time Series 1 30
In
yt = a + b yt–1 + ut ;
ut : White noise
But yt may NOT be stationary.
Depends on the magnitude of
b, the root of DE.
10/15/2012
16
15 October 2012Vijayamohan: CDS MPhil: Time Series 1 31
Consider a DE: yt = b yt–1 ;
Its solution, time path:
yt = y0 bt ;
Nature of the time path yt,
whether it converges or not as t → ∞,
depends on the sign and magnitude of b.
Consider the following cases, with y0 = 1:
yt = bt .
15 October 2012Vijayamohan: CDS MPhil: Time Series 1 32
Value of b bt
Time path of yt
t = 0 t = 1 t = 2 t = 3 t = 4 t = 5 t = 6
b > 1| b |>1
2t 1 2 4 8 16 32 64
10/15/2012
17
15 October 2012Vijayamohan: CDS MPhil: Time Series 1 33
Value of b bt
Time path of yt
t = 0 t = 1 t = 2 t = 3 t = 4 t = 5 t = 6
b = 1| b | = 1
1t 1 1 1 1 1 1 1
15 October 2012Vijayamohan: CDS MPhil: Time Series 1 34
Value of b bt
Time path of yt
t = 0 t = 1 t = 2 t = 3 t = 4 t = 5 t = 6
b < 1| b |<1
(1/2)t 1 1/2 1/4 1/8 1/16 1/32 1/64
10/15/2012
18
15 October 2012Vijayamohan: CDS MPhil: Time Series 1 35
Value of b bt
Time path of yt
t = 0 t = 1 t = 2 t = 3 t = 4 t = 5 t = 6
-1< b < 0| b | < 1
(-1/2)t 1 -1/2 1/4 -1/8 1/16 -1/32 1/64
15 October 2012Vijayamohan: CDS MPhil: Time Series 1 36
Value of b bt
Time path of yt
t = 0 t = 1 t = 2 t = 3 t = 4 t = 5 t = 6
b = -1| b | = 1
-1t 1 -1 1 -1 1 -1 1
10/15/2012
19
15 October 2012Vijayamohan: CDS MPhil: Time Series 1 37
Value of b bt
Time path of yt
t = 0 t = 1 t = 2 t = 3 t = 4 t = 5 t = 6
b < -1| b |>1
-2t 1 -2 4 -8 16 -32 64
15 October 2012Vijayamohan: CDS MPhil: Time Series 1 38
Thus given a first order DE, yt – byt–1 = 0,
Its time path yt may be
ocillatory,
or non-oscillatory,
converging(damped)
or diverging (explosive)
What are the conditions?
10/15/2012
20
15 October 2012Vijayamohan: CDS MPhil: Time Series 1 39
Time path yt will be
ocillatory, if b < 0, (negative root) and
non-oscillatory, if b > 0 (positive root).
15 October 2012Vijayamohan: CDS MPhil: Time Series 1 40
Time path yt will be
converging, if 0 < b < 1, or −−−−1 < b < 0,
that is, −−−−1 < b < 1, or | b | < 1,
and
Non-converging, if b ≥≥≥≥ 1, or b ≤≤≤≤ −−−−1,
that is, −−−−1 ≥≥≥≥ b ≥≥≥≥ 1, or | b | ≥≥≥≥ 1.
10/15/2012
21
15 October 2012Vijayamohan: CDS MPhil: Time Series 1 41
To recap,
Negative root ⇒⇒⇒⇒ Oscillatory
Positive root ⇒⇒⇒⇒ Non-oscillatory
Absolute value of the root < 1 ⇒⇒⇒⇒
Convergence.
Absolute value of the root ≥≥≥≥ 1 ⇒⇒⇒⇒
Non-convergence.
So, with unit root, |b| = 1,
No convergence: yt unstable; non-stationary.
15 October 2012Vijayamohan: CDS MPhil: Time Series 1 42
With unit root, b = 1, yt = yt–1 + ut ;
Its time path yt = ut + ut−−−−1 + …. = ΣΣΣΣui
for i = 1, 2, …, t;
cumulation (from past to the present) of all
random shocks: stochastic trend
That is, the shock persists;
the process is non-stationary:
unit root problem = non-stationarity problem
Non-stationarity :
10/15/2012
22
15 October 2012Vijayamohan: CDS MPhil: Time Series 1 43
Thus with unit root , b = 1 :
E(yt) = E(ΣΣΣΣ ui) = 0, but
var(yt) = var(ΣΣΣΣui) = tσσσσu2, for i = 1, 2, .., t,
cov(yt yt + k) = E{ΣΣΣΣui ΣΣΣΣui + k ) = tσσσσu2,
both functions of time.
Non-stationarity
yt = byt–1 + ut = ∑∑∑∑−−−−
====−−−−
1
0
t
iit
iub
15 October 2012Vijayamohan: CDS MPhil: Time Series 1 44
Time path yt will be
converging if −−−−1 < b < 1, or | b | < 1.
yt stationary
Stationarity
10/15/2012
23
15 October 2012Vijayamohan: CDS MPhil: Time Series 1 45
With | b | < 1 in yt = byt–1 + ut ;
1. E(Yt) = 0 ( = a, with an intercept)
2. Var(Yt) = σu2 /(1– b2)
3. Cov(Yt; Yt-k) = bk σu2 /(1– b2):
all constant;
independent of t:
yt : stationary process.
Stationarity :
15 October 2012Vijayamohan: CDS MPhil: Time Series 1 46
A Stationary Time Series
White noise ut
Stationary Processes: Some Examples:
10/15/2012
24
15 October 2012Vijayamohan: CDS MPhil: Time Series 1 47
Stationary Processes: Some Examples:
1. White Noise (Purely random process):
Simplest form of a time series.
The white noise process is a zero mean, constant variance collection of random variables which are uncorrelated over time.
15 October 2012Vijayamohan: CDS MPhil: Time Series 1 48
1. White Noise (Purely random process):
Yt is a white noise process if Yt = εt, where:
(a) E(εt) = 0 (zero mean assumption)(zero mean assumption)(zero mean assumption)(zero mean assumption)
(b) Var(εt) = σ2 (constant variance assumption)(constant variance assumption)(constant variance assumption)(constant variance assumption)
(c) Cov(εt; εt±±±±k) = 0 for all k; t; k ≠≠≠≠ 0: (independence of (independence of (independence of (independence of errors assumption): errors assumption): errors assumption): errors assumption): ‘No memory’ .
(d) εt, are normally distributed. are normally distributed. are normally distributed. are normally distributed. (This assumption not essential.)(This assumption not essential.)(This assumption not essential.)(This assumption not essential.)
0 50 100 150 200 250 300
-3
-2
-1
0
1
2
0 50 100 150 200 250 300
-3
-2
-1
0
1
2
10/15/2012
25
15 October 2012Vijayamohan: CDS MPhil: Time Series 1 49
A Stationary Time SeriesAR(1)
yt = 0.6yt–1 +ut
A Stationary Time Series
MA(1)yt = ut + 0.9ut–1
15 October 2012Vijayamohan: CDS MPhil: Time Series 1 50
Time series: approximated to
Autoregressive (AR) process
Moving Average (MA) process
Combination of AR and MA process – ARMA.
AR(1) process: yt = a + b yt–1 + ut .
MA(1) process: yt = ut + d ut – 1 .
ARMA(1, 1) process:
yt = a + b yt–1 + ut + d ut – 1 .
Stationary processes
10/15/2012
26
15 October 2012 Vijayamohan: CDS MPhil: Time Series 1
51