Welfare comparison with Ramsey optimal policy

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.


createfigure2x2.m (1.45 KB)
MP_Comparison.m (4.32 KB)
ramsey.mod (9.45 KB)
GKsimp.mod (9.54 KB)

  1. Please use the unstable version. I don’t get a maxit problem there
  2. By design, it is not possible with Ramsey to have the welfare definition in the model and as the objective as in that case, you have the objective function again as a constraint. That will introduce a singularity. You have to drop the welfare definition from the model-block and only use it for the policy objective.
  3. How do you judge that Ramsey performs worse?

Thanks for recommending to use the unstable version, now I don’t run into a maxit problem.
Regarding performance, when I set the policy objective function in the ramsey model to maximize welfare, then I assess the model performance on the Welfare IRF for some shocks. As we cannot include a Welfare variable in the ramsey model block, I replicated it outside the code in the “MP_Comparison.m” file under ‘loss3’ variable. Since the steady state of the ramsey and the benchmark (IT) model is the same, I can assess the performance of the two models in a welfare sense by looking at the Welfare losses due to exogenous shocks. And my problem is, as I mentioned, that Ramsey suffers bigger losses than some other monetary policy framework (e.g. nGDP targeting).

I attached the additional relevant codes as well as an updated MP_Comparison .m file, which replicates the above mentioned
MP_Comparison.m (4.51 KB)
GKsimp_ngdp.mod (9.46 KB)

1 Like

Welfare analysis is not my strong suit, thus the late reply. Is it necessary that the Ramsey policy yields higher welfare as a response to every single shock? Alternatively, could it be that Ramsey is computed around a wrong steady state? There may be multiple ones.

Hi Professor Johannes, I have a similar question abou Ramsey Policy and Welfare computation.

I have a Non-linear model open economy NK model with four shocks written in two files:

In file Ramsey1.mod I calculate the ramsey_policy() within this environment.
In Rule1.mod I calculate the welfare under a basic taylor rule
Turns out that I want to find the consumption equivalent (lambda_utility) of ramsey_policy-welfare in relation to the simple monetary rule.

The ramsey_policy gives me as evaluate_planner_objective(M_,options_,oo_) the conditional welfare. So I want to compare this answer with the conditional welfare of a monetary-rule model.

As my model is non-linear and the Welfare Function is also non-linear (recursively defined) I run sotch_simul in rule1.mod with the option order=2 and save:

where WF = Util + betta*WF(+1).
WF_Rule1 is the conditional welfare of rule1 economy.

The problem arises when I try to evaluate the consumption equivalent for the ramsey_policy environment, and the questions are:

1- In ramsey1.mod, for a given

Utility = C^(1-\sigma_c)/(1-\sigma_c) + N^(1+\sigma_n)/(1+\sigma_n),

if I get every value of C and N and calculate the period-by-period sum weighted by \beta will I find the conditional welfare of this economy? Will it be the same value as evaluate_planner_objective(M_,options_,oo_)?

If it is so, then I just rewrite Utility as (1-lambda_utility)C^(1-\sigma_c)/(1-\sigma_c) + N^(1+\sigma_n)/(1+\sigma_n), calculate the sum and use it in a solver to find the lambda that equates this with WF_Rule1.

2- Is there an example where one calculates mannually the conditional welfare (using the values of C and N for each period and the discount factor)?

3- In a model with many shocks (say: eps_a technology, eps_z demand) I get C_eps_a; C_eps_z… so is welfare a mean of the sum after each shock? (i.e. I calculate WF_eps_z, WF_eps_a and then take the mean?

thanks for all the support!!


This problem is tricky. You cannot add the welfare function in mod-file under Ramsey as it would cause singularity. But unfortunately, evaluate_planner_objective does not return the appropriate planner value at higher order. So there is currently no good way to do this. It is still on our to-do-list.


I was wondering if this is now possible? Compute ramsey policy and compare welfare losses under alternative polices (IT, Peg).