Solve nonlinear perfect foresight models
Project description
Simulate nonlinear perfect foresight models, with or without heterogeneous agents
The baseline mechanism is a Newton-based stacking method in the spirit of Boucekkine (1995), Juillard (1996) and others. Hence, the method is similar to the solver in dynare, but faster and more robust due to the use of automatic differentiation and sparse jacobians. Even perfect-foresight IRFs for large-scale nonlinear models with, e.g., occassionally binding constraints can be computed in less than a second.
The package makes heavy use of automatic differentiation via jax.
The package allows 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). Steady state and nonlinear impulse responses (including, e.g., the ELB) can typically be found within a few seconds.
Installation
Installing the repository version from PyPi is as simple as:
pip install econpizza
Alternatively, the most recent version from GitHub with some 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
The documentation can be found here.
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.7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8ed746643fef73a32c090af02da0f6599b6efe5d60785c4c26e3f7d94cfa29a4 |
|
MD5 | 7a38aba3d89a6c9bd8c0d907f3f1a0ca |
|
BLAKE2b-256 | a070946cb5696e86cd16c3289fbe3380ba66605b9031e0b07b1dd22c8fb8d3e5 |