# Second order moments to obtain welfare

**URL:** <https://forum.dynare.org/t/second-order-moments-to-obtain-welfare/6363>\
**Category:** Optimal Policy\
**Created:** [19 July 2017 21:41 UTC](https://forum.dynare.org/t/second-order-moments-to-obtain-welfare/6363 "2017-07-19T21:41:23Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![leycxgy](https://forum.dynare.org/letter_avatar_proxy/v4/letter/l/51bf81/32.png) [@leycxgy](https://forum.dynare.org/u/leycxgy)\
**Post date:** [19 July 2017 21:41 UTC](https://forum.dynare.org/t/second-order-moments-to-obtain-welfare/6363/1 "2017-07-19T21:41:23Z")

</div>

Dear Johannes,

I am currently trying to use estimated Smets Wouters (2003) model to compare welfare under interest rate rule and constant money growth rule. According to Michel Juillard (2006) “welfare-based monetary policy rules in an estimated DSGE model of the US economy” and Stephane Adjemian (2007) "Optimal Monetary Policy in an Estimated DSGE for the Euro Area’’, they can use the estimated parameters to compute to model and solve the welfare by using second order moments from non-linearized model.  
However, you said we can’t do it in this way. Could you give me some suggestions about this problem, please? Thank you very much!

Best wishes,  
Michael

---

<div class="post-metadata">

**Author:** ![stepan-a](https://forum.dynare.org/user_avatar/forum.dynare.org/stepan-a/32/6652_2.png) [@stepan-a](https://forum.dynare.org/u/stepan-a)\
**Post date:** [20 July 2017 08:35 UTC](https://forum.dynare.org/t/second-order-moments-to-obtain-welfare/6363/2 "2017-07-20T08:35:28Z")

</div>

Dear Michael,

Could you give a link to what Johannes said about this issue?

Best,  
Stéphane.

---

<div class="post-metadata">

**Author:** ![jpfeifer](https://forum.dynare.org/user_avatar/forum.dynare.org/jpfeifer/32/5044_2.png) [@jpfeifer](https://forum.dynare.org/u/jpfeifer)\
**Post date:** [20 July 2017 17:56 UTC](https://forum.dynare.org/t/second-order-moments-to-obtain-welfare/6363/3 "2017-07-20T17:56:05Z")

</div>

The approach you outline is not 100 percent consistent due to using different orders for estimation and evaluation, but can be used if one accepts this caveat. The actual problem lies in the Smets/Wouters (2003/2007) model. It features markup shocks. These markup shocks imply that the nonlinear Keynesian Phillips curve does not have a recursive representation due to the time-varying exponents. This implies you cannot solve the nonlinear model at second order (unless you truncate the arising infinite sum).

---

<div class="post-metadata">

**Author:** ![Grant](https://forum.dynare.org/letter_avatar_proxy/v4/letter/g/a5b964/32.png) [@Grant](https://forum.dynare.org/u/Grant)\
**Post date:** [23 July 2017 13:42 UTC](https://forum.dynare.org/t/second-order-moments-to-obtain-welfare/6363/4 "2017-07-23T13:42:39Z")

</div>

Dear Jpfeifer,

I have one follow-up question. As you said, for a model with markup shocks, we cannot derive a recursive representation about nonlinear Keynesian Phillips curve. But how should we do if we want to solve the nonlinear model in order to do the policy/welfare analysis?

I am looking forward to your reply. Thanks in advance.

---

<div class="post-metadata">

**Author:** ![stepan-a](https://forum.dynare.org/user_avatar/forum.dynare.org/stepan-a/32/6652_2.png) [@stepan-a](https://forum.dynare.org/u/stepan-a)\
**Post date:** [23 July 2017 13:59 UTC](https://forum.dynare.org/t/second-order-moments-to-obtain-welfare/6363/5 "2017-07-23T13:59:12Z")

</div>

As @jpfeifer said there is no recursive representation of the Calvo forward variables with the shocks on the elasticities of the aggregation functions. A possibility is to replace the mark-up shock with a shock on the dividends of the intermediary firms (you can do the same with the unions). The only difference is that the shock does not appear additively in the linearized Phillips curve, as the mark up shock, but is multiplied by a non linear function of some parameters (the slope of the Phillips curve if I remember correctly). So obviously the impact on the variance of inflation will be different.

Best,  
Stéphane.

---

<div class="post-metadata">

**Author:** ![jpfeifer](https://forum.dynare.org/user_avatar/forum.dynare.org/jpfeifer/32/5044_2.png) [@jpfeifer](https://forum.dynare.org/u/jpfeifer)\
**Post date:** [24 July 2017 10:11 UTC](https://forum.dynare.org/t/second-order-moments-to-obtain-welfare/6363/6 "2017-07-24T10:11:43Z")

</div>

@Grant You should have a look at the post [Markup shock in SGU?](https://forum.dynare.org/t/markup-shock-in-sgu/6081) In higher order approximated models, one can use a fixed cost shock. The reference is Andreasen (2013)

---

<div class="post-metadata">

**Author:** ![Grant](https://forum.dynare.org/letter_avatar_proxy/v4/letter/g/a5b964/32.png) [@Grant](https://forum.dynare.org/u/Grant)\
**Post date:** [8 August 2017 16:03 UTC](https://forum.dynare.org/t/second-order-moments-to-obtain-welfare/6363/7 "2017-08-08T16:03:10Z")

</div>

Dear Jpfeifer,

Thanks for your help.

I now have another question. When I type my model in levels in dynare, I can put every variable in exp() or not. To make the code consistent, my understanding is if I type exp(), then in the “steady\_state\_model” block I should put every variable in log(); if I don’t type exp(), I should type log() in the steady state block. Am I right?

---

<div class="post-metadata">

**Author:** ![jpfeifer](https://forum.dynare.org/user_avatar/forum.dynare.org/jpfeifer/32/5044_2.png) [@jpfeifer](https://forum.dynare.org/u/jpfeifer)\
**Post date:** [8 August 2017 18:25 UTC](https://forum.dynare.org/t/second-order-moments-to-obtain-welfare/6363/8 "2017-08-08T18:25:05Z")

</div>

Yes, you are right. But it is most often more convenient to just define auxiliary variables for the log levels you actually need. An example is [https://github.com/JohannesPfeifer/DSGE\_mod/blob/master/Jermann\_Quadrini\_2012/Jermann\_Quadrini\_2012\_RBC/Jermann\_Quadrini\_2012\_RBC.mod](https://github.com/JohannesPfeifer/DSGE_mod/blob/master/Jermann_Quadrini_2012/Jermann_Quadrini_2012_RBC/Jermann_Quadrini_2012_RBC.mod)

---

<div class="post-metadata">

**Author:** ![Grant](https://forum.dynare.org/letter_avatar_proxy/v4/letter/g/a5b964/32.png) [@Grant](https://forum.dynare.org/u/Grant)\
**Post date:** [9 August 2017 04:52 UTC](https://forum.dynare.org/t/second-order-moments-to-obtain-welfare/6363/9 "2017-08-09T04:52:42Z")

</div>

Dear Jpfeifer,

Thanks for your feedback.

Sorry for my typo in the previous post. I mean, if I don’t put type exp(), I should NOT type log() in the “steady\_state\_model” block. Am I right?

As for the link you shared, I didn’t see the steady state block in the post.

---

<div class="post-metadata">

**Author:** ![stepan-a](https://forum.dynare.org/user_avatar/forum.dynare.org/stepan-a/32/6652_2.png) [@stepan-a](https://forum.dynare.org/u/stepan-a)\
**Post date:** [9 August 2017 05:46 UTC](https://forum.dynare.org/t/second-order-moments-to-obtain-welfare/6363/10 "2017-08-09T05:46:54Z")

</div>

Yes. If a variable is declared in logarithm in the `model` block, by putting it inside an exponential function, you have to consistently define the steady state, by defining the logarithm of the variable in the `steady_state_model` block. For the other variables which are not in logarithm there is no reason to do that.

Best,  
Stéphane

---

<div class="post-metadata">

**Author:** ![Grant](https://forum.dynare.org/letter_avatar_proxy/v4/letter/g/a5b964/32.png) [@Grant](https://forum.dynare.org/u/Grant)\
**Post date:** [9 August 2017 07:41 UTC](https://forum.dynare.org/t/second-order-moments-to-obtain-welfare/6363/11 "2017-08-09T07:41:39Z")

</div>

Thank you so much, Stephane.

---

<div class="post-metadata">

**Author:** ![jpfeifer](https://forum.dynare.org/user_avatar/forum.dynare.org/jpfeifer/32/5044_2.png) [@jpfeifer](https://forum.dynare.org/u/jpfeifer)\
**Post date:** [9 August 2017 09:12 UTC](https://forum.dynare.org/t/second-order-moments-to-obtain-welfare/6363/12 "2017-08-09T09:12:16Z")

</div>

In the linked file above, there is no `steady_state_model`-block, because a steady state file was used: [https://github.com/JohannesPfeifer/DSGE\_mod/blob/master/Jermann\_Quadrini\_2012/Jermann\_Quadrini\_2012\_RBC/Jermann\_Quadrini\_2012\_RBC\_steadystate.m](https://github.com/JohannesPfeifer/DSGE_mod/blob/master/Jermann_Quadrini_2012/Jermann_Quadrini_2012_RBC/Jermann_Quadrini_2012_RBC_steadystate.m)
