SWARCH

Discussions of ARCH, GARCH, and related models
rtlee100

SWARCH

Unread post by rtlee100 »

Hi,

I was wondering if somebody could help me regarding the running of MARKOV.SRC and SWARCH.PNG.

I am currently trying run the Markov Switching ARCH model as provided by RATS but I get the following messege and was wondering what I might be doing wrong that is causing this issue as I am basically trying to run the original program with my own data (the same issue occurs when I used the data provided).

Is there any was to attempt to fix this?

I am trying to run this as part of my disstertaion which is due to be completed in the next month.

MAXIMIZE - Estimation by BHHH
NO CONVERGENCE IN 5 ITERATIONS
LAST CRITERION WAS 0.0000000
ESTIMATION POSSIBLY HAS STALLED OR MACHINE ROUNDOFF IS MAKING FURTHER PROGRESS DIFFICULT.
TRY HIGHER SUBITERATIONS LIMIT, TIGHTER CVCRIT, DIFFERENT SETTING FOR EXACTLINE OR ALPHA ON NLPAR.
RESTARTING ESTIMATION FROM LAST ESTIMATES OR DIFFERENT INITIAL GUESSES MIGHT ALSO WORK
Weekly Data From 1983:06:03 To 2009:07:17
Usable Observations 1364
Function Value -4075.07154683

Any insight into solving this issue would be greatly appreciated.

Regards,

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

Re: SWARCH

Unread post by TomDoan »

  • Are you doing PMETHOD=SIMPLEX? If not, include it on your MAXIMIZE with a PITER of say 5 or 10.
  • If you're having convergence problems, I generally don't recommend using METHOD=BHHH. That uses an approximation for the curvature which is only correct near the optimum. Try METHOD=BFGS instead. If you want the BHHH covariance matrix, you can do one iteration of BHHH after BFGS finds the optimum.
If neither of those work, you'll have to send code and data to support@estima.com.
rtlee100

Re: SWARCH

Unread post by rtlee100 »

Hi Tom,

Thanks for your quick response, I unfortunately tried these solutions previously and just did there again and I still get the same convergence issue.

I will send on the code and the data, I have however not amended the code (other than amending to try figure out the error) as provided on the Estima website with respect to MARKOV.SRC and SWARCH.PNG.

Thanks,

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

Re: SWARCH

Unread post by TomDoan »

If you look at your results, you'll see that the P(1,3) element has gone negative. That happens in the SWARCH.PRG example as well, which is why there's the PEG13 parmset. You'll need to do that as well.

It's also not clear that your model needs three states. If two states are adequate, then the model has a number of parameters which aren't identified, and you'll have all kinds of optimization problems. When I fixed the P(1,3) at zero, it rather quickly got a P(2,1) going negative. Now a zero transition probability from 1->3 or 3->1 isn't that surprising. If there's a zero probability moving between adjacent states, that's a good sign that the model has a redundant state.
rtlee100

Re: SWARCH

Unread post by rtlee100 »

I just used the 3 states as that was the default option in the code and as such I have no issue with only using a 2 state model and will use it gladly if I can get it to converge.

Where is PEG13 parmset?

Also how did you fix the P(1,3) at zero?

How can set up the mode so that I get a 2 state model to converge?

Apologies for the questions if they are not very smart but unfortubatley I am not too much of an expert on RATS and have only recently started using it in attempt to solve the SWARCH model estimation and am using for of its other etimation and testing functionality.

Thanks again,

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

Re: SWARCH

Unread post by TomDoan »

rtlee100 wrote:I just used the 3 states as that was the default option in the code and as such I have no issue with only using a 2 state model and will use it gladly if I can get it to converge.

Where is PEG13 parmset?

Also how did you fix the P(1,3) at zero?
From the SWARCH.PRG example:

Code: Select all

*
* It turns out that p(1,3) is on the boundary, so we add the constraint to peg it
* at that value.
*
nonlin(parmset=peg13) p(1,3)=0
maximize(start=(pstar=%mcergodic(p)),parmset=meanparms+archparms+msparms+peg13,$
 method=bhhh,iters=400,pmethod=simplex,piters=5) logl 3 *
Without the +peg13 on the MAXIMIZE, it tries to estimate all the parameters in P. With the +peg13, it fixed p(1,3) at zero.
rtlee100 wrote:How can set up the mode so that I get a 2 state model to converge?
Change the following lines in the existing program:

Code: Select all

compute nstates=3

Code: Select all

compute hv=||10,100||
compute p=||.8,.2,.05|.2,.6,.4||
The first one obviously changes to nstates=2. The second needs just one relative variance; probably something like

Code: Select all

compute hv=||10||
The third one just needs a 1x2 matrix. A guess value of

Code: Select all

compute p=||.8,.2||
should probably work fine.
rtlee100

Re: SWARCH

Unread post by rtlee100 »

Thanks for that, I have managed to get it to converge with 2 states so I now need to analyse the results.
Post Reply