Page 1 of 1

Hansen-Seo(2002), Threshold cointegration

Posted: Sat Sep 17, 2011 11:00 am
by TomDoan
This is a replication file for Hansen and Seo(2002), "Testing for two-regime threshold cointegration in vector error-correction models", J of Econometrics, vol 110, pp 293-318. Compared with Balke-Fomby(1997) this doesn't take the cointegrating vector as known and unlike Enders-Siklos(2001), it estimates the cointegrating vector and threshold together, rather than using a two-step process. That makes for a rather complicated estimation process, requiring a double grid search (over beta's, then, given beta, over threshold values). The likelihood function is highly discontinuous, so slightly different grids can produce quite different results.

Updated 28 October 2011 to add an option from graphing the beta vs log det sigma and to correct an error in the grid search for beta.
hansenseo.rpf
Program file
(13.94 KiB) Downloaded 1841 times
zeroyld.dat
Data file
(241 KiB) Downloaded 1679 times

Hansen and Soe three regime model

Posted: Sun Sep 18, 2011 1:29 pm
by mskare69
Hello,

How can I modify Hansen and Soe 2002 rats code to run three regime threshold cointegration model (if two thresholds are identified) and perform impulse response analysis in such three regime model?

Any help is much appreciated.

Fondly

Marinko

Hansen ans Soe

Posted: Sun Sep 18, 2011 1:54 pm
by mskare69
I forgot to ask how to test If TVECM3 is more appropriate then TVECM2?

Thanks

Re: Hansen and Soe three regime model

Posted: Mon Sep 19, 2011 11:27 am
by TomDoan
mskare69 wrote:Hello,

How can I modify Hansen and Soe 2002 rats code to run three regime threshold cointegration model (if two thresholds are identified) and perform impulse response analysis in such three regime model?

Any help is much appreciated.

Fondly

Marinko
That would require a third loop over a second value of "gamma" inside the existing ones. However, I wouldn't recommend that. Even the one break Hansen-Seo doesn't work very well, and I can't even guess how badly behaved a double break model would be.

Re: Hansen-Seo(2002), Threshold cointegration

Posted: Mon Sep 19, 2011 3:02 pm
by mskare69
Thanks for a quick response. Let me rephrase the question. Is there a completed code in Rats that I can use to run TVECM with two thresholds (three regimes). Can I use some of the codes (5.1, 5.2, 5.3) from the last Estima course study to run the whole thing - testing for threshold cointegration, estimating TVECM and doing impulse response of the model.

Fondly,

Marinko

Re: Hansen-Seo(2002), Threshold cointegration

Posted: Tue Sep 20, 2011 9:47 am
by TomDoan
mskare69 wrote:Thanks for a quick response. Let me rephrase the question. Is there a completed code in Rats that I can use to run TVECM with two thresholds (three regimes). Can I use some of the codes (5.1, 5.2, 5.3) from the last Estima course study to run the whole thing - testing for threshold cointegration, estimating TVECM and doing impulse response of the model.

Fondly,

Marinko
The Tsay example (SMS_5_3.RPF) estimates two and three regime models. It's not strictly for a VECM, but there's no real difference between a VECM with the cointegrating vector treated as known and what that's doing. The difficulty with the Hansen-Seo approach is that the likelihood when the cointegrating relation is also unknown is very, very badly behaved.

Re: Hansen-Seo(2002), Threshold cointegration

Posted: Fri Dec 27, 2013 8:17 am
by ege_man
Dear Tom
Is it possible to modify this code to estimate cointegration in a five-variable model?
Thanks

Re: Hansen-Seo(2002), Threshold cointegration

Posted: Fri Dec 27, 2013 10:00 am
by TomDoan
ege_man wrote:Dear Tom
Is it possible to modify this code to estimate cointegration in a five-variable model?
Thanks
No. That would require that the one beta loop be replaced with four. Even if that were feasible (it would take too long), there is no way that the results would be usable. As I mentioned in a response to an earlier question, this really is a badly behaved model even with two variables and two regimes.