Skip to article content

Abstract

The endogenous grid method (EGM) accelerates dynamic programming by inverting the Euler equation, but it appears incompatible with Epstein-Zin preferences where the value function enters the Euler equation. This paper shows that a power transformation resolves the difficulty. The resulting algorithm requires no root-finding, achieves speed gains of one to two orders of magnitude over value function iteration, and improves accuracy by more than one order of magnitude. Holding accuracy constant, the speedup is two to three orders of magnitude. VFI and time iteration face a speed-accuracy tradeoff; EGM sidesteps it entirely.

Keywords:Endogenous grid methodEpstein-Zin preferencesRecursive utilityDynamic programmingConsumption-savings

Introduction

The endogenous grid method (EGM) of Carroll (2006) inverts the Euler equation to obtain consumption as a function of end-of-period assets, eliminating root-finding and accelerating computation by orders of magnitude. EGM is now widely used in structural estimation of consumption-savings problems, including models of precautionary saving and liquidity constraints in the tradition of Deaton (1991). Barillas & Fernández-Villaverde (2007) extend the method to multiple controls; Iskhakov et al. (2017) handle discrete-continuous choice.

Separately, Epstein-Zin preferences, developed by Epstein & Zin (1989), Epstein & Zin (1991), and Weil (1989), have become standard in macro-finance for their ability to separate risk aversion from intertemporal substitution. Building on the temporal lottery framework of Kreps & Porteus (1978), these preferences are theoretically well-grounded: Duffie & Epstein (1992) establish existence and uniqueness in continuous time; Ren & Stachurski (2020) provide modern discrete-time foundations. Yet EGM has not been applied to Epstein-Zin preferences. The apparent obstacle is that the value function enters the Euler equation. Existing approaches based on time iteration, such as Coeurdacier et al. (2020), treat consumption, value, and expected value as simultaneous control variables, requiring numerical root-finding on a system of non-linear equations at every grid point in every iteration.

This paper shows that such computational expense is unnecessary. A power transformation converts the Epstein-Zin recursion into a form where EGM applies directly. The algorithm tracks two functions instead of one (consumption and transformed value) but requires no root-finding and maintains the standard EGM structure. The method extends to other recursive preferences used in dynamic models, including the risk-sensitive preferences of Hansen & Sargent (1995).

Model

The state zz follows an AR(1) process with transition probabilities πk=Pr(z=zz=zk)\pi_{k\ell} = \Pr(z' = z_\ell \mid z = z_k), so the expectation Ezz\mathbb{E}_{z'|z} is taken over next-period states conditional on the current state. The parameter ρ\rho governs the elasticity of intertemporal substitution (EIS=1/ρ\text{EIS} = 1/\rho), while γ\gamma governs risk aversion.[1] When ρ=γ\rho = \gamma, preferences collapse to standard CRRA expected utility.

We assume ρ1\rho \neq 1 and γ1\gamma \neq 1 for the power transformation developed below; the limiting cases use logarithmic transformations but the method is otherwise analogous. For the infinite-horizon problem, standard conditions ensure the value function is well-defined and the consumption policy converges.[2]

Transformation

This transformation simplifies the certainty equivalent to a power mean.[3] Meyer-Gohde (2019) use the same transformation to analyze model uncertainty with recursive preferences.

The case θ=1\theta = 1 (equivalently γ=ρ\gamma = \rho) recovers time-separable CRRA expected utility; when γ>ρ\gamma > \rho, the agent prefers early resolution of uncertainty; when γ<ρ\gamma < \rho, late resolution.[4]

Raising the Bellman equation in Definition 1 to the power 1ρ1-\rho yields the transformed Bellman equation:

W(m,z)=maxc[(1β)c1ρ+βμ(mc,z)]W(m, z) = \max_c \left[ (1-\beta) c^{1-\rho} + \beta \mu(m-c, z) \right]

The transformation succeeds because it converts the CES aggregator in Definition 1 into an additive structure. The original Bellman equation involves VV raised to fractional powers both inside and outside the expectation; the transformed equation (3) is additive, with the nonlinearity isolated in μ\mu. This additive structure admits clean differentiation, yielding an Euler equation that depends on WW and cc but can be inverted for cc in closed form.

The first-order condition equates the marginal utility of consumption to the marginal value of savings:

(1β)(1ρ)cρ=βμ(a,z)a(1-\beta)(1-\rho) c^{-\rho} = \beta \frac{\partial \mu(a, z)}{\partial a}

The envelope theorem, combined with the first-order condition, gives

W(m,z)m=(1β)(1ρ)c(m,z)ρ\frac{\partial W(m, z)}{\partial m} = (1-\beta)(1-\rho) c(m,z)^{-\rho}

Differentiating μ(a,z)\mu(a, z) with respect to aa yields:

μa=Rμ(a,z)1θEzz[W(m,z)θ1W(m,z)m]\frac{\partial \mu}{\partial a} = R \cdot \mu(a,z)^{1-\theta} \cdot \mathbb{E}_{z'|z}\left[ W(m', z')^{\theta-1} \cdot \frac{\partial W(m', z')}{\partial m'} \right]

Substituting (6) into the FOC (4) and applying the envelope condition (5) to the next-period marginal value, the Euler equation becomes

cρ=βRμ(a,z)1θΞ(a,z)c^{-\rho} = \beta R \cdot \mu(a, z)^{1-\theta} \cdot \Xi(a, z)

where

Ξ(a,z)Ezz[W(m,z)θ1c(m,z)ρ]\Xi(a, z) \equiv \mathbb{E}_{z'|z} \left[ W(m', z')^{\theta-1} \cdot c(m', z')^{-\rho} \right]

Given W(,z)W(\cdot, z') and c(,z)c(\cdot, z') for all zz', both μ(a,z)\mu(a,z) and Ξ(a,z)\Xi(a,z) depend only on end-of-period assets aa and the current state zz. Inverting the Euler equation yields consumption as a function of (a,z)(a, z):

This closed-form expression is what enables EGM: given an exogenous grid over aa, we compute c(a,z)c(a, z) directly and recover m=c+am = c + a.

Algorithm

One distinction from standard EGM emerges from the structure of Proposition 1: the Euler equation requires both the policy function c(,z)c(\cdot, z') and the value function W(,z)W(\cdot, z') evaluated at next-period states. In standard CRRA problems, the Euler equation depends only on c(,z)c(\cdot, z'), so EGM can iterate on the policy function alone. Here, we must iterate until both functions converge simultaneously.

This makes the algorithm a hybrid of EGM and the Howard policy iteration technique introduced by Howard (1960). EGM provides the root-finding-free policy update, while tracking W()W(\cdot) alongside c()c(\cdot) ensures the value function remains consistent with the policy. Each iteration updates both functions, and convergence requires both to stabilize.

The algorithm proceeds as follows: Fix a grid of end-of-period asset values {aj}j=1J\{a_j\}_{j=1}^J and an exogenous grid of cash-on-hand values {mi}i=1I\{m_i\}_{i=1}^I. Initialize with a policy such as c(0)(m,z)=mc^{(0)}(m, z) = m and a monotonically increasing, concave V(0)V^{(0)} (e.g., V(0)=c(0)V^{(0)} = c^{(0)}); the iteration will converge to the fixed point. For finite-horizon problems, the terminal condition is c(m,z)=mc(m, z) = m; for infinite-horizon, iterate until convergence.

The algorithm requires no root-finding: each iteration involves only interpolation, expectation computation, and closed-form inversions. In contrast, time iteration methods must solve a non-linear system at each grid point; here, the Euler inversion yields consumption directly. The cost per iteration is comparable to standard EGM; the only addition is tracking the value function alongside consumption. Convergence is monitored via c(n)c(n1)\|c^{(n)} - c^{(n-1)}\|; since VV is uniquely determined by cc through the Bellman equation, policy convergence implies value convergence.

To handle the borrowing constraint, we augment the endogenous grid with the point (m,c)=(0,0)(m, c) = (0, 0) to anchor interpolation. For typical calibrations, the resulting grid is monotonic and interpolation proceeds directly. If non-monotonicity occurs (i.e., mj>mj+1m_j > m_{j+1} for some jj despite aj<aj+1a_j < a_{j+1}), construct the consumption function via the upper envelope following Iskhakov et al. (2017). In the constrained region where a=0a = 0 binds, c(m,z)=mc(m, z) = m and W(m,z)=(1β)m1ρ+βμ(0,z)W(m, z) = (1-\beta) m^{1-\rho} + \beta \mu(0, z).

Benchmarks

We implement the algorithm for an infinite-horizon consumption-savings problem with stochastic income. Income follows an AR(1) process with persistence 0.95, consistent with estimates from labor market data (e.g., Storesletten et al. (2004)), discretized using the Tauchen (1986) method with 10 grid points. The asset grid uses 100 exponentially-spaced points with an upper bound of 20 times mean income.

Parameters. β=0.96\beta = 0.96, R=1.02R = 1.02, γ=10\gamma = 10, and EIS =1.5= 1.5 (so ρ=2/3\rho = 2/3), following Bansal & Yaron (2004). The meta-analysis of Havránek (2015) finds that micro estimates of the EIS often fall below unity, though macro and asset pricing calibrations typically use higher values.[7] Since γ>ρ\gamma > \rho, the agent prefers early resolution of uncertainty. The auxiliary parameter is θ=(1γ)/(1ρ)=27\theta = (1-\gamma)/(1-\rho) = -27.

Speed

We compare three solution methods: EZ-EGM, time iteration (TI), and VFI. Rendahl (2015) proves that TI and VFI converge to the same solution under standard conditions, so the comparison is one of computational efficiency. For TI and VFI, we distinguish between fast mode (precompute μ\mu on the asset grid, interpolate during search) and accurate mode (compute μ\mu exactly at each candidate).[8] EGM has no such distinction: it evaluates μ\mu on the endogenous grid, achieving accurate-mode precision without the computational cost.

Table 1:Speed comparison (fast modes)

MethodTime (ms)Policy ItersEuler Error
EZ-EGM21141-4.8
TI (fast)237140-3.6
VFI (fast)1162239-3.3

Note: Euler error is mean log10\log_{10} error on the ergodic distribution (more negative = more accurate). Fast modes precompute μ\mu on the asset grid. Timings on CPU; results vary by hardware. All methods use JAX.

The speed advantage of EZ-EGM comes from eliminating numerical search. Time iteration (TI), introduced by Coleman (1991) and extended to Epstein-Zin preferences by Coeurdacier et al. (2020), requires bisection at every grid point; VFI requires golden-section search. EZ-EGM bypasses this entirely through analytic Euler inversion. At equal grid size (100 points), EZ-EGM is approximately 50 times faster than VFI and 10 times faster than TI. Moreover, EGM is more than one order of magnitude more accurate than both. Figure 1 shows that the resulting policy functions are smooth and well-behaved.

Consumption policy c(m,z) for different income states. Higher income states (red) allow more consumption at each wealth level.

Figure 1:Consumption policy c(m,z)c(m,z) for different income states. Higher income states (red) allow more consumption at each wealth level.

Accuracy

We assess accuracy using the normalized Euler equation error, a standard metric whose magnitude bounds the policy function error. Santos (2000) establishes the theoretical foundation:

ε(m,z)=log101c~(m,z)c(m,z)\varepsilon(m, z) = \log_{10} \left| 1 - \frac{\tilde{c}(m, z)}{c(m, z)} \right|

where c~(m,z)\tilde{c}(m, z) is consumption implied by the Euler equation given the computed policy. We report mean (L1) and maximum (L\infty) errors following Maliar & Maliar (2014). More negative values indicate higher accuracy; an error of -5 means the policy deviates from the Euler equation by approximately 10-5, or 0.001%.

Errors should be evaluated at wealth levels agents actually visit, not arbitrary grid points. We simulate the ergodic distribution (10,000 agents, 500 periods) and compute errors at the 5th–95th percentiles of realized wealth. For this calibration, the ergodic distribution concentrates in the lower wealth range (median m3m \approx 3 versus grid maximum of 20), reflecting moderate impatience. Errors evaluated on the ergodic distribution are similar to those on a uniform grid, indicating the solution is accurate where agents spend time.[9]

Table 2:Accuracy comparison (accurate modes)

MethodTime (ms)Policy ItersMean (L1)Max (L\infty)
EZ-EGM21141-4.8-3.2
TI (accurate)2301141-4.8-3.5
VFI (accurate)8293239-3.4-2.2

Note: Errors evaluated on ergodic distribution. Accurate modes compute μ\mu exactly during search. TI-accurate matches EGM accuracy but is 110×\times slower. VFI-accurate is 400×\times slower yet less accurate.

Table 2 shows an important result: TI can match EGM’s accuracy (mean error -4.8), but only by computing μ\mu exactly during search, which makes it 110 times slower. VFI-accurate is 400 times slower than EGM yet still 1.4 orders of magnitude less accurate (-3.4 versus -4.8). The fundamental difference is that EGM and TI work with the Euler equation directly while VFI optimizes the Bellman equation; Euler-based methods achieve higher precision when μ\mu is computed exactly. But TI solves the Euler equation numerically via bisection, whereas EGM inverts it analytically. This is why EGM sidesteps the speed-accuracy tradeoff entirely: the endogenous grid places evaluation points exactly where the Euler equation is satisfied, achieving accurate-mode precision at fast-mode speed.

Consumption-equivalent welfare costs (the permanent consumption an agent would sacrifice to avoid using the approximate policy) are below 0.1% for EGM, making numerical error economically negligible.[10]

Speed-accuracy Pareto frontier across grid sizes. Marker size reflects grid resolution n. The dashed line marks a reference accuracy level; EGM achieves this with small grids while VFI and TI require substantially more computation.

Figure 2:Speed-accuracy Pareto frontier across grid sizes. Marker size reflects grid resolution nn. The dashed line marks a reference accuracy level; EGM achieves this with small grids while VFI and TI require substantially more computation.

Equal-accuracy comparison. A more informative comparison holds accuracy constant. Figure 2 shows that to match EGM’s Euler errors with 20–25 grid points, VFI requires 50–300 points; the resulting speedup is 150–630 times.[11] This comparison isolates computational efficiency: both methods deliver the same solution quality, but EGM does so with far less computation. For applications requiring many model evaluations (estimation, uncertainty quantification, real-time decision support), such speedups translate directly into feasibility.

Speed-accuracy tradeoff. VFI and TI face a tradeoff between fast modes (open markers) and accurate modes (filled markers). EGM sidesteps this tradeoff: a single mode achieves both speed and accuracy.

Figure 3:Speed-accuracy tradeoff. VFI and TI face a tradeoff between fast modes (open markers) and accurate modes (filled markers). EGM sidesteps this tradeoff: a single mode achieves both speed and accuracy.

Speed-accuracy tradeoff. Time iteration offers a middle ground between EGM and VFI. Like EGM, TI works with the Euler equation; like VFI, it requires numerical optimization. As Figure 3 illustrates, both VFI and TI face a speed-accuracy tradeoff: computing μ\mu exactly at each candidate during search is accurate but slow, as Table 2 documents; precomputing μ\mu on the asset grid and interpolating is fast but introduces approximation error, as Table 1 shows. The fast modes in Table 1 represent practical implementations. EGM sidesteps this tradeoff entirely: the endogenous grid places evaluation points exactly where the Euler equation is satisfied, achieving accurate-mode precision at fast-mode speed.

Howard acceleration. The baseline algorithm performs one policy update per value update. To accelerate convergence, fix the policy c(,)c(\cdot, \cdot) and iterate on WW alone:

W(k+1)(m,z)=(1β)c(m,z)1ρ+βμ(k)(mc,z)W^{(k+1)}(m, z) = (1-\beta) c(m,z)^{1-\rho} + \beta \mu^{(k)}(m-c, z)

where μ(k)\mu^{(k)} uses W(k)W^{(k)}. After KK value iterations, the policy is updated via EGM. The optimal KK differs by method: VFI benefits from large KK (30 or more), TI performs best with small KK (3-5), while EGM is fastest at K=1K=1 because its analytic policy step is already cheap.[12] With one additional value iteration (K=2K=2), EGM becomes even more accurate while remaining faster than all VFI and TI configurations.

Conclusion

The endogenous grid method extends to Epstein-Zin preferences through the transformation W=V1ρW = V^{1-\rho}, which decouples the Euler equation from the value recursion.

The approach generalizes beyond Epstein-Zin. The method extends to the limiting case ρ=1\rho = 1 (unit EIS) and to the risk-sensitive preferences of Hansen & Sargent (1995) used in robust control, both of which admit analogous transformations and closed-form Euler inversions.

The single-asset case presented here serves as a building block for richer models with multiple assets, portfolio choice, or labor supply decisions.

For practitioners solving consumption-savings models with recursive utility, the message is simple: EGM works. Where time iteration requires numerical root-finding at every grid point, EZ-EGM inverts the Euler equation analytically. The transformation is elementary, the implementation follows standard EGM patterns, and the speed gains are substantial.

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. This work was supported by the Alfred P. Sloan Foundation [G-2025-79177].

Footnotes
  1. We follow the original Epstein & Zin (1989) parameterization. An alternative convention, common in the asset pricing literature (e.g., Bansal & Yaron (2004)), defines the EIS directly as ψ=1/ρ\psi = 1/\rho and writes the recursion with ψ\psi in place of 1/ρ1/\rho. The auxiliary parameter is then θ=(1γ)/(11/ψ)\theta = (1-\gamma)/(1-1/\psi), which equals our (1γ)/(1ρ)(1-\gamma)/(1-\rho).

  2. See Epstein & Zin (1989) for existence and uniqueness conditions. With θ=(1γ)/(1ρ)\theta = (1-\gamma)/(1-\rho), a sufficient condition is βRθ<1\beta R^\theta < 1. When θ<0\theta < 0 (as in our calibration with γ>1>ρ\gamma > 1 > \rho), this becomes β<Rθ\beta < R^{|\theta|}, which holds for typical parameterizations. The recursion also requires V>0V > 0; this follows by induction from the terminal condition whenever consumption remains strictly positive.

  3. When ρ>1\rho > 1, the transformation W=V1ρW = V^{1-\rho} is decreasing, so maximizing VV is equivalent to minimizing WW. In the discussion below, the Euler equation characterizes the optimum in either case, and EGM inverts it directly. See Appendix: Robustness to ρ>1\rho > 1 for details.

  4. See Backus et al. (2008) for a comprehensive treatment.

  5. The logarithmic limit requires renormalization: formally, limρ1(V1ρ1)/(1ρ)=logV\lim_{\rho \to 1}(V^{1-\rho} - 1)/(1-\rho) = \log V by L’Hôpital’s rule. The Bellman equation and certainty equivalent formulae stated here are the limiting forms after this renormalization.

  6. See Appendix: Robustness to ρ>1\rho > 1 for numerical verification.

  7. High γ\gamma with low ρ\rho implies aversion to contemporaneous consumption risk but tolerance for intertemporal variation. Whether this reflects preferences or serves as a modeling device for asset pricing remains debated; the method here is agnostic on calibration.

  8. Appendix: Alternative algorithms details both algorithms and the tradeoff between modes.

  9. Points near the borrowing constraint are excluded, as the Euler equation holds as an inequality there; this is standard practice following Santos (2000).

  10. Computed by simulating 20,000 agents under the approximate and high-accuracy policies with identical shocks, then comparing ergodic average values.

  11. Appendix: Howard acceleration parameter examines how KK affects each method in both fast and accurate modes.

References
  1. Carroll, C. D. (2006). The method of endogenous gridpoints for solving dynamic stochastic optimization problems. Economics Letters, 91(3), 312–320. 10.1016/j.econlet.2005.09.013
  2. Deaton, A. (1991). Saving and liquidity constraints. Econometrica, 59(5), 1221–1248. 10.2307/2938366
  3. Barillas, F., & Fernández-Villaverde, J. (2007). A Generalization of the Endogenous Grid Method. Journal of Economic Dynamics and Control, 31(8), 2698–2712. 10.1016/j.jedc.2006.08.005
  4. Iskhakov, F., Jørgensen, T. H., Rust, J., & Schjerning, B. (2017). The Endogenous Grid Method for Discrete-Continuous Dynamic Choice Models with (or without) Taste Shocks. Quantitative Economics, 8(2), 317–365. 10.3982/QE643
  5. Epstein, L. G., & Zin, S. E. (1989). Substitution, risk aversion, and the temporal behavior of consumption and asset returns: A theoretical framework. Econometrica, 57(4), 937–969. 10.2307/1913778
  6. Epstein, L. G., & Zin, S. E. (1991). Substitution, risk aversion, and the temporal behavior of consumption and asset returns: An empirical analysis. Journal of Political Economy, 99(2), 263–286. 10.1086/261750
  7. Weil, P. (1989). The equity premium puzzle and the risk-free rate puzzle. Journal of Monetary Economics, 24(3), 401–421. 10.1016/0304-3932(89)90028-7
  8. Kreps, D. M., & Porteus, E. L. (1978). Temporal Resolution of Uncertainty and Dynamic Choice Theory. Econometrica, 46(1), 185–200. 10.2307/1913656
  9. Duffie, D., & Epstein, L. G. (1992). Stochastic Differential Utility. Econometrica, 60(2), 353–394. 10.2307/2951600
  10. Ren, G., & Stachurski, J. (2020). Dynamic programming with recursive preferences: Optimality and applications (Preprint 1812.05748). arXiv. https://arxiv.org/abs/1812.05748
  11. Coeurdacier, N., Rey, H., & Winant, P. (2020). Financial Integration and Growth in a Risky World. Journal of Monetary Economics, 112, 1–21. 10.1016/j.jmoneco.2019.01.022
  12. Hansen, L. P., & Sargent, T. J. (1995). Discounted linear exponential quadratic Gaussian control. IEEE Transactions on Automatic Control, 40(5), 968–971. 10.1109/9.384242
  13. Meyer-Gohde, A. (2019). Generalized entropy and model uncertainty. Journal of Economic Theory, 183, 312–343. 10.1016/j.jet.2019.06.004
  14. Tallarini Jr, T. D. (2000). Risk-sensitive real business cycles. Journal of Monetary Economics, 45(3), 507–532. 10.1016/S0304-3932(00)00012-X
  15. Giovannini, A., & Weil, P. (1989). Risk Aversion and Intertemporal Substitution in the Capital Asset Pricing Model (Working Paper No. 2824). National Bureau of Economic Research. 10.3386/w2824