Structural modeling of economic choices of heterogeneous agents

A Two-Asset Savings Model with an Income-Contribution Scheme

No content available.



  • Velásquez-Giraldo


This paper develops a two-asset consumption-savings model and serves as the documentation of an open-source implementation of methods to solve and simulate it in the HARK toolkit. The model represents an agent who can save using two different assets---one risky and the other risk-free---to insure against fluctuations in his income, but faces frictions to transferring funds between assets. The flexibility of its implementation and its inclusion in the HARK toolkit will allow users to adapt the model to realistic life-cycle calibrations, and also to embedded it in heterogeneous-agents macroeconomic models.


Live Interactive Notebook

This material includes a Jupyter Notebook version. You can directly launch and interact with the Notebook within your browser using MyBinder.

Launch Notebook

Material Source Code

Econ-ARK materials are open source and available to view and clone from GitHub.

View on GitHub

How to Execute this Notebook

Install econ-ark on your computer (Quick Start Guide then follow these instructions:

  1. At a command line, change the working directory to the one where you want to install
    • On MacOS/unix, if you install in the /tmp directory, the installation will disappear after a reboot:
    • cd /tmp
  2. git clone --recursive
  3. cd RiskyContrib
  4. jupyter notebook Code/Python/RiskyContrib.ipynb