Loop over parameters - program

Hi everyone,

I’m trying to run a model where parameters of Taylor Rule are optimal and implementable (like Schmitt-Grohe and Uribe language). For that reason, I wrote a code (max_example.m) that run a loop for 4 parameters (inertial parameter and responses to GDP, Inflation and Bank Leverage) and It search the tuple that maximize a welfare criterion (second order aproximation). There are not problems with .mod code and with this “searching” code, but it’s so slow. Only for searching three parameters it take 10 hours to obtain the optimal answers, so if I want to run the program for the 4 parameters It will take around 5 days.

My question is…Is there another way to write a code with this objective that demand less time to obtain the same results? In other words, I need a more efficient code. I tried with Matlab fmincon procedure and It’s faster than my code but, I think, it’s so sensitive to seed numbers (maybe obtain local maximums).

This is key for my master’s thesis, so I really appreciate any help.

Carlos.
max_example.m (2.17 KB)

Please have a look at [Loop over parameters) to see how to only call the Dynare preprocessor once.