Threshold cointegration in R with package tsDyn · PDF fileThreshold cointegration in R with...
Transcript of Threshold cointegration in R with package tsDyn · PDF fileThreshold cointegration in R with...
![Page 1: Threshold cointegration in R with package tsDyn · PDF fileThreshold cointegration in R with package tsDyn ... variables are non-stationary, ... Threshold e ects in the VECM Linear](https://reader030.fdocuments.net/reader030/viewer/2022012315/5aadb6f17f8b9a8f498e9c63/html5/thumbnails/1.jpg)
Threshold cointegration in Rwith package tsDyn
Matthieu StiglerMatthieu.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
![Page 2: Threshold cointegration in R with package tsDyn · PDF fileThreshold cointegration in R with package tsDyn ... variables are non-stationary, ... Threshold e ects in the VECM Linear](https://reader030.fdocuments.net/reader030/viewer/2022012315/5aadb6f17f8b9a8f498e9c63/html5/thumbnails/2.jpg)
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
![Page 3: Threshold cointegration in R with package tsDyn · PDF fileThreshold cointegration in R with package tsDyn ... variables are non-stationary, ... Threshold e ects in the VECM Linear](https://reader030.fdocuments.net/reader030/viewer/2022012315/5aadb6f17f8b9a8f498e9c63/html5/thumbnails/3.jpg)
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
![Page 4: Threshold cointegration in R with package tsDyn · PDF fileThreshold cointegration in R with package tsDyn ... variables are non-stationary, ... Threshold e ects in the VECM Linear](https://reader030.fdocuments.net/reader030/viewer/2022012315/5aadb6f17f8b9a8f498e9c63/html5/thumbnails/4.jpg)
Background
Non-stationnary variables with unit root: I(1)
Spurious regression when I(1) regressed on I(1):I R2 → 1I Statistical dependance among independant variablesI Wrong conclusions!
Matthieu Stigler Matthieu.Stigler at gmail.com ()Threshold cointegration in R with package tsDyn 8 July 2009 4 / 26
![Page 5: Threshold cointegration in R with package tsDyn · PDF fileThreshold cointegration in R with package tsDyn ... variables are non-stationary, ... Threshold e ects in the VECM Linear](https://reader030.fdocuments.net/reader030/viewer/2022012315/5aadb6f17f8b9a8f498e9c63/html5/thumbnails/5.jpg)
Background
Non-stationnary variables with unit root: I(1)
Spurious regression when I(1) regressed on I(1):I R2 → 1I Statistical dependance among independant variablesI Wrong conclusions!
Matthieu Stigler Matthieu.Stigler at gmail.com ()Threshold cointegration in R with package tsDyn 8 July 2009 4 / 26
![Page 6: Threshold cointegration in R with package tsDyn · PDF fileThreshold cointegration in R with package tsDyn ... variables are non-stationary, ... Threshold e ects in the VECM Linear](https://reader030.fdocuments.net/reader030/viewer/2022012315/5aadb6f17f8b9a8f498e9c63/html5/thumbnails/6.jpg)
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 = εtX 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
![Page 7: Threshold cointegration in R with package tsDyn · PDF fileThreshold cointegration in R with package tsDyn ... variables are non-stationary, ... Threshold e ects in the VECM Linear](https://reader030.fdocuments.net/reader030/viewer/2022012315/5aadb6f17f8b9a8f498e9c63/html5/thumbnails/7.jpg)
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 = εtX 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
![Page 8: Threshold cointegration in R with package tsDyn · PDF fileThreshold cointegration in R with package tsDyn ... variables are non-stationary, ... Threshold e ects in the VECM Linear](https://reader030.fdocuments.net/reader030/viewer/2022012315/5aadb6f17f8b9a8f498e9c63/html5/thumbnails/8.jpg)
Interest of linear cointegration
Stable long-run relationship between random walk variables.
Error-correction mechanisms pushing deviations back towards thelong-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 deviationsfrom 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
![Page 9: Threshold cointegration in R with package tsDyn · PDF fileThreshold cointegration in R with package tsDyn ... variables are non-stationary, ... Threshold e ects in the VECM Linear](https://reader030.fdocuments.net/reader030/viewer/2022012315/5aadb6f17f8b9a8f498e9c63/html5/thumbnails/9.jpg)
Interest of linear cointegration
Stable long-run relationship between random walk variables.
Error-correction mechanisms pushing deviations back towards thelong-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 deviationsfrom 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
![Page 10: Threshold cointegration in R with package tsDyn · PDF fileThreshold cointegration in R with package tsDyn ... variables are non-stationary, ... Threshold e ects in the VECM Linear](https://reader030.fdocuments.net/reader030/viewer/2022012315/5aadb6f17f8b9a8f498e9c63/html5/thumbnails/10.jpg)
Interest of linear cointegration
Stable long-run relationship between random walk variables.
Error-correction mechanisms pushing deviations back towards thelong-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 deviationsfrom 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
![Page 11: Threshold cointegration in R with package tsDyn · PDF fileThreshold cointegration in R with package tsDyn ... variables are non-stationary, ... Threshold e ects in the VECM Linear](https://reader030.fdocuments.net/reader030/viewer/2022012315/5aadb6f17f8b9a8f498e9c63/html5/thumbnails/11.jpg)
Interest of linear cointegration
Stable long-run relationship between random walk variables.
Error-correction mechanisms pushing deviations back towards thelong-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
![Page 12: Threshold cointegration in R with package tsDyn · PDF fileThreshold cointegration in R with package tsDyn ... variables are non-stationary, ... Threshold e ects in the VECM Linear](https://reader030.fdocuments.net/reader030/viewer/2022012315/5aadb6f17f8b9a8f498e9c63/html5/thumbnails/12.jpg)
The assumption of linearity
Implicit assumption: every small/big deviation from equilibirum leads toinstantaneous correction.
But economic theory suggests:
Transaction costs (no adjustment when: deviations < transactioncosts)
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
![Page 13: Threshold cointegration in R with package tsDyn · PDF fileThreshold cointegration in R with package tsDyn ... variables are non-stationary, ... Threshold e ects in the VECM Linear](https://reader030.fdocuments.net/reader030/viewer/2022012315/5aadb6f17f8b9a8f498e9c63/html5/thumbnails/13.jpg)
The assumption of linearity
Implicit assumption: every small/big deviation from equilibirum leads toinstantaneous correction.
But economic theory suggests:
Transaction costs (no adjustment when: deviations < transactioncosts)
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
![Page 14: Threshold cointegration in R with package tsDyn · PDF fileThreshold cointegration in R with package tsDyn ... variables are non-stationary, ... Threshold e ects in the VECM Linear](https://reader030.fdocuments.net/reader030/viewer/2022012315/5aadb6f17f8b9a8f498e9c63/html5/thumbnails/14.jpg)
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
![Page 15: Threshold cointegration in R with package tsDyn · PDF fileThreshold cointegration in R with package tsDyn ... variables are non-stationary, ... Threshold e ects in the VECM Linear](https://reader030.fdocuments.net/reader030/viewer/2022012315/5aadb6f17f8b9a8f498e9c63/html5/thumbnails/15.jpg)
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 affectstationarity of whole proces)
Matthieu Stigler Matthieu.Stigler at gmail.com ()Threshold cointegration in R with package tsDyn 8 July 2009 10 / 26
![Page 16: Threshold cointegration in R with package tsDyn · PDF fileThreshold cointegration in R with package tsDyn ... variables are non-stationary, ... Threshold e ects in the VECM Linear](https://reader030.fdocuments.net/reader030/viewer/2022012315/5aadb6f17f8b9a8f498e9c63/html5/thumbnails/16.jpg)
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 affectstationarity of whole proces)
Matthieu Stigler Matthieu.Stigler at gmail.com ()Threshold cointegration in R with package tsDyn 8 July 2009 10 / 26
![Page 17: Threshold cointegration in R with package tsDyn · PDF fileThreshold cointegration in R with package tsDyn ... variables are non-stationary, ... Threshold e ects in the VECM Linear](https://reader030.fdocuments.net/reader030/viewer/2022012315/5aadb6f17f8b9a8f498e9c63/html5/thumbnails/17.jpg)
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 affectstationarity of whole proces)
Matthieu Stigler Matthieu.Stigler at gmail.com ()Threshold cointegration in R with package tsDyn 8 July 2009 10 / 26
![Page 18: Threshold cointegration in R with package tsDyn · PDF fileThreshold cointegration in R with package tsDyn ... variables are non-stationary, ... Threshold e ects in the VECM Linear](https://reader030.fdocuments.net/reader030/viewer/2022012315/5aadb6f17f8b9a8f498e9c63/html5/thumbnails/18.jpg)
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 affectstationarity of whole proces)
Matthieu Stigler Matthieu.Stigler at gmail.com ()Threshold cointegration in R with package tsDyn 8 July 2009 10 / 26
![Page 19: Threshold cointegration in R with package tsDyn · PDF fileThreshold cointegration in R with package tsDyn ... variables are non-stationary, ... Threshold e ects in the VECM Linear](https://reader030.fdocuments.net/reader030/viewer/2022012315/5aadb6f17f8b9a8f498e9c63/html5/thumbnails/19.jpg)
0 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
![Page 20: Threshold cointegration in R with package tsDyn · PDF fileThreshold cointegration in R with package tsDyn ... variables are non-stationary, ... Threshold e ects in the VECM Linear](https://reader030.fdocuments.net/reader030/viewer/2022012315/5aadb6f17f8b9a8f498e9c63/html5/thumbnails/20.jpg)
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 6= ρ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
![Page 21: Threshold cointegration in R with package tsDyn · PDF fileThreshold cointegration in R with package tsDyn ... variables are non-stationary, ... Threshold e ects in the VECM Linear](https://reader030.fdocuments.net/reader030/viewer/2022012315/5aadb6f17f8b9a8f498e9c63/html5/thumbnails/21.jpg)
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
)ECTM
−1(−0.030.09
)ECTH
−1
+(−0.10 0.04
0.02 −0.03
) (∆Xt−1
∆Yt−1
)Note:
I lags can also be regime specificI Same feature: adjustment band, asymetries
Matthieu Stigler Matthieu.Stigler at gmail.com ()Threshold cointegration in R with package tsDyn 8 July 2009 13 / 26
![Page 22: Threshold cointegration in R with package tsDyn · PDF fileThreshold cointegration in R with package tsDyn ... variables are non-stationary, ... Threshold e ects in the VECM Linear](https://reader030.fdocuments.net/reader030/viewer/2022012315/5aadb6f17f8b9a8f498e9c63/html5/thumbnails/22.jpg)
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
)ECTM
−1(−0.030.09
)ECTH
−1
+(−0.10 0.04
0.02 −0.03
) (∆Xt−1
∆Yt−1
)Note:
I lags can also be regime specificI Same feature: adjustment band, asymetries
Matthieu Stigler Matthieu.Stigler at gmail.com ()Threshold cointegration in R with package tsDyn 8 July 2009 13 / 26
![Page 23: Threshold cointegration in R with package tsDyn · PDF fileThreshold cointegration in R with package tsDyn ... variables are non-stationary, ... Threshold e ects in the VECM Linear](https://reader030.fdocuments.net/reader030/viewer/2022012315/5aadb6f17f8b9a8f498e9c63/html5/thumbnails/23.jpg)
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
)ECTM
−1(−0.030.09
)ECTH
−1
+(−0.10 0.04
0.02 −0.03
) (∆Xt−1
∆Yt−1
)Note:
I lags can also be regime specificI Same feature: adjustment band, asymetries
Matthieu Stigler Matthieu.Stigler at gmail.com ()Threshold cointegration in R with package tsDyn 8 July 2009 13 / 26
![Page 24: Threshold cointegration in R with package tsDyn · PDF fileThreshold cointegration in R with package tsDyn ... variables are non-stationary, ... Threshold e ects in the VECM Linear](https://reader030.fdocuments.net/reader030/viewer/2022012315/5aadb6f17f8b9a8f498e9c63/html5/thumbnails/24.jpg)
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
![Page 25: Threshold cointegration in R with package tsDyn · PDF fileThreshold cointegration in R with package tsDyn ... variables are non-stationary, ... Threshold e ects in the VECM Linear](https://reader030.fdocuments.net/reader030/viewer/2022012315/5aadb6f17f8b9a8f498e9c63/html5/thumbnails/25.jpg)
Areas of application
Macroeconomics questionsI Law of one price (LOP)I Purchasing power parityI Exchange rate pass-throughI Fisher effect: nominal interest rates and inflationI Usual macro: price, interest rate, income
Price transmission studiesI Vertically: market chains, numerous studies for agricultural products,
oilI Horizontally: market integration, similar to LOP
Financial marketsI Term interest theoryI Stock Prices and DividendsI Futures marketI Various arbitrage markets
Matthieu Stigler Matthieu.Stigler at gmail.com ()Threshold cointegration in R with package tsDyn 8 July 2009 15 / 26
![Page 26: Threshold cointegration in R with package tsDyn · PDF fileThreshold cointegration in R with package tsDyn ... variables are non-stationary, ... Threshold e ects in the VECM Linear](https://reader030.fdocuments.net/reader030/viewer/2022012315/5aadb6f17f8b9a8f498e9c63/html5/thumbnails/26.jpg)
Areas of application
Macroeconomics questionsI Law of one price (LOP)I Purchasing power parityI Exchange rate pass-throughI Fisher effect: nominal interest rates and inflationI Usual macro: price, interest rate, income
Price transmission studiesI Vertically: market chains, numerous studies for agricultural products,
oilI Horizontally: market integration, similar to LOP
Financial marketsI Term interest theoryI Stock Prices and DividendsI Futures marketI Various arbitrage markets
Matthieu Stigler Matthieu.Stigler at gmail.com ()Threshold cointegration in R with package tsDyn 8 July 2009 15 / 26
![Page 27: Threshold cointegration in R with package tsDyn · PDF fileThreshold cointegration in R with package tsDyn ... variables are non-stationary, ... Threshold e ects in the VECM Linear](https://reader030.fdocuments.net/reader030/viewer/2022012315/5aadb6f17f8b9a8f498e9c63/html5/thumbnails/27.jpg)
Areas of application
Macroeconomics questionsI Law of one price (LOP)I Purchasing power parityI Exchange rate pass-throughI Fisher effect: nominal interest rates and inflationI Usual macro: price, interest rate, income
Price transmission studiesI Vertically: market chains, numerous studies for agricultural products,
oilI Horizontally: market integration, similar to LOP
Financial marketsI Term interest theoryI Stock Prices and DividendsI Futures marketI Various arbitrage markets
Matthieu Stigler Matthieu.Stigler at gmail.com ()Threshold cointegration in R with package tsDyn 8 July 2009 15 / 26
![Page 28: Threshold cointegration in R with package tsDyn · PDF fileThreshold cointegration in R with package tsDyn ... variables are non-stationary, ... Threshold e ects in the VECM Linear](https://reader030.fdocuments.net/reader030/viewer/2022012315/5aadb6f17f8b9a8f498e9c63/html5/thumbnails/28.jpg)
Areas of application
Macroeconomics questionsI Law of one price (LOP)I Purchasing power parityI Exchange rate pass-throughI Fisher effect: nominal interest rates and inflationI Usual macro: price, interest rate, income
Price transmission studiesI Vertically: market chains, numerous studies for agricultural products,
oilI Horizontally: market integration, similar to LOP
Financial marketsI Term interest theoryI Stock Prices and DividendsI Futures marketI Various arbitrage markets
Matthieu Stigler Matthieu.Stigler at gmail.com ()Threshold cointegration in R with package tsDyn 8 July 2009 15 / 26
![Page 29: Threshold cointegration in R with package tsDyn · PDF fileThreshold cointegration in R with package tsDyn ... variables are non-stationary, ... Threshold e ects in the VECM Linear](https://reader030.fdocuments.net/reader030/viewer/2022012315/5aadb6f17f8b9a8f498e9c63/html5/thumbnails/29.jpg)
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
![Page 30: Threshold cointegration in R with package tsDyn · PDF fileThreshold cointegration in R with package tsDyn ... variables are non-stationary, ... Threshold e ects in the VECM Linear](https://reader030.fdocuments.net/reader030/viewer/2022012315/5aadb6f17f8b9a8f498e9c63/html5/thumbnails/30.jpg)
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
![Page 31: Threshold cointegration in R with package tsDyn · PDF fileThreshold cointegration in R with package tsDyn ... variables are non-stationary, ... Threshold e ects in the VECM Linear](https://reader030.fdocuments.net/reader030/viewer/2022012315/5aadb6f17f8b9a8f498e9c63/html5/thumbnails/31.jpg)
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
![Page 32: Threshold cointegration in R with package tsDyn · PDF fileThreshold cointegration in R with package tsDyn ... variables are non-stationary, ... Threshold e ects in the VECM Linear](https://reader030.fdocuments.net/reader030/viewer/2022012315/5aadb6f17f8b9a8f498e9c63/html5/thumbnails/32.jpg)
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
![Page 33: Threshold cointegration in R with package tsDyn · PDF fileThreshold cointegration in R with package tsDyn ... variables are non-stationary, ... Threshold e ects in the VECM Linear](https://reader030.fdocuments.net/reader030/viewer/2022012315/5aadb6f17f8b9a8f498e9c63/html5/thumbnails/33.jpg)
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
![Page 34: Threshold cointegration in R with package tsDyn · PDF fileThreshold cointegration in R with package tsDyn ... variables are non-stationary, ... Threshold e ects in the VECM Linear](https://reader030.fdocuments.net/reader030/viewer/2022012315/5aadb6f17f8b9a8f498e9c63/html5/thumbnails/34.jpg)
0 5 10 15 20 25
0.00
0.10
Ftest12
Den
sity
Test linear AR vs 1 threshold SETAR
Asymptotic Chi 2BootstrapTest value
0 10 20 30 40 50
0.00
0.04
0.08
Ftest13
Den
sity
Test linear AR vs 2 thresholds SETAR
Asymptotic Chi 2BootstrapTest value
Matthieu Stigler Matthieu.Stigler at gmail.com ()Threshold cointegration in R with package tsDyn 8 July 2009 21 / 26
![Page 35: Threshold cointegration in R with package tsDyn · PDF fileThreshold cointegration in R with package tsDyn ... variables are non-stationary, ... Threshold e ects in the VECM Linear](https://reader030.fdocuments.net/reader030/viewer/2022012315/5aadb6f17f8b9a8f498e9c63/html5/thumbnails/35.jpg)
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 0th 1
Matthieu Stigler Matthieu.Stigler at gmail.com ()Threshold cointegration in R with package tsDyn 8 July 2009 22 / 26
![Page 36: Threshold cointegration in R with package tsDyn · PDF fileThreshold cointegration in R with package tsDyn ... variables are non-stationary, ... Threshold e ects in the VECM Linear](https://reader030.fdocuments.net/reader030/viewer/2022012315/5aadb6f17f8b9a8f498e9c63/html5/thumbnails/36.jpg)
Summary
Threshold cointegration answers the following questions:
Is there a long-run relationship? (Generalization of linearcointegration)
Is there a no arbitrage band?
Are there asymmetries, different adjustment speeds when increase ordecrease?
Matthieu Stigler Matthieu.Stigler at gmail.com ()Threshold cointegration in R with package tsDyn 8 July 2009 23 / 26
![Page 37: Threshold cointegration in R with package tsDyn · PDF fileThreshold cointegration in R with package tsDyn ... variables are non-stationary, ... Threshold e ects in the VECM Linear](https://reader030.fdocuments.net/reader030/viewer/2022012315/5aadb6f17f8b9a8f498e9c63/html5/thumbnails/37.jpg)
Further readings
Package vignette
Working-paper: Threshold cointegration: overview andimplementation in R
Matthieu Stigler Matthieu.Stigler at gmail.com ()Threshold cointegration in R with package tsDyn 8 July 2009 24 / 26
![Page 38: Threshold cointegration in R with package tsDyn · PDF fileThreshold cointegration in R with package tsDyn ... variables are non-stationary, ... Threshold e ects in the VECM Linear](https://reader030.fdocuments.net/reader030/viewer/2022012315/5aadb6f17f8b9a8f498e9c63/html5/thumbnails/38.jpg)
Thank you.
Matthieu Stigler Matthieu.Stigler at gmail.com ()Threshold cointegration in R with package tsDyn 8 July 2009 25 / 26
![Page 39: Threshold cointegration in R with package tsDyn · PDF fileThreshold cointegration in R with package tsDyn ... variables are non-stationary, ... Threshold e ects in the VECM Linear](https://reader030.fdocuments.net/reader030/viewer/2022012315/5aadb6f17f8b9a8f498e9c63/html5/thumbnails/39.jpg)
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