Gray JFE 1996 Markov Switching GARCH model

Use this forum for posting example programs or short bits of sample code.
jack
Posts: 160
Joined: Tue Sep 27, 2016 11:44 am

Re: Gray JFE 1996 Markov Switching GARCH model

Unread post by jack »

Thank you very much for your excellent guide and suggestions.

I even used the estimated parameters of the paper (including the two different degrees of freedom) as initial guess values but the model didn't converged.
I did my best :( :(
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Gray JFE 1996 Markov Switching GARCH model

Unread post by TomDoan »

After having eliminated extreme outliers caused by the stock market crash of October 1987, we construct the
following sample periods: 1 January 1983 to 31 December 1993 for the CAC40, 1
January 1985 to 31 December 1995 for the DAX30, 1 January 1981 to 31 December
1991 for the NIKKEI225, 1 January 1979 to 31 December 1989 for the FTSE100 and
1 January 1977 to 31 December 1987 for the S&P500.
So if this is the SP500 data, this isn't their data since they've done something (not really described) to change the returns during October 1987. This is why I will almost never attempt to do any replications if the authors don't provide their actual data---it's just a huge waste of time.

And (as I said six months ago), the whole idea is suspect. If you have a date-certain when there was a policy change, do a hard break model based upon that.
jack
Posts: 160
Joined: Tue Sep 27, 2016 11:44 am

Re: Gray JFE 1996 Markov Switching GARCH model

Unread post by jack »

It seems that they have deleted two outliers from the data set: 10/19/1987 (SP500: 224.84) and 10/20/1987 (SP500: 236.83). It can be seen somehow by comparing their graph of daily returns of SP500 with the following graph that has been drawn by deleting those tow outlires:
Bohl et al.png
Bohl et al.png (18.72 KiB) Viewed 49192 times
daily returns.png
daily returns.png (17.27 KiB) Viewed 49192 times
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Gray JFE 1996 Markov Switching GARCH model

Unread post by TomDoan »

Other than color, those graphs appear to be identical. However, the data set has no October 19, so although the drop from October 16 to October 20 is still rather large, taking out October 19 eliminates a truly massive outlier followed by a rebound outlier.

It remains the case that there is no evidence that there is any real change in the process after 21 April 1982 when futures contracts were added and analyzing that was supposed to have been the point of the paper. Even with seven extra parameters, they only got an improvement in the log likelihood of about 9 (which is pretty bad with 2800 observations) and if you look at their Figure 5, all that the "model" is doing is picking out a couple of isolated outliers having nothing to do with the date of the known regime change. You're now 70+ posts and six months into this. It's time to give it up---there's nothing here.
jack
Posts: 160
Joined: Tue Sep 27, 2016 11:44 am

Re: Gray JFE 1996 Markov Switching GARCH model

Unread post by jack »

I learned many things here from you Tom. It is a real class for me.

It is just my curiosity. I want to learn how I can run a MS GARCH model in practice. I want to know where is my mistakes. And I want to show my instructor that at last I learned a useful thing (running a MS GARCh model in practice).

And after all, I think estimating a model correctly and seeing the results for the first time has a lot of excitement and a real pleasure!!!!
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Gray JFE 1996 Markov Switching GARCH model

Unread post by TomDoan »

The mistake was picking a series which really doesn't have MS properties---their results for the US basically have Markov switching being reduced to a jump model. There are several other countries which at least have two persistent regimes even if the regimes don't match up with the changes in the legal regime.
jack
Posts: 160
Joined: Tue Sep 27, 2016 11:44 am

Re: Gray JFE 1996 Markov Switching GARCH model

Unread post by jack »

It seems that the most tricky part of the MS GARCH model is choosing appropriate initial guess values.

How do you select those values in practice? I mean how did you, fore example, figure out to choose those values in the Gray's code? What criteria do you look at for selecting guess values?
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Gray JFE 1996 Markov Switching GARCH model

Unread post by TomDoan »

That's true of effectively all MS models because most models have multiple modes. The reality is that there have been very few convincing examples of the use of MS models in econometrics. (I could best describe one published paper as ten pages of diagnostics to disguise the fact that the model failed miserably to produce any economic content).
Catife
Posts: 9
Joined: Sun Mar 20, 2016 10:18 pm

Re: Gray JFE 1996 Markov Switching GARCH model

Unread post by Catife »

Hi Tom

I have a question about how the sample code constructs the path-independent error term and variance. The codes

Code: Select all

* Compute the values of uu (squared residual) and h (variance) to be
* used for the period following
*
compute mu=mu1*pstar(1)+mu2*pstar(2)
compute uu(t)=(drate(t)-mu)^2
compute h(t)=pstar(1)*(mu1^2+hh1)+pstar(2)*(mu2^2+hh2)-mu^2
mean pstar is utilized to be the weight. Pstar, which is updated in the %msprob, is actually pt_t based on my understanding. However, Gray (1996) uses pt_t1 as the weight to calculate the path-independent terms. Could you please let me know why the example uses pstar? Thank you very much.
jack
Posts: 160
Joined: Tue Sep 27, 2016 11:44 am

Re: Gray JFE 1996 Markov Switching GARCH model

Unread post by jack »

Dear Tom,
I recently got the results of a paper about MS-GARCH model that is really strange for me.
The authors claim that the regimes are separated by different intercepts and variances for just the mean equation. And then they claim that because the intercepts and variances of the two mean equations are different so one could have two different variance equations for two regimes. I am really baffled by this claim. Here is the results of the paper. Are there really two regimes in the data that can be distinguished by just the intercepts and variances of the mean equations? Is their logic correct? I would be really grateful if you could possibly guide me.

Image
Last edited by jack on Fri Dec 15, 2017 7:22 am, edited 3 times in total.
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Gray JFE 1996 Markov Switching GARCH model

Unread post by TomDoan »

First of all, I'm not really sure what that table is showing. I'm guessing that those 1's and 2's represent the regimes, and the A's are the means, the B's are GARCH coefficients. As to what sigma is and why it's showing as 0, I don't really know.

If you have multiple coefficients switching (here, apparently all four), there's no way to know what is actually the main driver for the regimes. Looking at this, though, it doesn't look like there's much of a difference between the two.
jack
Posts: 160
Joined: Tue Sep 27, 2016 11:44 am

Re: Gray JFE 1996 Markov Switching GARCH model

Unread post by jack »

Thank you very much for your kind reply.

I edited the original post.

As you said, those 1's and 2's represent the regimes, and the A's are the means, the B's are GARCH coefficients.
And those sigma's are the variances of the mean equations.

The switching coefficients are A's and Sigma's. Authors claim that because A01 and A02 and especially because Sigmas1 and Sigma2 are different so one can have two distinct regimes and meanwhile two different GARCH equations for each regime.

Are they correct? And what about Linearity-LR test result? I am sorry for asking repeating question about MS-GARCH model.
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Gray JFE 1996 Markov Switching GARCH model

Unread post by TomDoan »

What does "variances of the mean equations" even mean? If there's a GARCH process, the variance of the mean is time-varying, not fixed. And, based upon the results that you're showing, the GARCH coefficients are also being allowed to switch, not just, what I assume is the variance constant. As to what the LR test is showing---you have the paper, what do they say that's testing? Offhand, it doesn't look like it would be a switching vs non-switching GARCH, since the differences shown in that table don't seem compatible with a LR test that's that large.
jack
Posts: 160
Joined: Tue Sep 27, 2016 11:44 am

Re: Gray JFE 1996 Markov Switching GARCH model

Unread post by jack »

This is the pint that I am baffled about really.
I think Simga is the long-run average variance. Is it possible?

In explaining the LR test, authors say that it test the null hypothesis of a linear model against the alternative hypothesis of an MS model. According to the results they claim that the test rejects the null hypothesis of a linear model and therefore there is enough evidence in favor of MS model. But when I read the results of GARCH models it seems that they are identical. Are the results of LR test here reliable given the identical results of GARCH models?
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Gray JFE 1996 Markov Switching GARCH model

Unread post by TomDoan »

jack wrote:This is the pint that I am baffled about really.
I think Simga is the long-run average variance. Is it possible?
It could be. It doesn't really matter, since the ergodic variance maps 1-1 to the variance constant---the likelihood would be the same and all the other coefficients would be as well.
jack wrote: In explaining the LR test, authors say that it test the null hypothesis of a linear model against the alternative hypothesis of an MS model. According to the results they claim that the test rejects the null hypothesis of a linear model and therefore there is enough evidence in favor of MS model. But when I read the results of GARCH models it seems that they are identical. Are the results of LR test here reliable given the identical results of GARCH models?
What is a "linear" model? You're asking me to comment on a paper that I haven't seen, but what they should be testing against would be a single regime GARCH, and I'm not sure I would ever describe that as a linear model. If they mean a single regime, fixed variance, then that's an apples vs oranges comparison. If they aren't showing the results from a single regime GARCH, throw that paper in the trash and find a different one. (Seriously).


Last bumped by TomDoan on Sat Mar 01, 2025 4:33 am.
Post Reply