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 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 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¶
Solving consumption-savings problems with recursive utility
Krieger School of Arts and Sciences, Johns Hopkins University, Washington, DC 20036, USA; Econ-ARK
Corresponding author: alujan@jhu.edu
Highlights¶
Power transformation extends EGM to Epstein-Zin preferences
Algorithm eliminates root-finding while tracking policy and value
Speed gains of 17x over time iteration (TI) and 60x over value function iteration (VFI); 166-744x over VFI at equal accuracy
Accuracy improves by over one order of magnitude versus VFI and TI
Method generalizes to risk-sensitive preferences and limiting cases
Keywords¶
Endogenous grid method; Epstein-Zin preferences; Recursive utility; Dynamic programming; Consumption-savings
JEL Classification: C61, C63, D15
Requirements¶
Python >= 3.12
JAX, NumPy, SciPy, Numba, QuantEcon, Matplotlib
Install dependencies with:
uv syncReproducibility¶
Code to reproduce all results is available at https://
To run the benchmarks:
cd code
uv run python benchmark_paper.pyCitation¶
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.
- Lujan, A. (2026). The Endogenous Grid Method for Epstein-Zin Preferences. Zenodo. 10.5281/ZENODO.18176983