Balcilar, Gupta and Miller, EE 2015

Use this forum for posting example programs or short bits of sample code.
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Balcilar, Gupta and Miller, EE 2015

Unread post by TomDoan »

This is a replication of Balcilar, Gupta, Miller(2015), "Regime switching model of US crude oil and stock market prices: 1859 to 2013", Energy Economics, vol 49, 317-327. This estimates a Markov Switching VECM, with the cointegrating vector fixed between regimes, but different VECM coefficients and covariance matrices.

balcilarguptamiller_ee2015.zip

Detailed description
unitroot
Posts: 6
Joined: Thu Oct 02, 2014 5:50 pm

Re: Balcilar, Gupta and Miller, EE 2015

Unread post by unitroot »

A couple of questions:
1. What is the ECT variable in the Excel file?
2. How were the factors 0.25 and 4.0 chosen for defining the two volatility regimes?

Thanks,
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Balcilar, Gupta and Miller, EE 2015

Unread post by TomDoan »

unitroot wrote:A couple of questions:
1. What is the ECT variable in the Excel file?
Same thing as generated by the program, but with a different scale. (I think it's without the 100*). (Having the program generate that is a better procedure than using a separate program and treating it as data).
unitroot wrote: 2. How were the factors 0.25 and 4.0 chosen for defining the two volatility regimes?
That's not "defining" the regimes. Those are guess values aimed at separating the two regimes. They're far enough apart to be distinct, without making any one of the regimes really unlikely at the guess values.
alexecon
Posts: 72
Joined: Fri Oct 30, 2015 12:16 pm

Re: Balcilar, Gupta and Miller, EE 2015

Unread post by alexecon »

What are the nine restrictions that the authors test in their Table 4? There are two equations with two endogenous lagged variables, a constant and an error correction term each -that's eight. The elements of the var-covar matrix are also allowed to change across the two regimes so that would be another three! Where am I wrong? Thanks for any insights.
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Balcilar, Gupta and Miller, EE 2015

Unread post by TomDoan »

That looks like a miscount in the paper. Under the null, there are 8 fewer regression coefficients + 3 fewer covariance matrix parameters, and then there are the 2 transition parameters which are unidentified under the null, so it looks like they should be (11) and (13) rather than (9) and (11).
abi
Posts: 74
Joined: Sat Apr 13, 2013 3:48 am

Re: Balcilar, Gupta and Miller, EE 2015

Unread post by abi »

Hi Tom,

There are two questions:

1) Is there any difference between "set p1smooth = psmooth(t)(1)" which is repeated both in lin 91 and 115?

2) If p0 is the matrix of transition probabilities what if the difference between "dec rect p0(nstates-1,nstates)" and "dec rect p0(nstates,nstates)"?

Thanks,
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Balcilar, Gupta and Miller, EE 2015

Unread post by TomDoan »

abi wrote:Hi Tom,

There are two questions:

1) Is there any difference between "set p1smooth = psmooth(t)(1)" which is repeated both in lin 91 and 115?
They're after (slightly) different sets of estimates. But the first never gets used.
abi wrote: 2) If p0 is the matrix of transition probabilities what if the difference between "dec rect p0(nstates-1,nstates)" and "dec rect p0(nstates,nstates)"?
ML uses N-1 x N matrices, EM and Gibbs sampling use N x N. The P0 also never gets used.
abi
Posts: 74
Joined: Sat Apr 13, 2013 3:48 am

Re: Balcilar, Gupta and Miller, EE 2015

Unread post by abi »

Sorry for not being clear enough: In fact what i would need to do is to test for the presence of non-linearities in the data and not only for this example.

Thanks for your help,
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Balcilar, Gupta and Miller, EE 2015

Unread post by TomDoan »

There are many different types of nonlinearity. In their case, the "linear" null is the standard VECM (which is linear in the variables given the cointegrating vector) and the non-linear alternative is the MS VECM. That's very different (on both hypotheses) from what your test is doing.
abi
Posts: 74
Joined: Sat Apr 13, 2013 3:48 am

Re: Balcilar, Gupta and Miller, EE 2015

Unread post by abi »

TomDoan wrote:There are many different types of nonlinearity. In their case, the "linear" null is the standard VECM (which is linear in the variables given the cointegrating vector) and the non-linear alternative is the MS VECM. That's very different (on both hypotheses) from what your test is doing.
Thanks a lot for your quick reply.

This is exactly what i want to do. Unfortunately i couldn't find any things related with this case in UG and forum. I would greatly appreciate if you guide me how i can do this test.
abi
Posts: 74
Joined: Sat Apr 13, 2013 3:48 am

Re: Balcilar, Gupta and Miller, EE 2015

Unread post by abi »

TomDoan wrote:Sorry. What is "this"?
Sorry Tom,
"This" refers to testing MS-VECM model against the linear VECM model.
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Balcilar, Gupta and Miller, EE 2015

Unread post by TomDoan »

The likelihood ratio test has a non-standard distribution because the transition probabilities aren't identified under the null. For options, see Garcia and Perron(1996), "An Analysis of the Real Interest Rate under Regime Shifts," The Review of Economics and Statistics, vol 78, no 1, 111-125. A common (and more straightforward) choice is to use BIC or AIC rather than try to do a formal nested hypothesis test.
abi
Posts: 74
Joined: Sat Apr 13, 2013 3:48 am

Re: Balcilar, Gupta and Miller, EE 2015

Unread post by abi »

TomDoan wrote:The likelihood ratio test has a non-standard distribution because the transition probabilities aren't identified under the null. For options, see Garcia and Perron(1996), "An Analysis of the Real Interest Rate under Regime Shifts," The Review of Economics and Statistics, vol 78, no 1, 111-125.
Thank you Tom,

However i did did the LR test by obtaining two log likelihood (VECM & MS-VECM) and the result was in favor switching model, but as you mentioned in this case LR test is not recommended.
A common (and more straightforward) choice is to use BIC or AIC rather than try to do a formal nested hypothesis test.
I should be compute "AIC" and "SBC" criteria for both linear VECM and non-linear (MS-VECM) model, then compare them together. did i understand correctly?

Sorry Tom but now Another question arise to me:
In line 135 and 136 (compute gprior) where the numbers (19.0,1.0) are from?

thanks in advance,
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Balcilar, Gupta and Miller, EE 2015

Unread post by TomDoan »

abi wrote:
TomDoan wrote:The likelihood ratio test has a non-standard distribution because the transition probabilities aren't identified under the null. For options, see Garcia and Perron(1996), "An Analysis of the Real Interest Rate under Regime Shifts," The Review of Economics and Statistics, vol 78, no 1, 111-125.
Thank you Tom,

However i did did the LR test by obtaining two log likelihood (VECM & MS-VECM) and the result was in favor switching model, but as you mentioned in this case LR test is not recommended.
A common (and more straightforward) choice is to use BIC or AIC rather than try to do a formal nested hypothesis test.
I should be compute "AIC" and "SBC" criteria for both linear VECM and non-linear (MS-VECM) model, then compare them together. did i understand correctly?
Yes. Though in this case, all of those will be somewhat misleading because of how high the log likelihood is in the switching case because of the long strings of zeroes.
abi wrote: Sorry Tom but now Another question arise to me:
In line 135 and 136 (compute gprior) where the numbers (19.0,1.0) are from?
Read the comments above it:

*
* Prior for transitions. Weak Dirichlet priors with preference for
* staying in a given regime.
*
dec vect[vect] gprior(nstates)
compute gprior(1)=||19.0,1.0||
compute gprior(2)=||1.0,19.0||
abi
Posts: 74
Joined: Sat Apr 13, 2013 3:48 am

Re: Balcilar, Gupta and Miller, EE 2015

Unread post by abi »

Thanks for a prompt reply. In fact the question is: why do not you use "||8.0,2.0||" instead of "||19.0,1.0||"?
Post Reply