Optimal policy rule

Attached is a calibrated dsge model which has been solved for steady states. I want to estimate optimal monetary and macroprudential policy a la Quint and Rabanal - Monetary and Macroprudential Policy in an estimated model of euro area (2013) where as they explain they optimize over the coefficients of the estimated taylor rule and then further extend it. How do I achieve this in dynare? I am under the impression that I just have to add the following

planner_objective (ln(c-thetac(-1))-eln(n));
ramsey_policy(planner_discount=1, order=1);

or if I use optimal simple rule I will have to switch off the taylor rule expression in my model and rewrite the general rule with coefficients over which it is to be estimated.

Or do i need to estimate the whole model again but now by defining the objective function as a welfare criterion with weights on different agents in the model (it is a heterogenous agent model)

What would be a simple way to approach this issue.
utility_opt_10.mod (8.86 KB)

I quickly skimmed the paper. They first estimate the model using standard Bayesian techniques. Then they keep all parameters fixed except for the policy parameters over which they optimize. If I see it correctly they use optimal simple rules (osr) and not Ramsey.

Thanks johannes.

But I ran the optimal simple rule in dynare as suggested in the paper but it reproduced the initial values of the parameters as the optimal parameter which is absurd.

OPTIMAL SIMPLE RULE

OSR: Initial value of the objective function: 2.40758



f at the beginning of new iteration, 2.4075798109
Norm of dx 0

Improvement on iteration 1 = 0.000000000
improvement < crit termination
zero gradient

OPTIMAL VALUE OF THE PARAMETERS:

phi_p 1.8

phi_y 0.5

Objective function : 2.40758

Can you please point out where I am going wrong.
Thanks.
utility_opt_10.mod (9.26 KB)

Please do not cross-post. My answer is at [Osr reproducing initial values as optimal values)