Threshold cointegration in R with package tsDyn Matthieu Stigler - - PowerPoint PPT Presentation

threshold cointegration in r with package tsdyn
SMART_READER_LITE
LIVE PREVIEW

Threshold cointegration in R with package tsDyn Matthieu Stigler - - PowerPoint PPT Presentation

Threshold cointegration in R with package tsDyn Matthieu Stigler Matthieu.Stigler at gmail.com 8 July 2009 National Institute for Public Finance and Policy, India Agroscope, Federal Office for Agriculture, Switzerland Matthieu Stigler


slide-1
SLIDE 1

Threshold cointegration in R with package tsDyn

Matthieu Stigler Matthieu.Stigler at gmail.com 8 July 2009

National Institute for Public Finance and Policy, India Agroscope, Federal Office for Agriculture, Switzerland

Matthieu Stigler Matthieu.Stigler at gmail.com () Threshold cointegration in R with package tsDyn 8 July 2009 1 / 26

slide-2
SLIDE 2

Outline

1

Cointegration (linear)

2

Threshold cointegration

3

Areas of application

4

Implementation in R

Matthieu Stigler Matthieu.Stigler at gmail.com () Threshold cointegration in R with package tsDyn 8 July 2009 2 / 26

slide-3
SLIDE 3

Outline

1

Cointegration (linear)

2

Threshold cointegration

3

Areas of application

4

Implementation in R

Matthieu Stigler Matthieu.Stigler at gmail.com () Threshold cointegration in R with package tsDyn 8 July 2009 3 / 26

slide-4
SLIDE 4

Background

Non-stationnary variables with unit root: I(1) Spurious regression when I(1) regressed on I(1):

◮ R2 → 1 ◮ Statistical dependance among independant variables ◮ Wrong conclusions! Matthieu Stigler Matthieu.Stigler at gmail.com () Threshold cointegration in R with package tsDyn 8 July 2009 4 / 26

slide-5
SLIDE 5

Background

Non-stationnary variables with unit root: I(1) Spurious regression when I(1) regressed on I(1):

◮ R2 → 1 ◮ Statistical dependance among independant variables ◮ Wrong conclusions! Matthieu Stigler Matthieu.Stigler at gmail.com () Threshold cointegration in R with package tsDyn 8 July 2009 4 / 26

slide-6
SLIDE 6

Cointegration

Definition (Cointegration (Engle, Granger 1982))

If two (or more) variables are non-stationary, but there exist a linear combination of them which is stationary, there are said to be cointegrated

Example

X and Y as I(1), Take Xt − aYt = εt X and Y cointegrated ⇔ ε is I(0)

Matthieu Stigler Matthieu.Stigler at gmail.com () Threshold cointegration in R with package tsDyn 8 July 2009 5 / 26

slide-7
SLIDE 7

Cointegration

Definition (Cointegration (Engle, Granger 1982))

If two (or more) variables are non-stationary, but there exist a linear combination of them which is stationary, there are said to be cointegrated

Example

X and Y as I(1), Take Xt − aYt = εt X and Y cointegrated ⇔ ε is I(0)

Matthieu Stigler Matthieu.Stigler at gmail.com () Threshold cointegration in R with package tsDyn 8 July 2009 5 / 26

slide-8
SLIDE 8

Interest of linear cointegration

Stable long-run relationship between random walk variables. Error-correction mechanisms pushing deviations back towards the long-run equilibirum.

Example (VECM model with cointegrated variables)

  • ∆Xt

∆Yt

  • =

0.02

−0.01

  • +

−0.01

0.08

  • ECTt−1 + ( 0.04 0.02

0.31 0.07 )

  • ∆Xt−1

∆Yt−1

  • Where ECT (error-correction term) represents deviations

from the long-run relationship ECTt−1 = Yt − bXt

Matthieu Stigler Matthieu.Stigler at gmail.com () Threshold cointegration in R with package tsDyn 8 July 2009 6 / 26

slide-9
SLIDE 9

Interest of linear cointegration

Stable long-run relationship between random walk variables. Error-correction mechanisms pushing deviations back towards the long-run equilibirum.

Example (VECM model with cointegrated variables)

  • ∆Xt

∆Yt

  • =

0.02

−0.01

  • +

−0.01

0.08

  • ECTt−1 + ( 0.04 0.02

0.31 0.07 )

  • ∆Xt−1

∆Yt−1

  • Where ECT (error-correction term) represents deviations

from the long-run relationship ECTt−1 = Yt − bXt

Matthieu Stigler Matthieu.Stigler at gmail.com () Threshold cointegration in R with package tsDyn 8 July 2009 6 / 26

slide-10
SLIDE 10

Interest of linear cointegration

Stable long-run relationship between random walk variables. Error-correction mechanisms pushing deviations back towards the long-run equilibirum.

Example (VECM model with cointegrated variables)

  • ∆Xt

∆Yt

  • =

0.02

−0.01

  • +

−0.01

0.08

  • ECTt−1 + ( 0.04 0.02

0.31 0.07 )

  • ∆Xt−1

∆Yt−1

  • Where ECT (error-correction term) represents deviations

from the long-run relationship ECTt−1 = Yt − bXt

Matthieu Stigler Matthieu.Stigler at gmail.com () Threshold cointegration in R with package tsDyn 8 July 2009 6 / 26

slide-11
SLIDE 11

Interest of linear cointegration

Stable long-run relationship between random walk variables. Error-correction mechanisms pushing deviations back towards the long-run equilibirum.

Example (VECM model with cointegrated variables)

  • ∆Xt

∆Yt

  • =

0.02

−0.01

  • +

−0.01

0.08

  • ECTt−1 + ( 0.04 0.02

0.31 0.07 )

  • ∆Xt−1

∆Yt−1

  • Whith ECTt−1 = Yt − bXt

Matthieu Stigler Matthieu.Stigler at gmail.com () Threshold cointegration in R with package tsDyn 8 July 2009 7 / 26

slide-12
SLIDE 12

The assumption of linearity

Implicit assumption: every small/big deviation from equilibirum leads to instantaneous correction. But economic theory suggests: Transaction costs (no adjustment when: deviations < transaction costs) Stickiness of the price Asymetries: +/− deviations don’t lead to same effect

Matthieu Stigler Matthieu.Stigler at gmail.com () Threshold cointegration in R with package tsDyn 8 July 2009 8 / 26

slide-13
SLIDE 13

The assumption of linearity

Implicit assumption: every small/big deviation from equilibirum leads to instantaneous correction. But economic theory suggests: Transaction costs (no adjustment when: deviations < transaction costs) Stickiness of the price Asymetries: +/− deviations don’t lead to same effect

Matthieu Stigler Matthieu.Stigler at gmail.com () Threshold cointegration in R with package tsDyn 8 July 2009 8 / 26

slide-14
SLIDE 14

Outline

1

Cointegration (linear)

2

Threshold cointegration

3

Areas of application

4

Implementation in R

Matthieu Stigler Matthieu.Stigler at gmail.com () Threshold cointegration in R with package tsDyn 8 July 2009 9 / 26

slide-15
SLIDE 15

The threshold autoregressive (TAR) model

Linear model: AR : εt = ρεt−1 + ut Regime-specific dynamics in the Threshold Autoregressive (TAR) model: TAR(2) : εt = ρLεt−1 + ut if εt−1 ≤ 0 ρHεt−1 + ut if 0 ≤ εt−1 TAR(3) : εt =    ρLεt−1 + ut if εt−1 ≤ θL ρMεt−1 + ut if θL ≤ εt−1 ≤ θH ρHεt−1 + ut if θH ≤ εt−1 Stationarity condition: |ρL| < 1, |ρH| < 1 |ρM| < ∞ (non-stationarity of middle regime doesn’t affect stationarity of whole proces)

Matthieu Stigler Matthieu.Stigler at gmail.com () Threshold cointegration in R with package tsDyn 8 July 2009 10 / 26

slide-16
SLIDE 16

The threshold autoregressive (TAR) model

Linear model: AR : εt = ρεt−1 + ut Regime-specific dynamics in the Threshold Autoregressive (TAR) model: TAR(2) : εt = ρLεt−1 + ut if εt−1 ≤ 0 ρHεt−1 + ut if 0 ≤ εt−1 TAR(3) : εt =    ρLεt−1 + ut if εt−1 ≤ θL ρMεt−1 + ut if θL ≤ εt−1 ≤ θH ρHεt−1 + ut if θH ≤ εt−1 Stationarity condition: |ρL| < 1, |ρH| < 1 |ρM| < ∞ (non-stationarity of middle regime doesn’t affect stationarity of whole proces)

Matthieu Stigler Matthieu.Stigler at gmail.com () Threshold cointegration in R with package tsDyn 8 July 2009 10 / 26

slide-17
SLIDE 17

The threshold autoregressive (TAR) model

Linear model: AR : εt = ρεt−1 + ut Regime-specific dynamics in the Threshold Autoregressive (TAR) model: TAR(2) : εt = ρLεt−1 + ut if εt−1 ≤ 0 ρHεt−1 + ut if 0 ≤ εt−1 TAR(3) : εt =    ρLεt−1 + ut if εt−1 ≤ θL ρMεt−1 + ut if θL ≤ εt−1 ≤ θH ρHεt−1 + ut if θH ≤ εt−1 Stationarity condition: |ρL| < 1, |ρH| < 1 |ρM| < ∞ (non-stationarity of middle regime doesn’t affect stationarity of whole proces)

Matthieu Stigler Matthieu.Stigler at gmail.com () Threshold cointegration in R with package tsDyn 8 July 2009 10 / 26

slide-18
SLIDE 18

The threshold autoregressive (TAR) model

Linear model: AR : εt = ρεt−1 + ut Regime-specific dynamics in the Threshold Autoregressive (TAR) model: TAR(2) : εt = ρLεt−1 + ut if εt−1 ≤ 0 ρHεt−1 + ut if 0 ≤ εt−1 TAR(3) : εt =    ρLεt−1 + ut if εt−1 ≤ θL ρMεt−1 + ut if θL ≤ εt−1 ≤ θH ρHεt−1 + ut if θH ≤ εt−1 Stationarity condition: |ρL| < 1, |ρH| < 1 |ρM| < ∞ (non-stationarity of middle regime doesn’t affect stationarity of whole proces)

Matthieu Stigler Matthieu.Stigler at gmail.com () Threshold cointegration in R with package tsDyn 8 July 2009 10 / 26

slide-19
SLIDE 19

50 100 150 200 −1.0 −0.5 0.0 0.5 1.0

TAR with three regimes

Time Mean reversion zone: ρ = 0.4 Mean reversion zone: ρ = 0.3 No mean reversion (random walk): ρ = 1

Matthieu Stigler Matthieu.Stigler at gmail.com () Threshold cointegration in R with package tsDyn 8 July 2009 11 / 26

slide-20
SLIDE 20

Threshold cointegration

Definition (Threshold cointegration)

If two (or more) variables are I(1), but there exist a linear combination of them which is ” threshold stationary” , there are said to be ” threshold cointegrated” Two main features: Allows no-adjustment band Allows asymetries: different +/- adjustment speeds (ρH = ρL) Threshold effects in: Long-run (LR) relationship VECM

Matthieu Stigler Matthieu.Stigler at gmail.com () Threshold cointegration in R with package tsDyn 8 July 2009 12 / 26

slide-21
SLIDE 21

Threshold effects in the VECM

Linear case

  • ∆Xt

∆Yt

  • =

0.02

−0.01

  • +

−0.01

0.08

  • ECTt−1 + ( 0.04 0.02

0.31 0.07 )

  • ∆Xt−1

∆Yt−1

  • Threshold case
  • ∆Xt

∆Yt

  • =

0.02

−0.01

  • +

   ( 0.22

1.09 ) ECT L −1

−0.01

0.02

  • ECT M

−1

−0.03

0.09

  • ECT H

−1

+ −0.10 0.04

0.02 −0.03 ∆Xt−1 ∆Yt−1

  • Note:

◮ lags can also be regime specific ◮ Same feature: adjustment band, asymetries Matthieu Stigler Matthieu.Stigler at gmail.com () Threshold cointegration in R with package tsDyn 8 July 2009 13 / 26

slide-22
SLIDE 22

Threshold effects in the VECM

Linear case

  • ∆Xt

∆Yt

  • =

0.02

−0.01

  • +

−0.01

0.08

  • ECTt−1 + ( 0.04 0.02

0.31 0.07 )

  • ∆Xt−1

∆Yt−1

  • Threshold case
  • ∆Xt

∆Yt

  • =

0.02

−0.01

  • +

   ( 0.22

1.09 ) ECT L −1

−0.01

0.02

  • ECT M

−1

−0.03

0.09

  • ECT H

−1

+ −0.10 0.04

0.02 −0.03 ∆Xt−1 ∆Yt−1

  • Note:

◮ lags can also be regime specific ◮ Same feature: adjustment band, asymetries Matthieu Stigler Matthieu.Stigler at gmail.com () Threshold cointegration in R with package tsDyn 8 July 2009 13 / 26

slide-23
SLIDE 23

Threshold effects in the VECM

Linear case

  • ∆Xt

∆Yt

  • =

0.02

−0.01

  • +

−0.01

0.08

  • ECTt−1 + ( 0.04 0.02

0.31 0.07 )

  • ∆Xt−1

∆Yt−1

  • Threshold case
  • ∆Xt

∆Yt

  • =

0.02

−0.01

  • +

   ( 0.22

1.09 ) ECT L −1

−0.01

0.02

  • ECT M

−1

−0.03

0.09

  • ECT H

−1

+ −0.10 0.04

0.02 −0.03 ∆Xt−1 ∆Yt−1

  • Note:

◮ lags can also be regime specific ◮ Same feature: adjustment band, asymetries Matthieu Stigler Matthieu.Stigler at gmail.com () Threshold cointegration in R with package tsDyn 8 July 2009 13 / 26

slide-24
SLIDE 24

Outline

1

Cointegration (linear)

2

Threshold cointegration

3

Areas of application

4

Implementation in R

Matthieu Stigler Matthieu.Stigler at gmail.com () Threshold cointegration in R with package tsDyn 8 July 2009 14 / 26

slide-25
SLIDE 25

Areas of application

Macroeconomics questions

◮ Law of one price (LOP) ◮ Purchasing power parity ◮ Exchange rate pass-through ◮ Fisher effect: nominal interest rates and inflation ◮ Usual macro: price, interest rate, income

Price transmission studies

◮ Vertically: market chains, numerous studies for agricultural products,

  • il

◮ Horizontally: market integration, similar to LOP

Financial markets

◮ Term interest theory ◮ Stock Prices and Dividends ◮ Futures market ◮ Various arbitrage markets Matthieu Stigler Matthieu.Stigler at gmail.com () Threshold cointegration in R with package tsDyn 8 July 2009 15 / 26

slide-26
SLIDE 26

Areas of application

Macroeconomics questions

◮ Law of one price (LOP) ◮ Purchasing power parity ◮ Exchange rate pass-through ◮ Fisher effect: nominal interest rates and inflation ◮ Usual macro: price, interest rate, income

Price transmission studies

◮ Vertically: market chains, numerous studies for agricultural products,

  • il

◮ Horizontally: market integration, similar to LOP

Financial markets

◮ Term interest theory ◮ Stock Prices and Dividends ◮ Futures market ◮ Various arbitrage markets Matthieu Stigler Matthieu.Stigler at gmail.com () Threshold cointegration in R with package tsDyn 8 July 2009 15 / 26

slide-27
SLIDE 27

Areas of application

Macroeconomics questions

◮ Law of one price (LOP) ◮ Purchasing power parity ◮ Exchange rate pass-through ◮ Fisher effect: nominal interest rates and inflation ◮ Usual macro: price, interest rate, income

Price transmission studies

◮ Vertically: market chains, numerous studies for agricultural products,

  • il

◮ Horizontally: market integration, similar to LOP

Financial markets

◮ Term interest theory ◮ Stock Prices and Dividends ◮ Futures market ◮ Various arbitrage markets Matthieu Stigler Matthieu.Stigler at gmail.com () Threshold cointegration in R with package tsDyn 8 July 2009 15 / 26

slide-28
SLIDE 28

Areas of application

Macroeconomics questions

◮ Law of one price (LOP) ◮ Purchasing power parity ◮ Exchange rate pass-through ◮ Fisher effect: nominal interest rates and inflation ◮ Usual macro: price, interest rate, income

Price transmission studies

◮ Vertically: market chains, numerous studies for agricultural products,

  • il

◮ Horizontally: market integration, similar to LOP

Financial markets

◮ Term interest theory ◮ Stock Prices and Dividends ◮ Futures market ◮ Various arbitrage markets Matthieu Stigler Matthieu.Stigler at gmail.com () Threshold cointegration in R with package tsDyn 8 July 2009 15 / 26

slide-29
SLIDE 29

Outline

1

Cointegration (linear)

2

Threshold cointegration

3

Areas of application

4

Implementation in R

Matthieu Stigler Matthieu.Stigler at gmail.com () Threshold cointegration in R with package tsDyn 8 July 2009 16 / 26

slide-30
SLIDE 30

Implementation in R: package tsDyn

Testing Estimation

Matthieu Stigler Matthieu.Stigler at gmail.com () Threshold cointegration in R with package tsDyn 8 July 2009 17 / 26

slide-31
SLIDE 31

Testing

  • Do we have linear cointegration?

Yes

H0: linear cointegration HA: threshold cointegration

Matthieu Stigler Matthieu.Stigler at gmail.com () Threshold cointegration in R with package tsDyn 8 July 2009 18 / 26

slide-32
SLIDE 32

Testing

  • Do we have linear cointegration?

No Yes

H0: no cointegration HA: threshold cointegration H0: linear cointegration HA: threshold cointegration

Matthieu Stigler Matthieu.Stigler at gmail.com () Threshold cointegration in R with package tsDyn 8 July 2009 19 / 26

slide-33
SLIDE 33

Testing

  • Do we have linear cointegration?

No Yes

H0: no cointegration HA: threshold cointegration H0: linear cointegration HA: threshold cointegration

Interesting case

Case of no linear but threshold cointegration!

Matthieu Stigler Matthieu.Stigler at gmail.com () Threshold cointegration in R with package tsDyn 8 July 2009 20 / 26

slide-34
SLIDE 34

5 10 15 20 25 0.00 0.10 Ftest12 Density

Test linear AR vs 1 threshold SETAR

Asymptotic Chi 2 Bootstrap Test value 10 20 30 40 50 0.00 0.04 0.08 Ftest13 Density

Test linear AR vs 2 thresholds SETAR

Asymptotic Chi 2 Bootstrap Test value

Matthieu Stigler Matthieu.Stigler at gmail.com () Threshold cointegration in R with package tsDyn 8 July 2009 21 / 26

slide-35
SLIDE 35

Estimation of the threshold

Estimation: grid search in the range of all possible values

  • 500

1000 1500 2000 2500 3000 1.24e+08 1.26e+08 1.28e+08 1.30e+08 1.32e+08 1.34e+08 Threshold Value SSR

Results of the grid search

  • Threshold Delay 0

th 1

Matthieu Stigler Matthieu.Stigler at gmail.com () Threshold cointegration in R with package tsDyn 8 July 2009 22 / 26

slide-36
SLIDE 36

Summary

Threshold cointegration answers the following questions: Is there a long-run relationship? (Generalization of linear cointegration) Is there a no arbitrage band? Are there asymmetries, different adjustment speeds when increase or decrease?

Matthieu Stigler Matthieu.Stigler at gmail.com () Threshold cointegration in R with package tsDyn 8 July 2009 23 / 26

slide-37
SLIDE 37

Further readings

Package vignette Working-paper: Threshold cointegration: overview and implementation in R

Matthieu Stigler Matthieu.Stigler at gmail.com () Threshold cointegration in R with package tsDyn 8 July 2009 24 / 26

slide-38
SLIDE 38

Thank you.

Matthieu Stigler Matthieu.Stigler at gmail.com () Threshold cointegration in R with package tsDyn 8 July 2009 25 / 26

slide-39
SLIDE 39

If because of the stress I spoke to fast

...and have some time left: Additional features: Simulation of TAR, (T)VAR and (T)VECM Other representations of output compared to vars toLatex() function for VAR and VECm

Matthieu Stigler Matthieu.Stigler at gmail.com () Threshold cointegration in R with package tsDyn 8 July 2009 26 / 26