G0025 : Undefined symbol '_cml_Bounds' + G0155 : Nested procedure definition

Dear listers,

I am trying to run the following program, I get always the same error messages:

G0025 : Undefined symbol '_cml_Bounds'

G0155 : Nested procedure definition

would you like please to help me about that.

Thanks in adavance

******************************************************************************************

new;
library co,tsm, nmead, cml,_cml_Bounds;

data = xlsreadm("roil.xls","a1:b251",1,0);

re1 = data[.,2];

nobs = rows(re1); TB1 = 0.27; TB2 = 0.65;

sb1 = round(TB1 * nobs); sb2 = round(TB2 * nobs);

sb = sb1|sb2;

freq =0.01; tt1 = 1/freq-1;

T1 = 0.1*tt1; T2 = TB2;
/********************************* GARCH (1 1) **********************************/

{b_garch,llk,grad,vacov,retcode,hhat_oose}=garch11(re1,(0.01|0.1|0.8|0.1|0.4|0.3|0.5));

sess = (sqrt(abs(vacov)))';

b_garc = b_garch;

se = (sqrt(abs(diag(vacov))))';

tvalue = (b_garch[5]-1)/se[5];

b_garche = meanc(b_garc');

ses = stdc(b_garc');
format /rd 1,4; /* now the outpt is printed to the screen */

print "parameter estimates (standard errors) ";

print "omega = " b_garche[1] "(" ses[1] ")";
print "arch = " b_garche[2] "(" ses[2] ")";
print "garch = " b_garche[3] "(" ses[3] ")";

print "consdt = " b_garche[4] "(" ses[4] ")";
print "ar(1) = " b_garche[5] "(" ses[5] ")";

print " break dummies(1) = " b_garche[6] "(" ses[6] ")";
print " break dummies(2) = " b_garche[7] "(" ses[7] ")";

/*****************************************************************
proc: GARCH11

This procedure estimates the GARCH(1,1) model,

h(t) = omega + alpha*e^2(t-1) + beta*h(t-1).

It calls the procedures GARCH11_LOGLIKE and GARCH11_HHAT
(provided below) and uses the GAUSS application CML.

Format: {b,f,g,vcv,ret,hhat}=GARCH11(depvar,startvalues)

Input:

depvar = T-vector, dependent variable
startvalues = vector of inital values

Output:

b = 3-vector of parameter estimates (omega,alpha,beta)
f = scalar, log-likelihood function at minimum
g = 3-vector, gradient at minimum
vcv = variance-covariance matrix for parameters
ret = scalar, CML return code
hhat = T-vector of conditional variance estimates at
each point in time
*****************************************************************/
proc(6)=garch11(depvar,startvalues);
local b,f,g,vcv,ret,hhat;
cmlset;
_cml_Bounds={0.0000001 10,
0 1,
0 1,
-10 10,
-1 1,
-10 10,
-10 10};

__output=0;
{b,f,g,vcv,ret}=cml(depvar,0,&garch11_loglike,startvalues);
//_nmd_PolyCoef = 1|2|0.5|0.5; _nmd_SetProc = &par_constr;
//{ b,retcode } = Nmead(&garch11_loglike,startvalues);
hhat=garch11_hhat(b,depvar);
retp(b,f,g,vcv,ret,hhat);
endp;

/*****************************************************************
proc: GARCH11_LOGLIKE
*****************************************************************/
proc garch11_loglike(x,data);
local e,bigt,mean_e2,alphapart,h,posi,pos,i,du,temp;

posi = round(T1 * rows(data))|round(T2 * rows(data));

du = (zeros(posi[1],1) | ones(rows(data)-posi[1],1))~(zeros(posi[2],1) | ones(rows(data)-posi[2],1));

e = data - x[4]- x[5]*missrv(lagn(data,1),meanc(data))- x[6]*du[.,1] - x[7]*du[.,2];

e = e[2:rows(data)];

bigt=rows(e); mean_e2=meanc(e^2);

alphapart=x[1]+x[2]*missrv(lagn(e^2,1),mean_e2);

h=recserar(0|alphapart,mean_e2,x[3]);

h=h[2:bigt+1];
retp(-(bigt/2)*ln(2*pi)-(1/2)*sumc(ln(h)+(e^2)./h));
endp;

/*****************************************************************
proc: GARCH11_HHAT
*****************************************************************/
proc garch11_hhat(x,e);
local bigt,mean_e2,alphapart,h;

bigt=rows(e); mean_e2=meanc(e^2);

alphapart=x[1]+x[2]*missrv(lagn(e^2,1),mean_e2);

h=recserar(0|alphapart,mean_e2,x[3]);
h=h[2:bigt+1];
retp(h);
endp;
proc(2)= simu(n,posi,consd,alfa,beta,aa,ro,sb1,sb2);
local h,y,e,t,du,i,temp;
/*
input: n - number of data,
consd - conditional varaince and covariance equation, constant parameter ,
alfa - arch parameter,
beta - garch parameter,
aa- mean equation, constant parameter ,
ro - AR(1) parameter.
sb1 - break dummies(1)
sb2 - break dummies(2)
*/

h = zeros(n,1);
e = zeros(n,1);
y = zeros(n,1);

du = (zeros(posi[1],1) | ones(n-posi[1],1))~(zeros(posi[2],1) | ones(n-posi[2],1));

h[1] = consd/(1-alfa-beta); /*unconditional variance is set as initial value */

e[1] = sqrt(h[1])*rndn(1,1);

y[1] = aa + e[1];

t = 2; do while t <= n;

h[t] = consd + alfa*(e[t-1])^2 + beta*h[t-1];
e[t] = sqrt(h[t])*rndn(1,1);
y[t] = aa + sb1*du[t,1] + sb2*du[t,2] + ro*y[t-1] + e[t];

t = t+1; endo;
retp(y,h);
endp;

*****************************DATA (roil)*****************************************

2012m11 0,39216999
2012m12 1,01817758
2013m1 1,84510031
2013m2 -1,35567271
2013m3 0,90955574
2013m4 1,23882343
2013m5 -0,56117123
2013m6 0,14332134
2013m7 1,60234115
2013m8 -2,86213019
2013m9 4,36416974
2013m10 0,904797
2013m11 1,9813374
2013m12 -1,66004294
2014m1 0,47381867
2014m2 0,3572936
2014m3 -0,24844312
2014m4 0,207866
2014m5 1,76020137
2014m6 -1,59827191
2014m7 1,4686687
2014m8 1,22118662
2014m9 -0,78328855
2014m10 0,04979144
2014m11 0,64384054

3 Answers



0



The first thing to check would be to see if CML is installed correctly.

  1. Change to the GAUSS examples directory
  2. Enter: new at the GAUSS command prompt
  3. Try to run one of the CML examples, such as cml1.e or cml2.e.

Based upon your report, I expect that the CML example file will not run. If that is the case, we will need to look at your CML installation. But first, try the instructions above and see what happens.

aptech

1,773


0



Thank you for your reply. absolutely I get the follwings messages:

G0014 : File not found 'cml1.e

G0014 : File not found 'cml2.e'

N.K



0



This means that your CML library is not installed correctly and/or is missing some parts. You should download CML again and reinstall it. If you do not know how to get into your download account you can contact Aptech customer service throught the Contact Us page.

aptech

1,773

Your Answer

3 Answers

0

The first thing to check would be to see if CML is installed correctly.

  1. Change to the GAUSS examples directory
  2. Enter: new at the GAUSS command prompt
  3. Try to run one of the CML examples, such as cml1.e or cml2.e.

Based upon your report, I expect that the CML example file will not run. If that is the case, we will need to look at your CML installation. But first, try the instructions above and see what happens.

0

Thank you for your reply. absolutely I get the follwings messages:

G0014 : File not found 'cml1.e

G0014 : File not found 'cml2.e'

N.K

0

This means that your CML library is not installed correctly and/or is missing some parts. You should download CML again and reinstall it. If you do not know how to get into your download account you can contact Aptech customer service throught the Contact Us page.


You must login to post answers.

Have a Specific Question?

Get a real answer from a real person

Need Support?

Get help from our friendly experts.