EGM$^n$: The Sequential Endogenous Grid Method

EGM$^n$ The Sequential Endogenous Grid Method”

badge

Heterogeneous agent models with multiple decisions are often solved using inefficient grid search methods that require many evaluations and are slow. This paper provides a novel method for solving such models using an extension of the Endogenous Grid Method (EGM) that uses Gaussian Process Regression (GPR) to interpolate functions on unstructured grids. First, I propose an intuitive and strategic procedure for decomposing a problem into subproblems which allows the use of efficient solution methods. Second, using an exogenous grid of post-decision states and solving for an endogenous grid of pre-decision states that obey a first-order condition greatly speeds up the solution process. Third, since the resulting endogenous grid can often be non-rectangular at best and unstructured at worst, GPR provides an efficient and accurate method for interpolating the value, marginal value, and decision functions. Applied sequentially to each decision within the problem, the method is able to solve heterogeneous agent models with multiple decisions in a fraction of the time and with less computational resources than are required by standard methods currently used. Software to reproduce these methods is available under the https://econ-ark.org/ project for the python programming language.

Details

Authors

Abstract

Heterogeneous agent models with multiple decisions are often solved using inefficient grid search methods that require many evaluations and are slow. This paper provides a novel method for solving such models using an extension of the Endogenous Grid Method (EGM) that uses Gaussian Process Regression (GPR) to interpolate functions on unstructured grids. First, I propose an intuitive and strategic procedure for decomposing a problem into subproblems which allows the use of efficient solution methods. Second, using an exogenous grid of post-decision states and solving for an endogenous grid of pre-decision states that obey a first-order condition greatly speeds up the solution process. Third, since the resulting endogenous grid can often be non-rectangular at best and unstructured at worst, GPR provides an efficient and accurate method for interpolating the value, marginal value, and decision functions. Applied sequentially to each decision within the problem, the method is able to solve heterogeneous agent models with multiple decisions in a fraction of the time and with less computational resources than are required by standard methods currently used. Software to reproduce these methods is available under the https://econ-ark.org/ project for the python programming language.

Actions

Live Interactive Notebook

This material includes a Jupyter Notebook version. You can directly launch and interact with the Notebook within your browser using MyBinder via the "Launch" button(s) below.

Binder badge logo

Material Source Code

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

View on GitHub

View Paper

An electronic version of the research paper associated with this material is avaiable to view and download.

View Paper

How to Execute this Notebook (with conda)

Install miniconda on your computer

  1. Open a Terminal (MacOS) or the Anaconda Prompt (Windows)
  2. 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 repo will disappear at reboot:
    • cd /tmp
  3. git clone https://github.com/alanlujan91/SequentialEGM --recursive
  4. cd SequentialEGM
  5. conda env create -f ./binder/environment.yml --prefix ./condaenv
    • This creates ./condaenv inside your clone of the repo, containing dependencies.
  6. conda run --prefix ./condaenv pip install jupyterlab
  7. conda run --prefix ./condaenv jupyter-lab

Metadata

Edit metadata