Page 1 of 1

TGARCH

Posted: Thu Aug 05, 2010 3:11 am
by marcia
.

Re: TGARCH

Posted: Thu Aug 05, 2010 2:00 pm
by TomDoan
The fact that you're getting just one usable observation is definitely not good, so you might want to check that everything is defined properly in the pre-sample range (in this case, for entry 1). In addition, this:

Code: Select all

do j=1,n
   compute h = h + a(i)(j+1)*(z(j)(t-1))+ %if(s(i)(t-1)<0.0,g(i)(i+1)*z(i)(t-1),0.0)
end do j
doesn't look right. The last term doesn't depend upon j, so it will just have n replications of the same term added in.

Re: TGARCH

Posted: Thu Aug 05, 2010 2:17 pm
by marcia
Dear Tom,

I have tried using different method, such as set a dummy. However, it gives a message saying:

## SR10. Missing Values And/Or SMPL Options Leave No Usable Data Points

Thank you very much for your help and time.

Marcia

Re: TGARCH

Posted: Thu Aug 05, 2010 5:23 pm
by TomDoan
First, I'm not sure I would refer to the threshold term as a "dummy", since it can change from one function evaluation to another, and have a quite different interpretation as the variance shift dummies used in the original paper. This isn't just stylistic---the main problem here is that your "G" parameters are defined as a VEC[VEC], but don't seem to have more than 1 element per series. Yet, you're trying to access g(i)(i+1), which doesn't exist for either i=1 or i=2. I don't know if you were copying some code which had more parameters in the G, but I'm guessing that you need g(i)(1)*..., not g(i)(i+1)*... in

compute h = a(i)(1)+w(i)*(v(i)(t-1))+ g(i)(i+1)*((u(i)(t-1))**2)*dummy(t)

You also have end=8378 when you're only reading 3000 data points.

Re: TGARCH

Posted: Thu Aug 05, 2010 5:57 pm
by marcia
Dear Tom,

Thank you for your reply. I appreciate your comments and have made some adjustments. I am trying to code is a multivariate TGARCH.

Thank you very much for your time and help.

Marcia

Re: TGARCH

Posted: Fri Aug 06, 2010 4:31 am
by TomDoan
That seems to be set to do what you want. The only suggestion I would make is to multiply the return series by 100.0. That will change the order of magnitude on several of the coefficients that are quite small, which can help with the non-linear estimation. (The "G" coefficients won't change much, but that's because they are just not really very important).

Re: TGARCH

Posted: Sun Aug 08, 2010 6:03 pm
by marcia
Dear Tom,

Thank you for the suggestions. The contraint is that the dummy variable is within the actual observations of 500th and 1600th. I am not sure if RATS does two "if" statements at the same time.

Thank you very much for your time and help.

Marcia

Re: TGARCH

Posted: Sun Aug 08, 2010 8:14 pm
by TomDoan

Code: Select all

  compute h = h + %if(i=1,%if(t>=500.and.t<=1600,s(i)(2)*z(2)(t-1),0.0),1,0.0)
First, that needs to be i==1, not i=1 in condition on the first %if. While you can nest %if's, it looks as if what you really want is

Code: Select all

if i==1.and.t>=500.and.t<=1600
   compute h=h+s(i)(2)*z(2)(t-1)

Re: TGARCH

Posted: Mon Aug 09, 2010 1:14 am
by marcia
Dear Tom,

Thank you for the reply. I put two "if" statement for each equation.

if i==1.and.t>=600.and.t<=1500
compute h = h + d(i)(2)*z(2)(t-1)
end if

Thank you very much for your time and help

Marcia

Re: TGARCH

Posted: Mon Aug 09, 2010 7:37 am
by TomDoan
Get rid of all those "end if". You don't need those inside a procedure.

Re: TGARCH

Posted: Mon Aug 09, 2010 12:15 pm
by marcia
Dear Tom,

I have get rid of the end if and it works. I am unsure why it is giving me this result and how to correct it.

MAXIMIZE - Estimation by BFGS
NO CONVERGENCE IN 34 ITERATIONS
LAST CRITERION WAS 0.0000000
SUBITERATIONS LIMIT EXCEEDED. 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
119/Day of Undated Data From 1//002 To 60//048
Usable Observations 1

Thank you,

Marcia

Re: TGARCH

Posted: Mon Aug 09, 2010 1:20 pm
by TomDoan
marcia wrote:MAXIMIZE - Estimation by BFGS
NO CONVERGENCE IN 34 ITERATIONS
LAST CRITERION WAS 0.0000000
SUBITERATIONS LIMIT EXCEEDED. 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
119/Day of Undated Data From 1//002 To 60//048
Usable Observations 1
Please read your output carefully before posting a question. Again, you have 1 usable observation, which means that something isn't being defined correctly.