A code library for solving and simulating consumption-saving models in Python using Numba JIT compiled functions. The consav package provides:
- A Model class with predefined methods for e.g. saving and loading derived from the EconModel package
- A multi-linear interpolation module
- Optimizers such as golden section search and newton-raphson
- An upper envelope function for using the endogenous grid point method in non-convex models
All of the above is written to be Numba compatible.
The repository ConsumptionSavingNotebooks contains a number of examples on using the various tools and two models:
- The canonical buffer-stock consumption model
- A durable consumption models with non-convex adjustment costs
The library builds on the model class in EconModel. The repository EconModelNotebooks contains a number of examples on using this underlying model class.
New to Python? Try out this online course, Introduction to programming and numerical analysis.
The package can be installed with
pip install EconModel
pip install ConSav
To develop the package follow these steps:
- Clone this repository
- Locate the cloned repostiory in a terminal
- Run
pip install -e .
Changes you make to the package is now immediately effective on your own computer.