Page 1 of 1

simulated annealing in dynare

PostPosted: Fri Sep 19, 2008 11:26 am
by lombard
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

Re: simulated annealing in dynare

PostPosted: Wed Sep 12, 2012 2:52 pm
by lombard
dynare_estimation adapted for Dynare v4.3.0

Best

Gianni

Re: simulated annealing in dynare

PostPosted: Sat Sep 15, 2012 3:06 pm
by peter487
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

Re: simulated annealing in dynare

PostPosted: Mon Sep 24, 2012 1:04 pm
by lombard
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

Re: simulated annealing in dynare

PostPosted: Fri Apr 17, 2015 5:15 am
by jpfeifer
Both optimizers will be integrated in Dynare 4.5 and are included in the unstable version from 18/04/2015