Finding optimal parameters of a non-linear model

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:

and this:

Loop over parameters:

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

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.