Welfare loss and infinite sums

Hi to everyone!
I have to evaluate the value of my objective function (welfare loss) in a new keynesian model. The value of the objective function W(t) is the infinite sum from 0 to infinitive of the parameter beta times a linear quadratic expression. How can I express the infiinte sum on dynare? I cannot linearize the expression, since in the command planner_objective ir must be quadratic, and is also impossible to write it in recursive form, since in the command leads or lags cannot enter. Can someone suggest me a trick?
Thank you!

I think you are confusing something. The planner_objective takes the period loss/welfare function, not the intertemporal objective


Not sure I understand your problem, but in Dynare you can write the infinite sum recursively in the model block if you need to evaluate welfare, I don’t understand why you should use the planner_objective

Welfare = u(Consumption, Labour) + beta*Welfare(1);


@Stéphane: you can define welfare recursively, but it will not work with Ramsey or discretionary policy, which what the user is doing in [Discretionary policy). As written there, if you need to work with leads/lags in the objective, you may have to work with auxiliary variables.

1 Like

Your file was very informative