Dear Dynare Community,
I try to replicate the paper:
Optimal monetary policy in a New Keynesian model with heterogeneous expectations.
Journal of Economic Dynamics & Control. 73 (2016) pp. 373387.
Di Bartolomeo et al.
I encounter the following problem:
If I solve the linear model under commitment or discretion, with the ramsey_policy
or discretionary_policy
command, and use the default discount factor (=1) I obtain the following warning message:

For
ramsey_policy
:warning: division by zero warning: called from evaluate_planner_objective at line 64 column 6 ramsey_policy at line 57 column 29 Di_Bartolomeo_et_al at line 205 column 1 dynare at line 223 column 1 warning: division by zero warning: called from evaluate_planner_objective at line 74 column 5 ramsey_policy at line 57 column 29 Di_Bartolomeo_et_al at line 205 column 1 dynare at line 223 column 1 Approximated value of planner objective function  with initial Lagrange multipliers set to 0: NaN  with initial Lagrange multipliers set to steady state: NaN

For
discretionary_policy
:warning: division by zero warning: called from evaluate_planner_objective at line 64 column 6 discretionary_policy at line 38 column 29 Di_Bartolomeo_et_al at line 172 column 1 dynare at line 223 column 1 warning: division by zero warning: called from evaluate_planner_objective at line 74 column 5 discretionary_policy at line 38 column 29 Di_Bartolomeo_et_al at line 172 column 1 dynare at line 223 column 1 Approximated value of planner objective function with discretionary policy: NaN
If I use instead, e.g. ramsey_policy(planner_discount = b);
, where b=0.99
I do not encounter any problems like the ones above.
Can someone tell me where the problem is?
The warning message tells me that somewhere a division by zero appears, most likely in the planner objective.
When defining the period loss function, line 63 in the code below, I can not find any possible reason for a division by zero if the discount factor changes.
I appreciate any comments.
Thanks in advance.
Di_Bartolomeo_et_al.mod (4.3 KB)
Best regards,
Max