simulated annealing in dynare

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.

simulated annealing in dynare

Postby lombard » Fri Sep 19, 2008 11:26 am

Hi,

some time ago I posted the Goffe's simulated annealing code.
I see that in version 4 the SA minimization algorithm has bee eliminated
error('ESTIMATION: mode_compute=2 option (Lester Ingber''s Adaptive Simulated Annealing) is no longer available')

Here you find attached the dynare_estimation.m file that includes two alternative minimization codes: solveopt and simulated annealing (for the first I attach a document, for the second see William L. Goffe "SIMANN: A Global Optimization Algorithm using Simulated Annealing", Studies in Nonlinear Dynamics & Econometrics", 1996.

In order to select the first you need to set options_.mode_compute=101; for the second options_.mode_compute=102, in the .mod file.

The options for both optimizers need still to be changed in dynare_estimation.m. To see what the options mean, check out the sa file and the solveopt document.

Both codes have been slightly changed by me to be able to pass data as a varargin argument to your function.

Gianni
Attachments
dynare_estimation.m
(56.04 KiB) Downloaded 346 times
solveopt.zip
(380.12 KiB) Downloaded 573 times
sa.zip
(16.64 KiB) Downloaded 517 times
lombard
 
Posts: 132
Joined: Wed Feb 02, 2005 12:36 pm
Location: Basel

Re: simulated annealing in dynare

Postby lombard » Wed Sep 12, 2012 2:52 pm

dynare_estimation adapted for Dynare v4.3.0

Best

Gianni
Attachments
dynare_estimation.m
(6.88 KiB) Downloaded 207 times
lombard
 
Posts: 132
Joined: Wed Feb 02, 2005 12:36 pm
Location: Basel

Re: simulated annealing in dynare

Postby peter487 » Sat Sep 15, 2012 3:06 pm

Could you please post again dynare_estimation adapted for Dynare 4.3.0? The file you posted exactly matches the one shipped with Dynare 4.3.0 or does it mean that changes are no longer needed?
Thanks
peter487
 
Posts: 14
Joined: Thu Sep 13, 2012 3:26 pm

Re: simulated annealing in dynare

Postby lombard » Mon Sep 24, 2012 1:04 pm

My apology to all those that downloaded the amended file.
I didn't realize that it was the wrong file.
The new version of Dynare uses a dynare_estimation_1.m file, where the optimization instructions have to
be given.

Here is the amended file that allows for sa estimation with csminwel1 refining the results (I've set the options of sa
so to have no more than 50K draws and a relatively imprecise outcome (1e-6)). I find that combining the two optimization
methods is faster than asking sa to find the optimum.
The sa commands are at about line 219. To activate this block must set
Code: Select all
options_.compute_mode=102.

in the .mod file.
Best

Gianni
Attachments
dynare_estimation_1.m
(53.02 KiB) Downloaded 205 times
lombard
 
Posts: 132
Joined: Wed Feb 02, 2005 12:36 pm
Location: Basel

Re: simulated annealing in dynare

Postby jpfeifer » Fri Apr 17, 2015 5:15 am

Both optimizers will be integrated in Dynare 4.5 and are included in the unstable version from 18/04/2015
------------
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 contributions and examples

Who is online

Users browsing this forum: No registered users and 5 guests