Problem encountered when replicating the basic RBC

This is my code as follows, but I cannot replicate it using matlab.
问题


var c N L A y inv k;

varexo epsilon;

parameters theta gamma alpha delta rho sigma beta eta;

theta = 3.48;

gamma = 1.004;

alpha = 0.667;

delta = 0.025;

rho = 0.979;

sigma = 0.0072;

beta = 0.984;

eta=1;

model;

theta*L^(-eta)=(1/c)*(alpha*y/N);

1/c(+1)*beta*((1-alpha)*y(+1)/k(+1)+1-delta)=1/c*gamma;

L=1-N;

y=A*k^(1-alpha)*N^alpha;

c+inv-y=0;

gamma*k-inv(-1)-(1-delta)*k(-1)=0;

A=rho*A(-1)+epsilon;

end;

steady_state_model;

A=1;

L=(A*(theta/alpha)*(1-alpha)/(gamma/beta -1+delta)*((1-alpha)/(gamma/beta -1+delta)+1+delta-gamma));

N=1-L;

k=(A*((1-alpha)/(gamma/beta -1+delta)))^(1/alpha)*N;

y=A*k^(1-alpha)*N^alpha;

inv=gamma*k-(1-delta)*k;

c=y-inv;

end;

shocks;

var epsilon = 0.5^2;

end;

steady;

stoch_simul(periods=2100);

The dynare report:

  1. The Eq.7 should change from A=rho*A(-1)+epsilon;
    to log(A)=rho*log(A(-1))+epsilon;

  2. There is a residual value in Equation 1,so you should recalculate the variable L c y Nvalues in steady_state_model.

1 Like