Code Monkey home page Code Monkey logo

sparseecon's Introduction

SparseEcon

This code is Copyright Andreas Schaab and Allen T. Zhang, 2021-, and it is made available under the MIT license.

Citation

If you find this software helpful, please cite our work:

  • Schaab, A. and A. T. Zhang. Dynamic Programming in Continuous Time with Adaptive Sparse Grids. Working Paper.

Overview and Applications

This repository provides a toolbox to solve dynamic programming problems in continuous time using adaptive sparse grids. Our method applies to a wide range of dynamic programming applications across many fields in economics.

We illustrate the power and applicability of our method by providing simple and accessible code to solve many dynamic programming applications using adaptive sparse grids. These can be found under local_repo_path/use_cases/. Enumerated examples include:

  • 01: Variant of Huggett (1993), earnings risk modeled either as a two-state Markov chain or diffusion process
  • 02: Variants of Aiyagari (1994), including borrowing wedges and non-convex capital taxes
  • 03: Two-asset variant of Aiyagari (1994), with a liquid asset (bond) and an illiquid asset (capital)
  • 04: Two-asset portfolio choice problem with a riskfree asset (bond) and a risky asset (stocks)
  • 05: Transition dynamics in response to MIT shocks in variant of Aiyagari (1994)
  • 06: Global solution of Krusell-Smith (1998) model
  • 07: Growth model with non-convex production technology in spirit of Skiba (1978)
  • 08: Life-cycle / OLG models, including variants with one-asset and two-asset portfolio choice problems
  • 09: One-asset HANK model in the spirit of McKay-Nakamura-Steinsson (2016)
  • 10: Two-asset HANK model in the spirit of Kaplan-Moll-Violante (2018)

In local_repo_path/use_cases/00_paper_replications, we include code that replicates all output from both our working paper "Dynamic Programming in Continuous Time with Adaptive Sparse Grids" and the Handbook Chapter we wrote together with Johannes Brumm, Christopher Krause and Simon Scheidegger, "Sparse grids for dynamic economic models".

Installation and Usage

Clone the repository and add the local path to your Matlab code, i.e.,

addpath(genpath('local_repo_path/lib/'))

Requirements

  • The software currently runs on MATLAB_R2021a

Unit Tests

To run unit tests and verify reproducibility of use cases, run the following shell commands:

§ export PATH=$PATH:/Applications/MATLAB_R2021a.app/bin
§ cd local_repo_path
§ zsh run_tests.command

(Cross-platform test make file to come.)

Acknowledgements

  • We are deeply grateful to Ben Moll. We have learned and benefited greatly from his work and, in particular, the code he has made available online (https://benjaminmoll.com/codes/). If you find our software useful, please also consider citing: Achdou, Y., J. Han, J.-M. Lasry, P.-L. Lions, and B. Moll. Income and wealth distribution in macroeconomics: A continuous-time approach. Review of Economic Studies, Forthcoming. 2021.
  • Some of our applications feature Linear Complementarity Problems, for which we use an LCP solver written by (Copyright, 2008) Yuval Tassa.
  • All other references can be found in our Working Paper.
  • Also check out the GitHub repository for our Handbook Chapter (with J. Brumm, C. Krause and S. Scheidegger): https://github.com/SparseGridsForDynamicEcon.

sparseecon's People

Contributors

andreasschaab avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.