Why are there so many observations skipped?

Discussion of models with structural breaks or endogenous switching.
ming_lee
Posts: 3
Joined: Thu Sep 06, 2012 3:47 am

Why are there so many observations skipped?

Unread post by ming_lee »

Hello,

I tried to amend the RATS codes that replicates the GARCH_DF model used by Dueker(1997) in "Markov Switching in GARCH Processes and Mean-Reverting Stock-Market Volatility" pubilsed in Journal of Business and Econoic Statistics.

I wanted to add a lagged depedent variable in the mean equation and allow all parameters in both the mean equation and the volatility equation to be regime-dependent.
What I try to do is to run a markov swithcing model like that used in "Do Individual Index Futures Investors Destablize the Underlying Spot Market?" by Bohl, Salm, and Wilfling (2011) and published in Journal of Futures Market.

Although the amended program can run, I got the following message:
MAXIMIZE - Estimation by BFGS
Convergence in 16 Iterations. Final criterion was 0.0000000 <= 0.0000100
Usable Observations 2
Skipped/Missing (from 2528) 2526
Function Value NA

I do not know why there are so many observations skipped
Attached is the amend progaram.

Could you please help me?

Thank you very much in advance.
Attachments
dueker_swgarch_df(090712)need help.RPF
(5.66 KiB) Downloaded 850 times
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Why are there so many observations skipped?

Unread post by TomDoan »

Your GARCHRegimeH isn't properly taking into account which regime controls the parameters. You need:

Code: Select all

function GARCHRegimeH time
type vector GARCHRegimeH
type integer time
*
local integer i
local integer r0 r1
*
dim GARCHRegimeH(nexpand)
do i=1,nexpand
   compute r0=%MSLagState(i,0)
   compute r1=%MSLagState(i,1)
   compute GARCHRegimeH(i)=mb1(r0)+mb2(r0)*hs(r1)(time-1)+$
       mb3(r0)*uus(r1)(time-1)/gv(r1)
end do i
end
However, you are mixing the two types of methods for handling the variances in the case of a switch (Cai vs Hamilton-Susmel). In Hamilton-Susmel, the recursion is in "standardized" space, with the constant being pegged to one. That's then scaled at the end using the current GV. So you wouldn't have the MB parameters (they would be replaced with 1 in the function above), but would allow for different GV's.

Also, note that their paper doesn't really find a "Markov" switching model. Their transitions are effectively 1 so there are two states with only a few transitions over the course of the data set. That's probably a result of allowing too much freedom.
ming_lee
Posts: 3
Joined: Thu Sep 06, 2012 3:47 am

Re: Why are there so many observations skipped?

Unread post by ming_lee »

Thank you very much.

I have two more questions.
First, after inserting your codes, I run the program and have 0s for all elements of p1 and p2.
What should I do to get the correct elements of p1 and p2 to graph them?
Second, I want to do analysis with the residuals of the final Markov Swithcing GARCH model.
How can I get the residuals?

Could you please help me again?

Thank you very much in advance.
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Why are there so many observations skipped?

Unread post by TomDoan »

Your model has too many things changing in each regime to produce sensible results, so it doesn't produce sensible results. If you look at the "estimated" parameters, neither branch describes a reasonable GARCH model.
Post Reply