I’m trying to understand the Gali_2015/Gali_2015_chapter_5_commitment_ZLB.mod file, and I wanted to know if the perfect foresight solver can be used in case of a technology shock when looking at the ZLB case?

Thank you for your response. I have a two sector model and wanted to work out the optimal policy response to a technology shock. I have tried to model it based on your codes, but that doesn’t seem to work well. It says: “Failed to solve perfect foresight model” and the interest rate remains at the initial value only, not sure if that is correct.
The mod file is: zlb_base.mod (8.7 KB) . I would really appreciate your help with this. Thank you!

Hello! I tried working this out using the Ramsey Constraints under Optimal Policy (as in the Dynare Manual), but that hasn’t been successful either. I would please appreciate your help with this. Thank you!

The code for technology shock based on your codes for Gali’s Chapter 5 is zlb_base.mod (8.7 KB) and the one using Ramsey Constraints is ramseycons.mod (12.8 KB).

Does the model work with a Taylor rule? It seems you have 2 missing equations but only one specified instrument

I am not sure your ramsey_constraint is correct. The steady state of interest rate is 0, so how is it always supposed to be above 0? Shouldn’t it be something like

Thank you very much for getting back and for your comments.

I had missed one equation and I have corrected for that now. After accounting for that missing equation, the model works fine with the Taylor rule and also for optimal policy without the ZLB.
I have also made the change with the Ramsey Constraints and have also incorporated the fix you’ve given, but the perfect foresight model fails to solve for the case of ZLB. ramseycons.mod (12.8 KB)

I even tried to put the technology shocks (Codes attached above: zlb_base.mod) in line with your codes for Gali chapter 5 for the case of ZLB, but it doesn’t seem to work either.

The problem is the order of declarations. You need a call to steady to update the parameter definitions. With perfect foresight, there is not automatic call to the steady state file. Because you are using Ramsey, you also need to set the planner_discount before a call to steady. Thus, ramsey_model needs to be before steady. Use ramseycons.mod (12.8 KB)
Also note that your model is not linear anymore with the ramsey_constraint. So don’t specify it as model(linear).

Thank you very much for your detailed reply, this is very helpful.
This solves the model but the nominal interest rate is negative in the IRFs, why would that be when we have imposed the ZLB?

Say your discount factor is 0.99 and you have 0 inflation in steady state. Then the steady state nominal interest rate is roughly 1%. If you linearize your model as you did, the nominal interest rate can fall by this 1% before hitting the ZLB.