# Is stoch_simul(dr_algo=0) a syntax error?

Accompanying with Matlab, I downloaded the Dynare and ran a dynare program, as following P.S. A., produced by Barillas, Colacito and Kitao (2007), which did calibration of the two-country production model in Kim and Kim (2003). Barillas, Colacito and Kitao (2007) offered the Dynare practicing .mod file for reader. I ran with the .mod file, but the Dynare responsed to me with a syntax error, as following P.S. B., at line 44. 12-18, i.e. “stoch_simul(dr_algo=0,periods=200).” As I know, the “dr_algo” is a reserve word for the statement of stoch_simul. Why did the syntax error happen to me? How should I sort out the problem?
Best regards,
Dou-Ming Su (Mr.)

P.S.
A.
periods 200;
var c1 c2 k1 k2 a1 a2 y1 y2;
varexo e1 e2;

parameters gamma delta alpha beta rho;

gamma=2;
delta=.05;
alpha=.4;
beta=.98;
rho=.85;

model;
c1=c2;
exp(c1)^(-gamma) = betaexp(c1(+1))^(-gamma)(alphaexp(a1(+1))exp(k1)^(alpha-1)+1-delta);
exp(c2)^(-gamma) = beta
exp(c2(+1))^(-gamma)
(alphaexp(a2(+1))exp(k2)^(alpha-1)+1-delta);
exp(c1)+exp(c2)+exp(k1)-exp(k1(-1))
(1-delta)+exp(k2)-exp(k2(-1))
(1-delta) = exp(a1)exp(k1(-1))^alpha+exp(a2)exp(k2(-1))^alpha;
a1=rho
a1(-1)+e1;
a2=rho
a2(-1)+e2;
exp(y1)=exp(a1)*exp(k1(-1))^alpha;
exp(y2)=exp(a2)*exp(k2(-1))^alpha;
end;

initval;
y1=1.1;
y2=1.1;
k1=2.8;
k2=2.8;
c1=.8;
c2=.8;
a1=0;
a2=0;
e1=0;
e2=0;
end;

shocks;
var e1; stderr .08;
var e2; stderr .08;
end;

stoch_simul(dr_algo=0,periods=200);
datatomfile(‘simu2’,]);

B.

dynare TwocountryApprox

Configuring Dynare …
[mex] Generalized QZ.
[mex] Sylvester equation solution.
[mex] Kronecker products.
[mex] Sparse kronecker products.

Starting Dynare …
Starting preprocessing of the model file …
ERROR: TwocountryApprox.mod:44.12-18: syntax error, unexpected NAME

??? Error using ==> dynare at 96
DYNARE: preprocessing failed

Hi,

Actually the dr_algo option no longer serves any purpose.

There used to be a dr_algo=1 option, which was removed because it used an incorrect solution method. So now, dr_algo=0 is the only one possibility.

In the last version of dynare we therefore completely removed the dr_algo option. This is obviously a mistake, since it breaks old code as yours.

In the next release of Dynare, we will allow again “dr_algo=0” (but this option will have no effect, and will only be there for backward compatibility).

For the moment, just delete the “dr_algo=0” option in your code, and it should run fine.

Best

Sébastien

1 Like

Hi Sébastien,