Code_Q7_MacroV_Revazashvili_Jgamadze_Aliyev.m (646 Bytes)

When I run this matlab writes that there are parse error in 13rd line and I can’t see any error here.

Dear Kanan,

It seems to me that you are mixing stochastic simulations with perfect-foresight simulations. When I rewrite the code in the following form, it works for me.

```
var c k lab z;
varexo e;
parameters bet the del alp tau rho s;
bet = 0.95;
the = 0.357;
del = 0.012;
alp = 0.296;
tau = 2;
rho = 0.95;
s = 0.007;
model;
(c^the*(1-lab)^(1-the))^(1-tau)/c = bet*((c(+1)^the*(1-lab(+1))^(1-the))^(1-tau)/c(+1))*
(1+alp*exp(z(-1))*k(-1)^(alp-1)*lab^(1-alp)-del);
c = the/(1-the)*(1-alp)*exp(z(-1))*k(-1)^alp*lab^(-alp)*(1-lab);
k = exp(z(-1))*k(-1)^alp*lab^(1-alp)-c+(1-del)*k(-1);
z = rho*z(-1)+s*e;
end;
initval;
k = 1;
c = 1;
lab = 0.3;
z = 0;
e = 0;
end;
shocks;
var e;
periods 1:200;
values 1;
end;
steady;
simul(periods=500);
```

Based on my opinion, when performing the stochastic simulation you cannot prescribe the path of the exogenous variable using the stderr. If you want to simulate a stochastic sequence of surprise shocks, you should use the **simult_** function. See some older posts related to this topic.

Jan