estimagic is a Python package to fit large scale empirical models to data and make inferences about the estimated model parameters. It is especially suited to solve difficult constrained optimization problems.
estimagic provides several advantages over similar packages, including a unified interface that supports a large number of local and global optimization algorithms and the possibility of monitoring the optimization procedure via a beautiful interactive dashboard.
estimagic provides tools for nonlinear optimization, numerical differentiation and statistical inference.
estimagic wraps algorithms from scipy.optimize, nlopt, pygmo and more. See Available optimizers and their options
estimagic implements constraints efficiently via reparametrization, so you can solve constrained problems with any optimzer that supports bounds. See How to specify constraints
estimagic encourages name-based parameters handling. Parameters are specified as pandas DataFrames with any kind of single or MultiIndex. See How to specify start parameters.
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.