# How to put bounds on Nelder-Mead in Optim?

**URL:** <https://discourse.julialang.org/t/how-to-put-bounds-on-nelder-mead-in-optim/58183>\
**Category:** Optimization (Mathematical)\
**Tags:** question\
**Created:** [March 29, 2021, 6:44pm UTC](https://discourse.julialang.org/t/how-to-put-bounds-on-nelder-mead-in-optim/58183 "2021-03-29T18:44:41Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![hendri54](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/hendri54/32/9621_2.png) [@hendri54](https://discourse.julialang.org/u/hendri54)\
**Post date:** [March 31, 2021, 11:54am UTC](https://discourse.julialang.org/t/how-to-put-bounds-on-nelder-mead-in-optim/58183/5 "2021-03-31T11:54:08Z")

</div>

A long, perhaps off-topic discussion could start from here.

Among economists doing structural work, N-M is still quite popular. Whether this is a good choice or not, is hard to say. Each problem has its own issues and the question “what is the best algorithm?” probably does not have a good answer (unless it is a problem specific one).

One interesting reference for structural economic problems is

Arnoud, Antoine, Fatih Guvenen, and Tatjana Kleineberg. 2019. “Benchmarking Global Optimizers.” Working Paper 26340. National Bureau of Economic Research. [https://doi.org/10.3386/w26340](https://doi.org/10.3386/w26340).

Sorry - I could not resist going off topic for a bit. I am certainly not an expert on this and would welcome suggestions that I could try on my problems.

What I end up doing is actually building a sort of customized global optimizer for each problem. It first explores the parameter space globally, but only computes a subset of the target moments (or cheap approximations of the target moments). Then it solves several hundred of the “best” points according to this initial search. And finally it runs a local optimizer (usually N-M) on the best point resulting from that search.  
It seems to work well in the problems where I have tried it. Of course, I have no way of knowing whether I found (a point close to) the global optimum.

---

_[View the full topic](https://discourse.julialang.org/t/how-to-put-bounds-on-nelder-mead-in-optim/58183)._
