Skip to article content

The Endogenous Grid Method for Epstein-Zin Preferences

Solving consumption-savings problems with recursive utility

README

Abstract

The endogenous grid method (EGM) accelerates dynamic programming by inverting the Euler equation. This paper derives an EGM algorithm for consumption-savings problems with Epstein-Zin preferences. The transformation W=V1−ρW = V^{1-\rho} recasts the Epstein-Zin certainty equivalent as a power mean whose inverse exists in closed form, and the EGM update applies that inverse at each grid point. Because the inversion is pointwise, the construction does not depend on the dimensionality of the state space; this paper presents the one-asset case, and the same inversion combines naturally with multi-asset and life-cycle settings. The resulting algorithm requires no root-finding, runs one to two orders of magnitude faster than value function iteration, and improves accuracy by more than one order of magnitude; at equal accuracy the speedup over value function iteration is two to three orders of magnitude. In a benchmark calibration with risk aversion 10 and elasticity of intertemporal substitution 1.5, the method solves the infinite-horizon problem on 100 grid points in 13 milliseconds with mean log⁡10\log_{10} Euler error of -4.8, and the welfare cost of the approximation is below 0.1% of permanent consumption.

The Endogenous Grid Method for Epstein-Zin Preferences

arXiv SSRN DOI

Solving consumption-savings problems with recursive utility

Alan Lujan ORCID

Krieger School of Arts and Sciences, Johns Hopkins University, Washington, DC 20036, USA; Econ-ARK

Corresponding author: alujan@jhu.edu



Highlights


Keywords

Endogenous grid method; Epstein-Zin preferences; Recursive utility; Dynamic programming; Consumption-savings

JEL Classification: C61, C63, D15


Requirements

Install dependencies with:

uv sync

Reproducibility

Code to reproduce all results is available at https://github.com/alanlujan91/ezegm.

To run the benchmarks:

cd code
uv run python benchmark_paper.py


Citation

If you use this code, please cite:

@article{lujan2026egm,
  title={The Endogenous Grid Method for Epstein-Zin Preferences},
  author={Lujan, Alan},
  year={2026},
  doi={10.2139/ssrn.6048966},
  url={https://github.com/alanlujan91/ezegm}
}

License

(c) 2026 Alan Lujan



Funding

This work was supported by the Alfred P. Sloan Foundation [G-2025-79177].


Declaration of Generative AI and AI-Assisted Technologies in the Manuscript Preparation Process

During the preparation of this work the author used Claude (Anthropic) to assist with code development and manuscript editing. After using this tool, the author reviewed and edited the content as needed and takes full responsibility for the content of the published article.

Acknowledgments

I am grateful to Christopher D. Carroll for years of mentorship, for detailed feedback on this paper, and for sustained support throughout my career. I also thank Matthew N. White for extensive discussions and collaboration that shaped this work, Jeppe Druedahl for helpful comments, John Stachurski for valuable discussions, and an anonymous referee for comments that substantially improved the paper’s positioning.

Data Availability

This project contains only code; no external datasets are required. All results can be reproduced using the code in this repository.

References
  1. Lujan, A. (2026). The Endogenous Grid Method for Epstein-Zin Preferences. Zenodo. 10.5281/ZENODO.18176983