Ramsey_model vs. discretionary_policy

Dear all,

I am working with a simple New Keynesian model with diagnostic expectations, have computed optimal policy in the descretionary and commitment case analytically and try compute the welfare losses for different specifications now with Dynare.

The code attached runs through perfectly for “ramsey_model”, but it does not for “discretionary_policy” (I just exchange “discretionary_policy” for “ramsey_model” in line 61 of the code). Instead it gives an error:

“discretionary_policy:: There are more declared instruments than omitted
equations.”

Do you have an idea what is wrong?

Thank you already in advance for your time and effort. Very much appreciated as always!

nkm_diagnostic_ramsey.mod (1.8 KB)

The specific message looks like a bug: Correct logic of orig_eq_nbr (#101) · Issues · Dynare / preprocessor · GitLab. But Ramsey is also problematic in your case, because you did not leave out one equation to have one instrument the planner chooses.

Thanks for clarifying that!

When I would like to compare the “Approximated value of planner objective function”, i.e. welfare losses, from “ramsey_problem” to “discretionary_policy”, I would have to compute the value for the discretionary case myself now.

Could you give me a hint, which exact formula dynare uses to compute these values?

Why do you need to compute the objective manually?

Because the discretionary_policy function does not work in my case, right?
And I want to compare the losses between discretionary and commitment policy.

The main issue is the number of equations. The bug has been fixed in tomorrow’s unstable version and will be part of Dynare 5.2 to be released at the end of the week. The fix is at discretionary_policy_initialization.m: fix logic of check for instruments (e9a19024) · Commits · Dynare / dynare · GitLab