The Sequential Endogenous Grid Method

The Sequential Endogenous Grid Method

Heterogeneous-agent models with multiple decisions face a computational dilemma. Joint optimization over all choices is slow; strong separability restrictions speed computation but rule out economically interesting interactions. I introduce Sequential EGM (EGM$^n$), which eases this tension by decomposing the problem into sequential stages so that each stage can exploit the Endogenous Grid Method’s closed-form inversion, chaining speed gains across decisions wherever separable utility or an invertible transition permits it. The resulting curvilinear grids require interpolation that respects their structure, so I develop ENGINE (ENdogenous Grid INterpolation and Extrapolation), which exploits the index structure inherited from exogenous grids, with no construction step and no triangulation. In the canonical liquid-illiquid household block, EGM$^n$ solves an order of magnitude faster than the nested method in serial and $3.7$ to $7.9$ times faster at sixteen threads. Replacing existing curvilinear interpolation with ENGINE cuts full-solve time $2.8$- to $4.5$-fold at matched accuracy.

Reproduction

  • reproduce.sh regenerates every table, figure and quoted reading of the paper and online appendix into content/figures/, one command per row of the exhibit table in code/README.md.
  • reproduce_min.sh runs the test suite and builds the website with every example notebook executed, in a few minutes.

Both scripts install the locked environment with uv sync --locked first.

Reference

Lujan, Alan. “The Sequential Endogenous Grid Method.” Working paper. See CITATION.cff.

Details

Authors

Abstract

Heterogeneous-agent models with multiple decisions face a computational dilemma. Joint optimization over all choices is slow; strong separability restrictions speed computation but rule out economically interesting interactions. I introduce Sequential EGM (EGM^n), which eases this tension by decomposing the problem into sequential stages so that each stage can exploit the Endogenous Grid Method’s closed-form inversion, chaining speed gains across decisions wherever separable utility or an invertible transition permits it. The resulting curvilinear grids require interpolation that respects their structure, so I develop ENGINE (ENdogenous Grid INterpolation and Extrapolation), which exploits the index structure inherited from exogenous grids, with no construction step and no triangulation. In the canonical liquid-illiquid household block, EGM^n solves an order of magnitude faster than the nested method in serial and 3.7 to 7.9 times faster at sixteen threads. Replacing existing curvilinear interpolation with ENGINE cuts full-solve time 2.8- to 4.5-fold at matched accuracy.

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

Binder badge logo

Binder badge logo

Binder badge logo

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 (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