Skip to content

NumEconCopenhagen/ConsumptionSaving

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

82 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ConSav: Consumption-Saving Models

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.

Installation

The package can be installed with

pip install EconModel
pip install ConSav

Development

To develop the package follow these steps:

  1. Clone this repository
  2. Locate the cloned repostiory in a terminal
  3. Run pip install -e .

Changes you make to the package is now immediately effective on your own computer.