Loop over parameters - program

This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location where you will have to reset your password.
Forum rules
This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location (https://forum.dynare.org) where you will have to reset your password.

Loop over parameters - program

Postby Feanor » Tue Sep 29, 2015 6:50 pm

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.
Attachments
max_example.m
(2.17 KiB) Downloaded 130 times
Feanor
 
Posts: 4
Joined: Fri Aug 17, 2012 4:05 am

Re: Loop over parameters - program

Postby jpfeifer » Sun Oct 04, 2015 10:03 am

Please have a look at http://www.dynare.org/phpBB3/viewtopic.php?f=1&t=4891 to see how to only call the Dynare preprocessor once.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 9 guests