# Perfect foresight simulation failed

Hi,

I am trying to calculate the government spending multiplier at the ZLB in the sticky information model with a targeting rule of the form: \phi \pi + y = 0.

To implement the ZLB, I specify the complementary slackness condition as follows:
[mcp = ‘i > -0.0030’]
\phi \pi + y = 0;

When I run the code, I get the following error:
“Simulation of the perfect foresight model failed!
Switching to a homotopy method…”
Then the code runs for another hour but returns without a solution.

I referred to some of the past posts on this topic and checked that if I run the model without the ZLB condition, then I get a solution, which makes me sure that I have specified the non linear model correctly.

Best,
Vaishali

sige_reis.m (1.3 KB)
reis_i_zlb.mod (2.9 KB)
reis_ni_zlb.mod (2.8 KB)

Have you tried working with a smaller model initially? Your current model has 567 equations, which may be tough to solve.

Hi,

Maybe I can try a version with fewer lagged variables - thank you.

I did try this targeting rule and complementary slackness condition in the sticky price model, which has much fewer equations as it doesn’t have the lagged expectation variables. But I get the same error - “failed to find a perfect foresight solution”.

Best,
Vaishali

1. Does the version without ZLB work?
2. If yes, does a ZLB version with tiny shocks work?

Hi Johannes,

1. Yes.
2. Yes. I tried playing around with both the size and persistence of the shock.

But I resolved the issue just now - Apparently, the correct way to specify the target rule in dynare is:

[mcp 'i>-0.0030']
$0 = \phi \pi + y;$

[mcp 'i>-0.0030']
$\phi \pi + y = 0;$

I don’t understand why it makes a difference. Any idea? Just so I can avoid these silly mistakes in the future.

And, thank you for your help!

Best,
Vaishali

@MichelJuillard Is this intended behavior or a bug?

1. This isn’t a bug. Changing the way the equation is written in other models has no impact on the solution.
2. LMMCP is a nonlinear solver and therefor the sign of the residuals matters for the path to the solution. In this particular case, writing the equation in a non intuitive manner helps for the convergence to the solution.
3. More importantly, in reis_i_zlb.mod, the complementarity slackness condition isn t correctly written, It should be
[mcp: i > -0.003]
i = ϕπ+y;
which means: if i > -0.003, the equation is used, otherwise i is set to -0.003 and the equation isn t used
4. The loop in sige_reis.m doesn t work because Phi is a row vector.

Hi Michel,

Thank you so much!

One further clarification: When you say in (3):
“the complementarity slackness condition isn t correctly written, It should be
[mcp: i > -0.003]
i = ϕπ+y;
which means: if i > -0.003, the equation is used, otherwise i is set to -0.003 and the equation isn’t used”

do you mean if i>-0.003 the equation used will be 0 = \phi \pi + y = 0 or i = \phi \pi + y, because I need it to be the former.

Thanks!

If I understand it correctly, the tag tells you the condition under which the equation you enter is used. @MichelJuillard’s example is one where the standard Taylor rule
i = ϕπ+y;
is used as long as the interest rate is above the effective lower bound at -0.003. You seem to have a different rule in mind.

I don’t understand. When i > -0.003 the ZLB isn’t binding and the normal policy rule should apply:
i = ϕπ+y;
if ϕπ+y would generate a value of i < -0.003, then the condition is binding and i is set = -0.003

In each case, i is determined.
I don’t understand what is the meaning of
0=ϕπ+y

Thanks Johannes!

Michel - I am trying to implement a targeting rule 0 = \phi \pi + y rather than a reaction function i = \phi_\pi \pi + \phi_y y. There are cases where the two are observationally equivalent, for instance \phi = 0 in the targeting rule corresponds to strict output targeting, which can be implemented using \phi_\pi =0, \phi_y = 10000 in the reaction function. Similarly policy rule parameter values can be worked out for strict inflation targeting, such that the two rules would be equivalent. But for anything in between, it’s not obvious (to me) how the two policy rules can be made equivalent.

Basically, 0 = \phi \pi + y is just a general form of a targeting rule, which nests the cases of strict inflation targeting, strict output targeting and anything in between depending on \phi.

If you want to use complementarity slackness condition, you need to say how i is determined when the condition is not binding and i is set by the condition when it is binding. If your model is not setting i explicitly, then you can’t use the complementarity slackness condition.
Furthermore, it seems very strange to me that the policy maker be able to control inflation and output gap directly and impose 0 = ϕπ+y in every period. Usually, in these models we make a distinction between the instrument – the interest rate – and the target (inflation or inflation and output gap or any variant of thereof)