Time Series Analysis

advertisement
Time Series Analysis
Definition of a Time Series process
AR, MA, ARMA, ARIMA
Vector Autoregression
Impulse Response
Forecasting
1
Four Components of a Time Series
Time Series
yt   t   t   t   t   t
Trend
 t ~ NID0,  2 
 t   t 1   t 1  t
 t   t 1   t
Season
 t   t 1  ..   t s 1   t
 j ,t   cos  j
 *    sin 
j
 j ,t  
Cycle
sin  j   j ,t 1   j ,t 

cos  j  *j ,t 1   *j ,t 
 t 
 cos c
 *     sin 
c
 t

Random
sin c   j ,t 1   t 
  *


* 
cos c    t 1   t 
 t   v t 1   t
 t ~ NID0, 2 
 t ~ NID0,  2 
 t ~ NID0,  w2 
j  1,..., s / 2
t  1,...., T
t  1,...., T
0    1
 t ~ NID0, 2 
2
Iterative Substitution in AR(1) Model
yt  y
v
t 1 t
y
 y
v
t 1
t 2
t 1
y
 y
v
t 2
t 3 t 3
y
 y
v
t 3
t 4
t 4
. …
…
yt n  y
v
t  n 1 t  n
(5)
From substitution
yt  y
v =
t 1 t

2
yt    y
v

v


yt 2

t
t 2
t  1


vt 1  vt

yt    y
v
 vt

t 3
t 2

yt   2 yt 3  vt 2   vt 1  vt   3 yt 3   2vt 2  vt 1  vt
3
AR(1) Time Series as a Function of Past Innovations (Impulses or Shocks)
yt   n yt n   n1
 ...   3 y   2v  v
t n1
t 3
t 2
t
(6)
 yt n
n
In the limit the term
n  .
becomes close to zero as
 
Rearranging (6) we can write yt in terms of current
and past values of error terms
yt  vt  v   2v   3v   4v  ...   n1 t 
t 1
t 2
t 3
t 4
(7)
4
Time Dependent Variance
What is the mean of
yt  in (7)?




2 
3 
4 
n1E 

E  yt   E  vt   E  v
   E v
   E v
   E v
  ...  


 
 t n 
 t 1 
 t 2
 t 3 
 t 4

2 



v
~
N
0
,


 ; E  yt   0
Because of assumption t
v


What is the variance of yt  ?
  








Var yt   Var  vt   v
 2 v
 3 v
 4 v
 ...   n 1  t  n


t 1
t 2
t 3
t 4


 if   1
and


if there is no autocorrelation among the random terms E  vt vt  1   0
Var yt    v2   v2   v2  .....  v2  t. v2


Thus the variance of Y term increases with time. This makes this series non
stationary.
Rule of thumb : A series is non-stationary if   1.
A series is stationary if
  1.
5
Dicky-Fuller and Augmented Dicky-Fuller Tests
yt  y
 vt
t 1
yt  1   y
 vt ;
t 1
Random Walk:
yt  y
 vt
t 1
Random Walk with a drift (intercept):
yt    y
 vt
0
t 1
Trend stationary process
Null hypotheses:
There is unit root and time
series in non-stationary
=0  (1-)=0
Alternative hypothesis:
There is no unit root and
time series is stationary
<0  (1-)<0  <1
yt     t  y
 vt
0 1
t 1
Augmented Dicky Fuller Test
yt     t  y

0 1
t 1
m
a y
 vt
i t i
i 1

6
Moving Average-MA Process
Yt    et   e
1 t 1
E yt   
var yt   var(   et   e )   e2 1   
1 t 1
1

cov(YtY )  E ( yt   )( y
  )   e21
t 1
t 1
Autocorrelation function: it tapers off after k lags
2
cov yt y 


e
t 1 

1
 
k
var yt 
 e2 1   2 
1

Some examples of MA (1) process:
Yt    et  0.8e
t 1
Yt    et  0.8e
t 1
7
Yt    et   e
1 t 1
E yt   
MA(2)
Process
 e
2
t 2


2
2
2

var yt   var(   et   e   2e )   e 1     
1 t 1
t 2
2
1


cov(YtY )  E ( yt   )( y
  )   e2     
t 1
t 1
1 2
 1
cov(YtY )  E ( yt   )( y
  )   2 e2
t 2
t 2
cov(YtY )  0
t 3
 1   
cov yt y 
t 1  1
2

1 
var yt 

2
2
1     
1
2

cov yt y 

t

2


1
2 

; k
var yt 


2
2
1     
1
2

0
MA(2) process has tow period long memory.
8
Autoregressive Process
Yt     y  et
1 t 1

E yt   E  y   .....  E  y

 t 1 
 t k 
E Yy   E    y
e 
1 t 1 t 

     ;  
1

1 
1
2

2
e
var yt  
=>  y 
1  2
1
cov(YtY )  E ( yt  E  yt )( y
 E  yt )    2




t 1
t 1
1 y
var  y
 et 
1
t

1


Some examples:
Yt  0.8 y  et
t 1
Yt  0.8 y  et
t 1
Convergence occurs if 1  1 . The series is called
stationary.
9
ARMA(1,1) Process
Yt     y
 e  e
1 t  1 t 1 t 1
var yt  
E 

yt   
2




E 



2

  y  et   e 
1 t 1
1 t 1



2   2   2 2  2  E  y e 
e
1 0
1 e
1 1  t 1 t 1
=
10
Co-integration
If two economic variables have long-run equilibrium
relationship linear combination of these variables may be
stationary even if the individual series may be non
stationary. These two variables are said to be co-integrated
to each other.
Suppose yt is consumption and X t is disposable income.
et  Yt     X t
1 2
Even if yt and X t are I(1)
et
is I(0).
et    e  vt
0
t 1
If  is zero then series et is stationary and
I(1).
yt
and X t are
11
Error Correction Model
yt    Yt     X t  vt
1 2
1 2








The term in the parenthesis is the error term and the
coefficient  2 governs the speed of adjustment towards
long-run equilibrium.
12
Structure of a VAR Model
P
P
r
P
j 1
j 1
j 1
j 1
y1,t  a10   a11 j y1,t  j  ..   a1nj y n,t  j   b11 j x1,t  j  ..   b1mj xm,t  j  e1t
.
.
.
P
P
r
P
j 1
j 1
j 1
j 1
y n,t  an 0   an1 j y1,t  j  ..   annj y n,t  j   b11 j x1,t  j  ..   b1mj xm,t  j  ent
Simple Example
y t  a10  a11 y1t 1  a12 y 2,t  2  b11 xt 1  b12 xt  2  e1t
xt  a 20  a 21 y1t 1  a 22 y 2,t  2  b21 x1,t 1  b22 xt  2  e2t
13
Impulse Response Analysis in a VAR Model
 yt   a11 a12   y1t 1  b11 b12   x1t 1   e1t 

 
 x   a






 t   21 a22   y 2t 2  b21 b22   xt 2  e2t 
 yt   a11
 x   a
 t   21
a12 b11
a 22 b21
 y1t 1 
b12   y 2t 2   e1t 
 

b22   x1t 1  e2t 


 xt  2 
Y  I  A BX  I  A U
1
1
X  I  B  AY  I  B  U
1
0 
Y0   
1 
1
Y1  I  A
1
0 
1
 
Y2  I  A Y1  I  A
1
1
 I  A
1
0
1
 14
Stamp Program for Time Series Analysis
Estimation sample is 1971. 2 - 2000. 1. (T = 116, n = 111).
Log-Likelihood is 250.781 (-2 LogL = -501.563).
Prediction error variance is 0.0106071
Summary statistics
ER
Std.Error
0.10299
Normality
9.9490
H( 37)
0.58124
r( 1)
0.0039775
r( 9)
-0.10584
DW
1.9721
Q( 9, 6)
7.2307
Rs^2
-0.41360
ER = Trend + Trigo seasonal + Expl vars + Irregular
Eq 3 : Estimated coefficients of final state vector.
Variable Coefficient R.m.s.e.
t-value
Lvl
1.2519
0.26875
4.6583 [ 0.0000]
Slp
-0.0056233 0.0082428 -0.68221 [ 0.4965]
Sea_ 1
0.0026817 0.0081813
0.32779 [ 0.7437]
Sea_ 2
0.0017017 0.0081876
0.20784 [ 0.8357]
Sea_ 3
-0.00036460 0.0040829 -0.089298 [ 0.9290
Eq 3 : Estimated coefficients of explanatory variables.
Variable Coefficient R.m.s.e.
t-value
ER_1
0.22213 0.096664
2.298 [ 0.0234]
ER_2
-0.070019 0.099049 -0.70692 [ 0.4811]
ER_3
0.027285 0.099054
0.27545 [ 0.7835]
ER_4
0.035090 0.096723
0.36279 [ 0.7174]
Eq 3 : Seasonal analysis (at end of period).
Seasonal Chi^2( 3) test is 0.173462 [0.9818].
Seas 1 Seas 2 Seas 3 Seas 4
Value
0.0023171 0.0020663 -0.0030463 -0.0013371
15
Forecasting of the Exchange Rate
2.00
F-ER
Forecast
1.75
1.50
1.25
1985
2.00
F-ER
1990
1995
2000
2005
1990
1995
2000
2005
2000
16
2005
F-TrendX_ER
1.75
1.50
1.25
1985
F-Seas_ER
0.002
0.000
-0.002
1985
1990
1995
References
•
Burns, A and W. Michell, (1946), “Measuring Business Cycles” NBER, New York.
•
•
•
Campbell J. Y. and R.J. Shiller (1987) Cointegration and Tests of Present Value Models, Journal of Political Economy, 95, 5, pp. 1062-1087.
Cooley and Thomas F. and S.F. LeRoy (1985) Atheoretical Macroeconometrics, Journal of Monetary Economics, North Holland 16: 283-308.
Dickey D.A. and W.A. Fuller (1979) Distribution of the Estimator for Autoregressive Time Series with a Unit Root, Journal of the American Statistical
Association, June.
Dickey D.A. and W. A. Fuller (1981) Likelihood Ratio Statistics for Autoregressive Time Series with a Unit Root, Econometrics, 49:4 July, 1057-1071.
Engle R E and C.W.J. Granger (1987) Co-integration and Error Correction: Representation, Estimation and Testing. Econometrica, vol. 55, No. 2, pp.
251-276.
Enders W. (1995) Applied Econometric Time Series, John Wiley and Sons
Fair R.C.(1984) Specification, Estimation, and Analysis of Macroeconomic Models, Harvard.
Garratt A., K. Lee, M.H. Pesaran and Y. Shin (2003) A Structural Cointegration VAR Approach to Macroeconometric Modelling, Economic Journal.
Cooly Thomas F (1995) Frontiers of Business Cycle Research, Princeton.
Doornik J.A and D.F. Hendry (2003) Econometric Modelling Using PCGive Volumes I, II and II, Timberlake Consultant Ltd, London.
Hendry D.F. (1997) Dynamic Econometrics, Oxford University Press.
Harris R. and R. Sollis (2003) Applied Time Series Modelling and Forecasting, John Willey.
Holly S and M Weale Eds.(2000) Econometric Modelling: Techniques and Applications, pp.69-93, the Cambridge University Press.
Johansen Soren (1988) Estimation and Hypothesis Testing of Cointegration Verctors in Gaussian Vector Autoregressive Models, Econometrica, 59:6,
1551-1580.
Johansen Soren (1988) Statistical Analysis of Cointegration Vectors, Journal of Economic Dynamics and Control 12 231-254, North Holland.
Nelson C. R. and C. I. Plosser (1982) Trends and Random Walks in Macroeconomic
Time Series: Some Evidence and Implications, Journal of Monetary Economics.
Pagan A. and M. Wickens (1989) A Survey of Some Recent Econometric Methods, Economic Journal, 99 pp. 962-1025.
Phillips P.C.B. (1987) Time Series Regression with an Unit Root, Econometrica, vol. 55, No. 2, 277-301.
Prescott, E.C. (1986), “Theory Ahead of Business Cycle Measurement,” Federal Reserve Bank of
Minneapolis, Quarterly Review; Fall.
Pindyck R.S and Robinfeld D.L. (1998) Econometric Models and Economic Forecasts, 4th edition, McGraw Hill.
Quah, D.T., (1995), “Business Cycle Empirics: Calibration and Estimation,” The Economic Journal 105 (November) 1594-1596
Sims Christopher A (1980) Macroeconomics and Reality, 48:1 January, pp. 1-45.
Wallis KF. (1989) Macroeconomic Forecasting: A Survey, Economic Journal, 99, March, pp 28-61.
Wallis Kenneth (1980) Econometric Implications of the Rational Expectations
Hypothesis, Econometrics 48:1, pp, 48-71.
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
17
Download