Please help with the basic RBC model

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.

Please help with the basic RBC model

Postby firefoxxp » Thu May 02, 2013 1:45 pm

Hi,I am confused with the basic rbc code as follows, the first line in the model block is
(1/c) = beta*(1/c(+1))*(1+alpha*(k^(alpha-1))*(exp(z(+1))*l(+1))^(1-alpha)-delta);
When I change the timing into
(1/c) = beta*(1/c(+1))*(1+alpha*(k(+1)^(alpha-1))*(exp(z(+2))*l(+2))^(1-alpha)-delta);
That is , to postpone the interest rate one period, the two impulse response results are exactly the same. Could anyone tell me why the change of timing doesn’t change the result. Thanks a lot.
Code: Select all
% Basic RBC Model
%
% Jesus Fernandez-Villaverde
% Philadelphia, March 3, 2005

%----------------------------------------------------------------
% 0. Housekeeping (close all graphic windows)
%----------------------------------------------------------------

close all;

%----------------------------------------------------------------
% 1. Defining variables
%----------------------------------------------------------------

var y c k i l y_l z;
varexo e;

parameters beta psi delta alpha rho;

%----------------------------------------------------------------
% 2. Calibration
%----------------------------------------------------------------

alpha   = 0.33;
beta    = 0.99;
delta   = 0.023;
psi     = 1.75;
rho     = 0.95; 
sigma   = (0.007/(1-alpha));

%----------------------------------------------------------------
% 3. Model
%----------------------------------------------------------------

model;
  (1/c) = beta*(1/c(+1))*(1+alpha*(k^(alpha-1))*(exp(z(+1))*l(+1))^(1-alpha)-delta);
  psi*c/(1-l) = (1-alpha)*(k(-1)^alpha)*(exp(z)^(1-alpha))*(l^(-alpha));
  c+i = y;
  y = (k(-1)^alpha)*(exp(z)*l)^(1-alpha);
  i = k-(1-delta)*k(-1);
  y_l = y/l;
  z = rho*z(-1)+e;
end;

%----------------------------------------------------------------
% 4. Computation
%----------------------------------------------------------------

initval;
  k = 9;
  c = 0.76;
  l = 0.3;
  z = 0;
  e = 0;
end;

shocks;
var e = sigma^2;
end;

steady;

stoch_simul(hp_filter = 1600, order = 1);

%----------------------------------------------------------------
% 5. Some Results
%----------------------------------------------------------------

statistic1 = 100*sqrt(diag(oo_.var(1:6,1:6)))./oo_.mean(1:6);
dyntable('Relative standard deviations in %',strvcat('VARIABLE','REL. S.D.'),M_.endo_names(1:6,:),statistic1,10,8,4);
firefoxxp
 
Posts: 17
Joined: Fri Jan 11, 2013 1:02 pm

Re: Please help with the basic RBC model

Postby jpfeifer » Sun May 05, 2013 9:58 am

You are wrong, the IRFs do change. However, due to the large persistence and low time-preference, basically everythings looks the same, because the changes are tiny. For example, y increases on impact by 1.049 instead of 1.068%.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: Please help with the basic RBC model

Postby firefoxxp » Sun May 05, 2013 3:15 pm

I get it.Thank you very much.
I am still confused of the timing of the real interest rate in the decentralized RBC model.
In period t, firm produce with given capital stock k(-1), and have the capital demand function for k in period t+1, together with the capital supply function given by household, k and the interest rate is determined. But in period t+1,with techology shock, the output is different from the expected output in period t, and capital k is given in period t, then the marginal product of capital is not the same with the interest rate determined in period t. As in dynare the timing of a variable reflects when the variable is decided, I don't know what is the timing of the real interest rate in dynare.
I still wonder in the decentralized RBC model, in period t as firm choose capital k used in period t+1, I should input
alpha*y(+1)/k=r instead of alpha*y/k(-1)=r(-1), is it right?
Thanks a lot.
firefoxxp
 
Posts: 17
Joined: Fri Jan 11, 2013 1:02 pm

Re: Please help with the basic RBC model

Postby jpfeifer » Mon May 06, 2013 7:57 am

First of all, if you are confused, you can just use the standard paper notation (beginning of period stock notation) together with
Code: Select all
predetermined_variables k;

Second, in Dynare's end of period stock notation the interest rate at time t is
Code: Select all
 alpha*y/k(-1)=r

Only k is determined in the previous period. y can move at time t (e.g. when technology moves). Thus, r will also be determined at time t. For the expected real interest rate, shift everything by one period.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: Please help with the basic RBC model

Postby firefoxxp » Mon May 06, 2013 9:56 am

Thanks a lot!
firefoxxp
 
Posts: 17
Joined: Fri Jan 11, 2013 1:02 pm


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 8 guests