Hi All,

I'm trying to compare the welfare properties of different policy rules in a version of the Gertler and Karadi (2011). In all of my model specifications I'm able to include a Welfare variable such that Welf = U(c,l) + beta*Welf(+1) , so I can directly see the welfare response for given exogenous shocks. As for a policy comparison, I also have the Ramsey optimal policy, however I encounter two problems:

1) For any general policy objevtive function (excluding the contemporaneous utility function), dynare runs into a 'maxit' problem. The code runs however, but there's clearly something wrong.

2) If the policy objective function is given by the utility function (which would be preferable to me instead of ad hoc quadratic loss functions), I'm not even able to include Welfare into the model equations as it coincides with the policy funtion. As a consequence, I tried to replicate the loss function (in the welfare sense) but the IRF of the Welfare (or loss) for different shocks of the ramsey model is not appropriate (performs worse sometimes for specific shocks than the others).

I could greatly appreciate if anyone could point me to the source of the problem and how could it be remediated.

I attached the simplified versions of the above mentioned codes.

Best,

Balazs