Dynare cannot find steadystate for RBC with search frictions
Posted: Fri Nov 13, 2015 11:53 am
Dear all,
I am trying to run a very simple RBC model with search frictions in the labor market, but Dynare is not able to find the steady-state solution. I guess I made a mistake in the model part - specifically a mistake in modeling the JCC or Euler equation (and the related stochastic discount factor). Could someone please check this section? The entire model is defined in levels and is not linearized, respectively. Is this maybe causing difficulties?
I am working on this for days and cannot find the mistake. I started many time to write down my model from scratch with pencil and paper, but cannot figure out what is going wrong. If I did any obvious mistake, I apologize! But I am feeling that I am running against a wall.
Please find also attached the mod-file.
I am trying to run a very simple RBC model with search frictions in the labor market, but Dynare is not able to find the steady-state solution. I guess I made a mistake in the model part - specifically a mistake in modeling the JCC or Euler equation (and the related stochastic discount factor). Could someone please check this section? The entire model is defined in levels and is not linearized, respectively. Is this maybe causing difficulties?
- Code: Select all
%----------------------------------------------------------------
% 1. Preamble
%----------------------------------------------------------------
var y cbeta c a w m theta q n u v; // (11 variables)
//y output
//cbeta discount factor
//c consumption
//a technology
//w wage
//m matches
//theta labor market tightness
//q vacancy filling rate
//n employment
//u searching workers
//v posted vacancies
varexo ea;
//ea shock parameter
parameters ceta cgamma crho csigma r h s z;
//ceta elasticity of the matching function
//cgamma workers' relative bargaining power
//crho persistency of technology shocks
//csigma relative risk aversion
//r real interest rate
//h costs of holding a vacancy open
//s exogenous job separations rate
//z unemployment benefits
ceta = 0.5000;
cgamma = 0.7200;
crho = 0.9000;
csigma = 2.0000;
r = 0.1000;
h = 0.1324;
s = 0.1000;
z = 0.7088;
%----------------------------------------------------------------
% 2. Model
%----------------------------------------------------------------
model; //(11 equations)
%------RBC-Part------%
//Output
y = a * n;
//Consumption Euler equation:
c^(-csigma) = cbeta*c(+1)^(-csigma)*(1+r(+1));
//Stochastic discount factor:
cbeta = c^(csigma)/c(+1)^(csigma);
//Technology:
a = crho * a(-1) + ea;
%------Search-Frictions-Part------%
//Matching function
m = a*u^(ceta)*v^(1-ceta);
//Labor market tightness
theta = v/u;
//Probability of filling a vacancy
q = m/v;
//Definition of employment:
n = (n(-1)+m(-1)) * (1-s);
//Definition of unemployment:
u = 1-n;
//Job creation condition;
h/q = cbeta * (1-s) * (c(+1)^(-csigma)/c^(-csigma))*(y(+1)-w(+1)+h/(q(+1)));
//Wage:
w = (1-cgamma)*z+cgamma*(y+h*theta);
end;
%----------------------------------------------------------------
% 3. Steady-state & inital value section
%----------------------------------------------------------------
initval; //(11 variables)
y = 0.7505;
cbeta = 0.9900;
c = 1.0000;
a = 1.0000;
w = 1.0808;
m = 0.0811;
theta = 0.4286;
q = 0.7000;
n = 0.7500;
u = 0.2703;
v = 0.1158;
end;
steady;
check;
%----------------------------------------------------------------
% 4. Shocks
%----------------------------------------------------------------
shocks;
var ea;
stderr 0.0049;
end;
%----------------------------------------------------------------
% 5. Computation
%----------------------------------------------------------------
stoch_simul(order=1,irf=40);
I am working on this for days and cannot find the mistake. I started many time to write down my model from scratch with pencil and paper, but cannot figure out what is going wrong. If I did any obvious mistake, I apologize! But I am feeling that I am running against a wall.
Please find also attached the mod-file.