Solve nonlinear perfect foresight models
Project description
Simulate nonlinear perfect foresight models in Python using AD
The baseline mechanism is a Newton-based stacking method in the spirit of Boucekkine (1995), Juillard (1996) and others. It is hence similar to the solver in dynare, but faster and more robust due to the use of automatic differentiation and sparse jacobians. Even IRFs for large-scale models with occassionally binding constraints can be computed in less than a second.
The package makes heavy use of automatic differentiation via jax!
There is some experimental, undocumented support to solve nonlinear HANK models. The approach to deal with the distribution is inspired by the Sequence-Space Jacobian method (Auclert et al., 2022, ECMA).
Installation
Installing the repository version from PyPi is as simple as:
pip install econpizza
The most recent version from GitHub with all experimental features can be installed via
pip install git+https://github.com/gboehl/grgrlib
pip install git+https://github.com/gboehl/econpizza
Note that the latter requires git to be installed.
Documentation
There is some documentation out there.
Citation
econpizza is developed by Gregor Boehl to simulate nonlinear perfect foresight models. Please cite it with
@Misc{boehl2022pizza,
title = {Econpizza: Solve all sorts of nonlinear perfect foresight models},
author = {Boehl, Gregor},
howpublished = {\url{https://github.com/gboehl/econpizza}},
year = {2022}
}
For the Boehl-Hommes method:
@techreport{boehl2021rational,
title = {Rational vs. Irrational Beliefs in a Complex World},
author = {Boehl, Gregor and Hommes, Cars},
year = 2021,
institution = {IMFS Working Paper Series}
}
I appreciate citations for econpizza because it helps me to find out how people have been using the package and it motivates further work.
References
Boehl, Gregor and Hommes, Cars (2021). Rational vs. Irrational Beliefs in a Complex World. IMFS Working papers
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for econpizza-0.1.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 89925677508560bb9f03c7a436f0a4ed0ca9717f3ebeabec7f34dded807ff305 |
|
MD5 | 5b8e0b3046ad59fd764f211e85c7b6fc |
|
BLAKE2b-256 | b2d8bc0ba050de9909cfd2edf35a5ce5bf65a03f4463a5d0c98f7bbf5a2bb5fc |