Basic rbc model with temporary and permanent shocks

An alternative is to have both a stationary and a unit root shock in an undetrended model:

var y, c, k, a, h, a_temp, a_perm;
varexo e, u;

parameters beta, rho, alpha, delta, theta, psi, tau;

alpha = 0.36;
rho   = 0.95;
tau   = 0.025;
beta  = 0.99;
delta = 0.025;
psi   = 0;
theta = 2.95;

phi   = 0.1;

model;
c*theta*h^(1+psi)=(1-alpha)*y;
k = beta*(c/c(+1))*(alpha*y(+1)+(1-delta)*k);
y = exp(a)*(k(-1)^alpha)*(h^(1-alpha));
k = (y-c)+(1-delta)*k(-1);
a = a_temp+a_perm;
a_temp=rho*a_temp(-1) + e;
a_perm=a_perm(-1) + u;
end;

initval;
y = 1.08068253095672;
c = 0.80359242014163;
h = 0.29175631001732;
k = 11.08360443260358;
a = 0;
a_temp = 0;
a_perm= 0;
e = 0;
u = 0;
end;

shocks;
var e; stderr 1;
var u; stderr 1;
end;
check;
stoch_simul(order=1,irf=200);
1 Like