# Finding optimal parameters of a non-linear model

**URL:** https://forum.dynare.org/t/finding-optimal-parameters-of-a-non-linear-model/20593
**Category:** Optimal Policy
**Created:** [24 June 2022 06:21 UTC](https://forum.dynare.org/t/finding-optimal-parameters-of-a-non-linear-model/20593 "2022-06-24T06:21:31Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![nmklipm](https://forum.dynare.org/letter_avatar_proxy/v4/letter/n/b487fb/32.png) [@nmklipm](https://forum.dynare.org/u/nmklipm)
#### Post date: [24 June 2022 06:21 UTC](https://forum.dynare.org/t/finding-optimal-parameters-of-a-non-linear-model/20593/1 "2022-06-24T06:21:31Z")

</div>

Hello everyone,

I am working on finding the parameters of monetary policy rules that maximize welfare, and compare the rules through the consumption equivalence. I have a question that may seem very obvious but I can’t find the right reasoning. Searching in the forum about this topic I found two very popular posts, this:

[Optimal policy parameters in a non-linear model](https://forum.dynare.org/t/optimal-policy-parameters-in-a-non-linear-model/11772):

and this:

[Loop over parameters](https://forum.dynare.org/t/loop-over-parameters/3335):

Both posts talk about finding the parameters that maximize a function, but in one post it’s done using a loop and in another it’s done using the csminwel function. Is there any difference between both approaches? Or can they be used interchangeably?

Best Regards

---

<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 June 2022 08:03 UTC](https://forum.dynare.org/t/finding-optimal-parameters-of-a-non-linear-model/20593/2 "2022-06-24T08:03:35Z")

</div>

One of them is a grid search, the other a direct search for a local optimum. These are different approaches for finding a minimum. The grid search does not work for high-dimensional problems but will perform better to find a global maximum on the grid.
