# Optimal policy problems

**URL:** <https://forum.dynare.org/t/optimal-policy-problems/12347>\
**Category:** Optimal Policy\
**Created:** [31 August 2018 14:40 UTC](https://forum.dynare.org/t/optimal-policy-problems/12347 "2018-08-31T14:40:26Z")\
**Posts on this page:** 1\
**Showing post:** 10

<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:** [13 September 2018 10:18 UTC](https://forum.dynare.org/t/optimal-policy-problems/12347/10 "2018-09-13T10:18:48Z")

</div>

@MichelleHuang You want to do a grid search instead of running an optimizer. And I was recommending here to use the `simult_`-function, not to run the full `get_consumption_equivalent_conditional_welfare.m` as the question is not for the consumption equivalent.

@petiteelf

1. As outlined in [Loop over parameters to find maximized welfare](https://forum.dynare.org/t/loop-over-parameters-to-find-maximized-welfare/12358/9), the formula relying on `oo_.dr.ghs2` is only valid in the deterministic steady state, while the `simult_`-function can be used for any point you like. As you are interested in conditional welfare in the deterministic steady state, both should give the same answer.
2. You need to investigate why the moments in `oo_.var` are `NaN`. Those are the unconditional moments and they should exist. The question whether you are considering conditional welfare does not alter the fact that we are interested in the unconditional second moments.

---

_[View the full topic](https://forum.dynare.org/t/optimal-policy-problems/12347)._
