I am having the same problem with my code. I searched on the web but I could not find out why I am having spurious convergence.
I am pretty sure that my initial values are correct and I computed the steady state numerically.
Dynare gives me the same results as I computed for steady state however with the following error
Usually this means that either your initial values or the model are wrong and the model is so nonlinear that Dynare is unable to find the steady state. What you can try it to change the algorithm for the steady state computation (see manual) or try posting the mod-file.
Thanks very much for your response. I am trying to replicate the model by F. Busato and B. Chiarini, “Market and underground activities in a two-sector dynamic equilibrium model,” Economic Theory, 2004. Attached is the mod file. The parameters and initial values for some variables (e.g. tax rates) are as in the paper. I will appreciate it if you can give me a hand with this. rbc_underground_govt.mod (2.9 KB)
this means you have an initial values issue such as dynare can’t find the steady state. The instruction “resid;” can help you to find which equation doesnt hold in your model. Put it before “steady;” and you’ll see for instance that equation 2 has a too big residual
Thank you both for your helpful comments. I have re-specified the laws of motion for the tax shocks as suggested. Note that the initial tax rates are calibrated by the authors of the paper, not my desired values. Also, I noticed a mistake in equation 2 when I used the resid instruction.
I have rechecked the initial values, but this does not solve the convergence issue. I will continue working on this and let you know… Again, thank you very much!
I am trying to run the following code and it gives me the same warning that it cannot find steady state. I manually computed the steady state and plugged in the values. Can anyone point out what error I could have made? Thanks a lot.
/*Dynare File for occasional binding constraints*/
/*full model financial shock +TFP*/
periods 1000;
var omega lambda q D z k a theta c i y l re r d w cb ;
/* TFP, depo rate, loan return, cons, SDF, lag mult, lag mult, loan price, loan, dividends, gross ret on loan, deposits,
labor, capital, investment, adj cost, wage, output */
varexo u v;
parameters beta kappa rhoa rhotheta thetabar delta psi alpha sigma abar chi vpi b1 a1 phi phi1;
beta=0.99;/*discount rate*/
kappa=0.08;/*capital requirement*/
rhoa=0.96;/*shock persistence*/
rhotheta=0.66;
thetabar=1;
delta=0.025;/*depriciation*/
psi=100;/*penalty parameter = 1/tau*beta*/
alpha=0.33;/*capital share*/
sigma=1.75;/*risk aversion*/
abar=1;/*mean of TFP*/
chi=10.36;/*disutility of labor*/
vpi=.33;/*inverse frisch elasticity of labor supply*/
b1=0.5;/*adj cost 1*/
a1=0.67;/*adj cost 2*/
//c12=0.05;
phi=0;
phi1=0.6;
model;
beta*(c/c(+1))^sigma*(omega(+1)+lambda(+1))*(r(+1))=omega;/*FOC_deposit_bank*/
beta*(c/c(+1))^sigma*(omega(+1)+lambda(+1))*re(+1)+(1-kappa)*lambda=omega+lambda;/*FOC_loan_bank*/
lambda=1/psi*exp((psi/d(-1))*(d-(1-kappa)*q*k(+1)));/*punishment term*/
cb=(z+q*(1-delta))*theta*k(-1)-(r)*d(-1)-D-kappa*q*k(+1);
D=(z+q*(1-delta))*theta*k(-1)-(r)*d(-1)-q*k(+1)+d;
omega+lambda=1;
re(+1)=((1-delta)*q(+1)+z(+1))*theta/q;/*return on loans*/
z=alpha*a*(l/k(-1))^1-alpha;
ln(a)=(1-rhoa)*ln(abar)+rhoa*ln(a(-1))-u;
ln(theta)=(1-rhotheta)*ln(thetabar)+rhotheta*ln(theta(-1))-v;
k=(i+(1-delta)*k(-1));
//y=c+k(-1)*((b/1-a12)*(i/k(-1))^(1-a12)+c12);
y=c+k(-1)*phi1/2*(i/k(-1)-delta)^2;
y=a*k(-1)^alpha*l^(1-alpha);
//q=c12+((a12*b/1-a12)*(i/k(-1))^(1-a12));
q=1+phi1*(i/k(-1)-delta);
c+d=w*l+D+r*d(-1);
chi*l^(1-vpi)/(a1*c^(1-b1)+(1-a1)*d^(1-b1))^((b1-phi)/1-b1)*a1*c^(-b1)=(1-alpha)*a*k(-1)^alpha*l^(1-alpha);
(a1*c^(1-b1)+(1-a1)*d^(1-b1))^((b1-phi)/1-b1)*(1-a1)*d^(-b1)+beta*(a1*c(+1)^(1-b1)+(1-a1)*d(+1)^(1-b1))^((b1-phi)/1-b1)*a1*c(+1)^(-b1)=(a1*c^(1-b1)+(1-a1)*d^(1-b1))^((b1-phi)/1-b1)*a1*c^(-b1);
end;
initval;
r=1.0101;
re=1.0101;
a=1;
theta=1;
lambda=0.002575;
omega=0.997425;
k=5.86;
z=.045;
q=1;
D=.1142;
i=0.1465;
c=0.30;
y=2.185;
l=0.3;
d=0.0030;
cb=5;
w=4.89;
end;
//steady;
//check;
resid;
shocks;
var u;
stderr 0.01;
var v;
stderr 0.05;
end;
//steady;
//info=stoch_simul(var_list);
stoch_simul(dr_algo=0,periods=1000,order=3,irf=40);
//datasaver('simudata',]);
you have forgotten the parentheses around 1-alpha in the 8th equation, but fixing it is not sufficient to make it run.
If you are able to compute the steady state by hand, you should use the recursive solution in a steady_state_model block.
If the solution that you have computed by hand doesn’t solve the model in Dynare, it is because the two models are not identical. I suspect there are other parentheses mistakes in your *.mod file, but I don’t know the model…