Analysis of Integrated and Cointegrated Time Series - Rmetrics [PDF]

Multivariate Time. Series. VAR. SVAR. Cointegration. SVEC. Topics left out. Monographies. R packages. Analysis of Integr

2 downloads 14 Views 1MB Size

Recommend Stories


PDF Time Series Analysis and Its Applications
If you feel beautiful, then you are. Even if you don't, you still are. Terri Guillemets

Macroeconometrics and Time Series Analysis
Never let your sense of morals prevent you from doing what is right. Isaac Asimov

Time-Frequency analysis of biophysical time series
Ask yourself: What's one thing I would like to do more of and why? How can I make that happen? Next

Analysis of Financial Time Series
Ask yourself: What is your ideal life partner like? Where can you find him/her? Next

Modulbeschreibung „Time Series Analysis“
In every community, there is work to be done. In every nation, there are wounds to heal. In every heart,

Time Series Analysis
Seek knowledge from cradle to the grave. Prophet Muhammad (Peace be upon him)

time series analysis
Ask yourself: What kind of person do you enjoy spending time with? Next

Time Series Analysis
Ask yourself: Do I feel and express enough gratitude and appreciation for what I have? Next

Time Series Analysis Ebook
Ask yourself: How can you love yourself more today? Next

Financial Time Series Analysis
You're not going to master the rest of your life in one day. Just relax. Master the day. Than just keep

Idea Transcript


Analysis of Integrated and Cointegrated Time Series Pfaff

Analysis of Integrated and Cointegrated Time Series

Univariate Time Series Definitions Representation / Models Nonstationary Processes Statistical tests

Dr. Bernhard Pfaff [email protected]

Multivariate Time Series VAR SVAR Cointegration

Invesco Asset Management Deutschland GmbH, Frankfurt am Main

SVEC

Topics left out

The 1st International R/Rmetrics User and Developer Workshop 8–12 July 2007, Meielisalp, Lake Thune, Switzerland

Monographies R packages

Contents Univariate Time Series Definitions Representation / Models Nonstationary Processes Statistical tests Multivariate Time Series VAR SVAR Cointegration SVEC

Analysis of Integrated and Cointegrated Time Series Pfaff Univariate Time Series Definitions Representation / Models Nonstationary Processes Statistical tests

Multivariate Time Series VAR SVAR Cointegration SVEC

Topics left out Monographies R packages

Topics left out Monographies R packages

Contents Univariate Time Series Definitions Representation / Models Nonstationary Processes Statistical tests Multivariate Time Series VAR SVAR Cointegration SVEC

Analysis of Integrated and Cointegrated Time Series Pfaff Univariate Time Series Definitions Representation / Models Nonstationary Processes Statistical tests

Multivariate Time Series VAR SVAR Cointegration SVEC

Topics left out Monographies R packages

Topics left out Monographies R packages

Contents Univariate Time Series Definitions Representation / Models Nonstationary Processes Statistical tests Multivariate Time Series VAR SVAR Cointegration SVEC

Analysis of Integrated and Cointegrated Time Series Pfaff Univariate Time Series Definitions Representation / Models Nonstationary Processes Statistical tests

Multivariate Time Series VAR SVAR Cointegration SVEC

Topics left out Monographies R packages

Topics left out Monographies R packages

Contents Univariate Time Series Definitions Representation / Models Nonstationary Processes Statistical tests Multivariate Time Series VAR SVAR Cointegration SVEC

Analysis of Integrated and Cointegrated Time Series Pfaff Univariate Time Series Definitions Representation / Models Nonstationary Processes Statistical tests

Multivariate Time Series VAR SVAR Cointegration SVEC

Topics left out Monographies R packages

Topics left out Monographies R packages

Contents Univariate Time Series Definitions Representation / Models Nonstationary Processes Statistical tests Multivariate Time Series VAR SVAR Cointegration SVEC

Analysis of Integrated and Cointegrated Time Series Pfaff Univariate Time Series Definitions Representation / Models Nonstationary Processes Statistical tests

Multivariate Time Series VAR SVAR Cointegration SVEC

Topics left out Monographies R packages

Topics left out Monographies R packages

Univariate Time Series Overview

Analysis of Integrated and Cointegrated Time Series Pfaff Univariate Time Series Definitions Representation / Models Nonstationary Processes Statistical tests

Definitions Representations / Models Nonstationary processes Statistical tests

Multivariate Time Series VAR SVAR Cointegration SVEC

Topics left out Monographies R packages

Analysis of Integrated and Cointegrated Time Series

Definitions Stochastic Process

Pfaff Univariate Time Series Definitions

Time Series

Representation / Models

A discrete time series is defined as an ordered sequence of random numbers with respect to time. More formally, such a stochastic process can be written as:

Nonstationary Processes Statistical tests

Multivariate Time Series VAR SVAR

{y (s, t), s ∈ S, t ∈ T} ,

Cointegration

(1)

SVEC

Topics left out

where for each t ∈ T, y (·, t) is a random variable on the sample space S and a realization of this stochastic process is given by y (s, ·) for each s ∈ S with regard to a point in time t ∈ T.

Monographies R packages

Analysis of Integrated and Cointegrated Time Series

Definitions Stochastic Process – Examples

Pfaff

7.0

25

Univariate Time Series Definitions

20

Nonstationary Processes

15

Statistical tests

Multivariate Time Series

10

6.0

VAR SVAR 5

5.5

logarithm of real gnp

6.5

unemployment rate in percent

Representation / Models

5.0

Cointegration SVEC 1920

1940

1960

1980

1920

1940

1960

1980

Topics left out Monographies

Figure: U.S. GNP > > > > > >

Figure: U.S. unemployment rate

library(urca) , xlab = "") abline(a=5, b=0.5, col = "red")

Representation / Models Nonstationary Processes Statistical tests

80 60

VAR SVAR

SVEC

40

Cointegration

Topics left out

20

y.tsar2

100

120

Multivariate Time Series

Monographies

0

> > + > >

0

50

100

150

200

250

Time

Figure: Trend-stationary series

R packages

Analysis of Integrated and Cointegrated Time Series

Nonstationary Processes Difference Stationary Time Series

Pfaff

Definition The series yt is difference stationary if φ(z) = 0 has one root on the unit circle and the others are outside the unit circle.

Univariate Time Series Definitions Representation / Models Nonstationary Processes Statistical tests

θ(L) can be factored as

Multivariate Time Series VAR

φ(L) = (1 − L)φ∗ (L) whereby

(11)

SVAR Cointegration SVEC

φ∗ (z) = 0 has all p − 1 roots outside the unit circle. ∆Zt is stationary and has an ARMA(p-1, q) representation. If Zt is difference stationary, then Zt is integrated of order one: Zt ∼ I (1). P Recursive substitution yields: yt = y0 + tj=1 uj .

Topics left out Monographies R packages

Analysis of Integrated and Cointegrated Time Series

Nonstationary Processes Difference Stationary Time Series – Example

Pfaff Univariate Time Series Definitions

I(1) process without drift 80

Representation / Models

40

Nonstationary Processes Statistical tests

0

set.seed(12345) u.ar2 > > > + > + >

R Output

100 200

R code

0

50

100

150

200

250

Monographies R packages

Figure: Difference-stationary series

Note: If ut ∼ IWN(0, σ 2 ), then yt is a random walk.

Analysis of Integrated and Cointegrated Time Series

Statistical tests Unit Root vs. Stationarity Tests

Pfaff Univariate Time Series

General Remarks

Definitions

Consider, the following trend-cycle decomposition of a time series yT : yt = TDt + Zt = TDT + TSt + Ct with

(12)

Representation / Models Nonstationary Processes Statistical tests

Multivariate Time Series VAR SVAR Cointegration

TDt signifies the deterministic trend, TSt is the stochastic trend and Ct is a stationary component. Unit root tests: H0 : TSt 6= 0 vs. H1 : TSt = 0, that is yt ∼ I (1) vs. yt ∼ I (0). Stationarity tests: H0 : TSt = 0 vs. H1 : TSt 6= 0, that is yt ∼ I (0) vs. yt ∼ I (0).

SVEC

Topics left out Monographies R packages

Analysis of Integrated and Cointegrated Time Series

Autoregressive unit root tests General Remarks

Pfaff Univariate Time Series

Tests are based on the following framework:

Definitions Representation / Models

yt = φyt−1 + ut , ut ∼ I (0)

(13)

Nonstationary Processes Statistical tests

Multivariate Time Series VAR

H0 : φ = 1, H1 : |φ| < 1

SVAR Cointegration SVEC

Tests: ADF- and PP-test. ADF: Serial correlation in ut is captured by autoregressive parametric structure of test. PP: Non-parametric correction based on estimated long-run variance of ∆yt .

Topics left out Monographies R packages

Analysis of Integrated and Cointegrated Time Series

Autoregressive unit root tests Augmented Dickey-Fuller Test, I

Pfaff

Test Regression

Univariate Time Series

0

p X

0

j=1 p X

yt = β Dt + φyt−1 +

Definitions Representation / Models

ψj ∆yt−j + ut ,

(14)

Nonstationary Processes Statistical tests

∆yt = β Dt + πyt−1 +

Multivariate Time Series

ψj ∆yt−j + ut with π = φ − 1

(15)

VAR SVAR

j=1

Cointegration SVEC

Topics left out

Test Statistic

Monographies R packages

φˆ − 1 , SE (φ) π ˆ = . SE (π)

ADFt : tφ=1 =

(16)

ADFt : tπ=0

(17)

Autoregressive unit root tests Augmented Dickey-Fuller Test, II

Analysis of Integrated and Cointegrated Time Series Pfaff

R Resources

Univariate Time Series Definitions

Function ur.df in package urca.

Representation / Models Nonstationary Processes

Function ADF.test in package uroot. Function adf.test in package tseries. Function urdfTest in package fSeries.

Statistical tests

Multivariate Time Series VAR SVAR Cointegration SVEC

Topics left out

Literature Dickey, D. and W. Fuller, Distribution of the Estimators for Autoregressive Time Series with a Unit Root, Journal of the American Statistical Society, 74 (1979), 427–341. Dickey, D. and W. Fuller, Likelihood Ratio Statistics for Autoregressive Time Series with a Unit Root, Econometrica, 49, 1057–1072. Fuller, W., Introduction to Statistical Time Series, 2nd Edition, 1996, New York: John Wiley. MacKinnon, J., Numerical Distribution Functions for Unit Root and Cointegration Tests, Journal of Applied Econometrics, 11 (1996), 601-618.

Monographies R packages

Analysis of Integrated and Cointegrated Time Series

Autoregressive unit root tests Augmented Dickey-Fuller Test, III

Pfaff

R code

Univariate Time Series

library(urca) y1.adf.nc.2 + > + >

R Output

0

50

100

250

Multivariate Time Series SVAR Cointegration SVEC

0.00

Partial ACF

0.8

Topics left out

−0.10

10pct −1.62 −1.62

ACF

5pct −1.95 −1.95

0.4

1pct −2.58 −2.58

Partial Autocorrelations of Residuals 0.10

Autocorrelations of Residuals

0.0

Statistic 0.85 −8.14

200

VAR

R Output y1 ∆y1

150

0

5

10 Lag

15

20

5

10

15

20

Monographies

Lag

R packages

Table: ADF-test results Figure: Residual plot of y 1 ADF-regression

Note: Use critical values of Dickey & Fuller, Fuller or MacKinnon.

Analysis of Integrated and Cointegrated Time Series

Autoregressive unit root tests Phillips & Perron Test, I

Pfaff Univariate Time Series

Test Regression

Definitions Representation / Models

∆yt = β 0 Dt + πyt−1 + ut , ut ∼ I (0)

(18)

Nonstationary Processes Statistical tests

Multivariate Time Series VAR

Test Statistic

SVAR Cointegration SVEC

 Zt =

σ ˆ2 ˆ2 λ

1/2

Zπ = T π ˆ−

1 · tπ=0 − 2

ˆ2 − σ λ ˆ2 ˆ2 λ

!   T · SE (ˆ π) , · σ ˆ2

T 2 · SE (ˆ π) ˆ2 · (λ − σ ˆ2) . 2ˆ σ2

ˆ and σ λ ˆ signify consistent estimates of the error variance.

Topics left out

(19)

Monographies R packages

(20)

Autoregressive unit root tests Phillips & Perron Test, II

Analysis of Integrated and Cointegrated Time Series Pfaff Univariate Time Series

R Resources

Definitions Representation / Models Nonstationary Processes

Function ur.pp in package urca. Function pp.test in package tseries.

Statistical tests

Multivariate Time Series VAR

Function urppTest in package fSeries.

SVAR

Function PP.test in package stats.

SVEC

Cointegration

Topics left out Monographies

Literature Phillips, P.C.B., Time Series Regression with a Unit Root, Econometrica, 55, 227–301. Phillips, P.C.B. and P. Perron, Testing for Unit Roots in Time Series Regression, Biometrika, 75, 335–346.

R packages

Analysis of Integrated and Cointegrated Time Series

Autoregressive unit root tests Phillips & Perron Test, III

Pfaff

R code

Univariate Time Series Definitions

80

Diagram of fit for model with intercept and trend

40

Representation / Models Nonstationary Processes

0

library(urca) y1.pp.ts + > + >

R Output

0

50

100

150

200

250

Statistical tests

Multivariate Time Series

2

Residuals

VAR

−2 0

R Output

SVAR 0

50

100

150

200

250

Cointegration SVEC

0

5

10 Lag

15

20

Topics left out

0.6

10pct −3.14 −3.14

0.2

5pct −3.43 −3.43

Partial ACF

1pct −4.00 −4.00

Partial Autocorrelations of Residuals

−0.2

Statistic −2.04 −7.19

ACF

y1 ∆y1

0.0 0.4 0.8

Autocorrelations of Residuals

Monographies 5

10

15 Lag

Table: PP-test results Figure: Residual plot of y 1 PP-regression

Note: Same asymptotic distribution as ADF-Tests.

20

R packages

Autoregressive unit root tests Remarks

Analysis of Integrated and Cointegrated Time Series Pfaff Univariate Time Series Definitions Representation / Models Nonstationary Processes

ADF and PP test are asymptotically equivalent. PP has better small sample properties than ADF.

Statistical tests

Multivariate Time Series VAR

Both have low power against I (0) alternatives that are close to being I (1) processes.

SVAR Cointegration SVEC

Topics left out

Power of the tests diminishes as deterministic terms are added to the test regression.

Monographies R packages

Analysis of Integrated and Cointegrated Time Series

Efficient unit root tests Elliot, Rothenberg & Stock, I

Pfaff

Model

Univariate Time Series Definitions

yt = dt + ut , ut = aut−1 + vt

(21) (22)

Representation / Models Nonstationary Processes Statistical tests

Multivariate Time Series VAR SVAR Cointegration

Test Statistics

SVEC

Topics left out

Point optimal test: PT =

Monographies

S(a = ¯a) − ¯aS(a = 1) , ω ˆ2

R packages

(23)

DF-GLS test: d d d ∆ytd = α0 yt−1 + α1 ∆yt−1 + . . . + αp ∆yt−p + εt

(24)

Efficient unit root tests Elliot, Rothenberg & Stock, II

Analysis of Integrated and Cointegrated Time Series Pfaff Univariate Time Series Definitions Representation / Models

R Resources Function ur.ers in package urca.

Nonstationary Processes Statistical tests

Multivariate Time Series VAR

Function urersTest in package fSeries.

SVAR Cointegration SVEC

Literature Elliot, G., T.J. Rothenberg and J.H. Stock, Efficient Tests for an Autoregressive Time Series with a Unit Root, Econometrica, 64 (1996), 813–836.

Topics left out Monographies R packages

Analysis of Integrated and Cointegrated Time Series

Efficient unit root tests Elliot, Rothenberg & Stock, III

Pfaff

Definitions Representation / Models Nonstationary Processes Statistical tests

Multivariate Time Series

1500

library(urca) set.seed(12345) u.ar1 > + >

Univariate Time Series

R Output

R code

Cointegration

500

SVEC

Topics left out

R Output 0

Monographies 0

ERS ADF

Statistic 33.80 −1.40

1pct 3.96 −3.99

5pct 5.62 −3.43

Table: ERS / ADF-tests

10pct 6.89 −3.13

50

100

150

200

250

Figure: Near I (1) process

R packages

Unit Root Tests, other Schmidt & Phillips, I

Analysis of Integrated and Cointegrated Time Series Pfaff Univariate Time Series Definitions Representation / Models

Problem of DF-type tests: nuisance parameters, i.e., the coefficients of the deterministic regressors, are either not defined or have a different interpretation under the alternative hypothesis of stationarity.

Nonstationary Processes Statistical tests

Multivariate Time Series VAR SVAR Cointegration

Solution: LM-type test, that has the same set of nuisance parameters under both the null and alternative hypothesis.

SVEC

Topics left out Monographies R packages

Higher polynomials than a linear trend are allowed.

Analysis of Integrated and Cointegrated Time Series

Unit Root Tests, other Schmidt & Phillips, II

Pfaff

Model yt = α + Zt δ + xt

with

xt = πxt−1 + εt

(25)

Univariate Time Series Definitions Representation / Models Nonstationary Processes Statistical tests

Test Regression

Multivariate Time Series VAR

∆yt = ∆Zt γ + φS˜t−1 + vt

(26)

SVAR Cointegration SVEC

Topics left out Monographies

Test Statistics

R packages

ρ˜ T φ˜ = 2 2 ω ˆ ω ˆ τ˜ = 2 ω ˆ

Z (ρ) = Z (τ )φ=0

(27) (28)

Unit Root Tests, other Schmidt & Phillips, III

Analysis of Integrated and Cointegrated Time Series Pfaff Univariate Time Series Definitions Representation / Models

R Resources Function ur.sp in package urca.

Nonstationary Processes Statistical tests

Multivariate Time Series VAR

Function urspTest in package fSeries.

SVAR Cointegration SVEC

Literature Schmidt, P. and P.C.B. Phillips, LM Test for a Unit Root in the Presence of Deterministic Trends, Oxford Bulletin of Economics and Statistics, 54(3) (1992), 257-287.

Topics left out Monographies R packages

Analysis of Integrated and Cointegrated Time Series

Unit Root Tests, other Schmidt & Phillips, IV

Pfaff

R code

Definitions

set.seed(12345) y1 > > +

Univariate Time Series

R Output

3000

SVAR Cointegration SVEC

2000

R Output

1000

Topics left out

0

Monographies

Z (τ ) Z (ρ)

Statistic −2.53 −12.70

1pct −4.08 −32.40

5pct −3.55 −24.80

Table: S & P tests

10pct −3.28 −21.00

0

50

100

150

200

Figure: I(1)-process with polynomial trend

250

R packages

Unit Root Tests, other Zivot & Andrews, I

Analysis of Integrated and Cointegrated Time Series Pfaff Univariate Time Series Definitions

Problem: Difficult to statistically distinguish between an I (1)–series from a stable I (0) that is contaminated by a structrual shift. If break point is known: Perron and Perron & Vogelsang tests. But risk of , season=4) lttest.1 > > > + > + + + > + + + > + > +

data(UKpppuip) attach(UKpppuip) dat1

Smile Life

When life gives you a hundred reasons to cry, show life that you have a thousand reasons to smile

Get in touch

© Copyright 2015 - 2024 PDFFOX.COM - All rights reserved.