Investment model in Partial Equilibrium

Dear colleagues,
I’m trying to run a model of investment in partial equilibrium with distortionary taxes. I want to compute the transitional dynamics, the model solves for the steady states, but it doesn´t solve for the path. In fact dynare shows the following error:

Error using sim1 (line 144)
Simulation terminated with NaN or Inf in the residuals or endogenous variables. There is most likely something wrong with your model.

Error in simul (line 126)
sim1;

Error in EquiParcial (line 254)
simul();

Error in dynare (line 180)
evalin(‘base’,fname) ;

I would appreciate a lot if someone have any hint about this error.

I attach the Dynare code,

Best

Juan.
EquiParcial.mod (3.81 KB)

That’s because your timing is wrong. TFP is not a predetermined variable. It is only an exogenous state. If you drop z_t from the

command, it will run. You could see this problem from the Blanchard-Kahn conditions not being satisfied. If your model is locally unstable, it will most probably not work globally as well.