I am working on a framework for solving and estimating large-scale macroeconomic models, which needs to:
- Compute a fixed point of a system of nonlinear equations, given parameters
- Solve for a linear approximation to a policy function around this fixed point
- Do Bayesian estimation of model parameters from data, re-computing (1) and (2) after each MCMC sampler draw.
I am feeling optimistic that it might be possible to do (3) using a NUTS sampler by implementing the whole system in Aesara, which would make the entire model solving and approximation process end-to-end differentiable.
I am working on step (1) right now, and I am curious whether there are ways to perform numerical minimization algorithms, basically any of the usual nonlinear solvers the scipy.optimize.root
and .root_scalar
wrap, inside an Aesara graph. I had a look at the docs, but in that context “optimization” doesn’t appear to have the meaning I hoped it would.
Any resources on this topic would be greatly appreciated!