convergence problem

This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location where you will have to reset your password.
Forum rules
This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location (https://forum.dynare.org) where you will have to reset your password.

convergence problem

Postby jhgruber » Sun May 13, 2007 5:13 pm

Dear all,
I got a convergence problem with a very textbook RBC model, I played around a while and can not figure out the problem, I use the correct steady state values as initial values but get all the time error messages like:

??? Error using ==> resol
RESOL: convergence problem in DYNARE_SOLVE

Error in ==> c:\dynare\matlab\stoch_simul.m
On line 34 ==> dr_=resol(ys_,options_.dr_algo,options_.linear,options_.order);

Error in ==> C:\Dokumente und Einstellungen\grj27812\Eigene Dateien\Dissertation\Computation\Final Model\Matlab\Dynare_exercises\One_period_model\One_period_SP.m
On line 94 ==> stoch_simul(var_list_);

Error in ==> c:\dynare\matlab\dynare.m
On line 21 ==> evalin('base',fname) ;

here are the lines of the mod file:

periods = 400;
var C, N, K, L, Z;
varexo ep;
parameters alfa, mc, bet, dk, roh;

alfa = 0.35;
mc = 0.3;
bet = 0.95;
dk = 0.05;
roh = 0.95;

model;
mc/C = L;
(1-mc)/(1-N) = L*(1-alfa)*K^alfa*Z^(1-alfa)*N^(-alfa);
K(+1) + C = (K^alfa)*((Z*N)^(1-alfa)) + (1-dk)*K;
bet*(alfa*L(+1)*K(+1)^(alfa-1)*(Z(+1)*N(+1))^(1-alfa)-(1-dk))= L;
Z=(Z(-1)^roh)*exp(ep);
end;

initval;

C = 0.248;
N = 0.230;
K = 0.346;
L = 1.211;
Z = 1; ep = 0;
end;

shocks;
var ep;
stderr 0.01;
end;

stoch_simul;


Any help offered would be greatly appreciated.

many thanks

johannes
jhgruber
 
Posts: 7
Joined: Thu May 10, 2007 11:43 am

Postby MichelJuillard » Mon May 14, 2007 3:30 pm

1) your Euler equation is wrong. L(+1) should be outside of the parentheses
2) use the following initial values. Yours are too far from the solution
C = 0.0248;
N = 0.230;
K = 0.0346;
L = 3.211;
Z = 1; ep = 0;
3) The capital stock should be lagged by one period (Dynare requires stocks at the end of the period)

Best

Michel
MichelJuillard
 
Posts: 680
Joined: Thu Nov 18, 2004 10:51 am

Postby jhgruber » Mon May 14, 2007 3:53 pm

Dear Michel,

it works perfect now, thanks a lot

Johannes
jhgruber
 
Posts: 7
Joined: Thu May 10, 2007 11:43 am


Return to Dynare help

Who is online

Users browsing this forum: Google [Bot] and 6 guests