estimagic is a Python package for nonlinear optimization with or without constraints. It is particularly suited to solve difficult nonlinear estimation problems. On top, it provides functionality to perform statistical inference on estimated parameters.
For a complete introduction to optimization in estimagic, check out the estimagic tutorial at SciPy2022 conference
estimagic wraps algorithms from scipy.optimize, nlopt, pygmo and more. See Optimizers
estimagic implements constraints efficiently via reparametrization, so you can solve constrained problems with any optimzer that supports bounds. See How to specify constraints
The parameters of an optimization problem can be arbitrary pytrees. See How to specify params.
The complete history of parameters and function evaluations can be saved in a database for maximum reproducibility. See How to use logging
Painless and efficient multistart optimization. See How to do multistart
The progress of the optimization is displayed in real time via an interactive dashboard. See How to use the dashboard.
Estimation and Inference#
You can estimate a model using method of simulated moments (MSM), calculate standard errors and do sensitivity analysis with just one function call. See MSM Tutorial
Asymptotic standard errors for maximum likelihood estimation.
estimagic also provides bootstrap confidence intervals and standard errors. Of course the bootstrap procedures are parallelized.
estimagic can calculate precise numerical derivatives using Richardson extrapolations.
Function evaluations needed for numerical derivatives can be done in parallel with pre-implemented or user provided batch evaluators.