I am trying to define a deterministic variable in a stochastic RBC model by declaring a varexo_det BB. The objective is to simulate TFP shocks during a predetermined period. This is done by setting BB=1 or BB=0 for certain predetermined periods.

GDP is given by:

y = A*exp(BB*z)*k(-1)^alpha*h^(1-alpha);

The process for z is given by:

z = rho*z(-1) + stddev*eps_t;

BB=1 for t=1:20 and BB=0 otherwise:

shocks;

var eps_t; // Stochastic shock, defined with varexo

stderr 1;

```
var BB; // Deterministic shock, defined with varexo_det
periods 1:20;
values 1;
```

end;

stoch_simul(periods=200,irf=0);

However, oo_.exo_det_simul=0 for all periods and all variables are equal to their steady state values for all periods in the simulation.

I am sending the mod file attached, RBC01.mod. What should be changed to implement the predetermined shocks to BB? Is there another way to implement this kind of predetermined shocks combined with stochastic simulations?

RBC01.mod (1.5 KB)