Page 1 of 1

Solving RBC model from Dynare User Guide

PostPosted: Wed Nov 30, 2011 12:16 am
by Carol
Hi,
Can anyone help please?
I am trying to solve the stochastic RBC example model from Chapter 3 of the Dynare User Guide (by Tommaso Mancini Griffoile) but I cannot. What I did is define the steady state values (yss, css, kss etc) and I included the steady state equations in the .mod file. I also log linearized the equations in the model. However, I am not getting to simulate the model.

I have attached the file (which I adjusted slightly). The original file can be found in the User Guide (chapter 3) and also in the models folder under UserGuide in your installation of Dynare (the file name is RBC_Monop_JVC.mod).

Any assistance will be greatly appreciated. Thanks.

Re: Solving RBC model from Dynare User Guide

PostPosted: Wed Nov 30, 2011 7:28 am
by jpfeifer
Code: Select all
alpha = 0.33;
beta  = 0.99;
delta = 0.023;
psi   = 1.75;
rho   = 0.95;
gamma = 0.5;
sigma  = (0.007/(1-alpha));
epsilon = 10;

yss = kss^alpha*(1-alpha);
css = 1/(beta+beta*rss-beta*delta); 
kss = alpha/(1-alpha)*wss*lss*1/rss;
iss = kss-(1-delta)*kss;
lss = 1-(css/wss)*psi;
wss = (1-alpha)*yss/lss*((epsilon-1)/epsilon);
rss = alpha*(yss/kss)*((epsilon-1)/epsilon);
zss = 0;

is not a simultaneous equation system that Dynare solves. Rather, it is usual Matlab code. This does not work, because you use kss to define yss, but kss is only computed three lines later. If you execute the above lines as Matlab code, you will see that all numbers are NaN. This part of the code outside the model block has to be computable in the order entered in the mod-file.

Re: Solving RBC model from Dynare User Guide

PostPosted: Wed Nov 30, 2011 11:34 pm
by Carol
Thanks jpfeifer,
Are you indicating that I have to use a separate steady state file to get the steady state?

Re: Solving RBC model from Dynare User Guide

PostPosted: Thu Dec 01, 2011 7:37 am
by jpfeifer
No. I am saying you must compute your steady state in terms of the deep parameters. You must not enter circular code that uses undefined variables. You cannot use
Code: Select all
yss = kss^alpha*(1-alpha);
css = 1/(beta+beta*rss-beta*delta);
kss = alpha/(1-alpha)*wss*lss*1/rss;

The first line uses kss to compute yss. But what is kss and how should Dynare know? It is only computed two lines later!

Re: Solving RBC model from Dynare User Guide

PostPosted: Thu Dec 01, 2011 8:01 am
by Carol
Thanks again jpfeifer.