## Abstract

This paper investigates extensions of the method of endogenous gridpoints (ENDGM) introduced by Carroll (Econ Lett 91(3):312–320, 2006) to higher dimensions with more than one continuous endogenous state variable. We compare three different categories of algorithms: (i) the conventional method with exogenous grids (EXOGM), (ii) the pure method of endogenous gridpoints (ENDGM) and (iii) a hybrid method (HYBGM). ENDGM comes along with Delaunay interpolation on irregular grids. Comparison of methods is done by evaluating speed and accuracy by using a specific model with two endogenous state variables. We find that HYBGM and ENDGM both dominate EXOGM. In an infinite horizon model, ENDGM also always dominates HYBGM. In a finite horizon model, the choice between HYBGM and ENDGM depends on the number of gridpoints in each dimension. With less than 150 gridpoints in each dimension ENDGM is faster than HYBGM, and vice versa. For a standard choice of 25–50 gridpoints in each dimension, ENDGM is 1.4–1.7 times faster than HYBGM in the finite horizon version and 2.4–2.5 times faster in the infinite horizon version of the model.

This is a preview of subscription content, access via your institution.

## Notes

For another application of the method in Economics see Broer et al. (2013).

This is similar to the approach of Hintermaier and Koeniger (2010), also see below.

We also discuss limitations of ENDGM and HYBGM which are both only applicable to specific problems at hand. A thorough treatment of the formal conditions that make ENDGM applicable is contained in Iskhakov (2015) and White (2015). We provide simple examples for situations where such conditions to not hold.

The standard formulation of contingency of the survival rate on health capital—which depreciates over time, see below—as we use it here has recently been criticized by Dalgaard and Strulik (2014) who point out that a more appropriate way of modeling decay is the notion of appreciating deficits rather than decreasing health capital.

We checked ex-post if value functions are globally concave which they are for the parameter space considered here. A crucial parameter is \(\xi \) as it governs the curvature of the human capital production function. If we were to choose a higher degree of curvature (lower \(\xi \)) than non-concavities may arise. These results are available upon request. Also see Fella (2014) and Iskhakov et al. (2015) for sophisticated methods to deal with non-convexities.

For derivation of (4) and the Envelope conditions see Appendix.

Our descriptions of all algorithms leave out the numerical characterization and storage of the value function (and its derivatives) as side products of the respective algorithm.

This rationale does not imply that

*h*must be zero in period \(T+1\) because human capital is—in contrast to financial assets—inalienable.Since the policy functions generally feature less curvature than the derivatives of the value function, it is more efficient to interpolate on the policy functions and then to use the envelop conditions to update the derivatives of the value functions.

In principle, this could be accommodated by an additional rootfinder to detect the kink—i.e., the

*a*,*h*-combination at which the borrowing constraint just becomes unbinding—and to add in additional grid points there. We do not extend the method along this dimension. A naive extension along these lines would further slow down EXOGM. However, see Brumm and Grill (2014) for a sophisticated application.An alternative would be to avoid multivariate solvers and to instead use fixed point iterations with nested univariate solvers. However, this would further slow down EXOGM.

In a deterministic model such as ours, this mapping is of course deterministic. We could therefore directly work on a grid of \((a_{t+1},h_{t+1})\). However, this would generally not be possible in a stochastic model because the realizations of \((a_{t+1},h_{t+1})\) may depend on the realizations of shocks in period \(t+1\), e.g., if there are shocks to the interest rate. For sake of generality, we therefore define the grid on \((s_t,z_t)\).

Observe that the procedure of dealing with the borrowing constraint can be further improved by working with state and iteration dependent saving grids (cf., e.g., Krueger and Ludwig 2016), an approach we do not adopt here.

In a standard consumption-savings model with only one endogenous continuous state variable the policy function is computed by linearly interpolating between the policy at zero saving and the origin, cf. Carroll (2006).

This principle is derived from the definition that a triangulation fulfills the Delaunay property if and only if the circumcircle of any triangle does not contain a point in its interior, cf. Berg et al. (2008).

In non-Delaunay triangulations, the visibility walk may fall into a cycle, whereas in Delaunay triangulations the visibility walk always terminates, cf. Devillers et al. (2001).

In our code we also incorporate the option of a multi-linear interpolation used by Broer et al. (2013). This alternative interpolation method is very useful in applications in which existing triangles are visited frequently. In our specific applications, this is, however, not the case so that the method does not have an advantage over the simple interpolation method we use. We therefore do not apply it when generating our results below.

Using Brent’s method instead—which would be the standard choice in univariate problems—turns out to slow down speed of HYBGM.

We implement the solution in Fortran using the Intel Visual Fortran Compiler 11.1. The computation is done on a desktop computer with a consumer grade processor (Intel Core Duo E8500).

Also observe, by construction, that there is only one occasionally binding constraint in our model. This would be different in a situation with durable consumption goods as in Hintermaier and Koeniger (2010). As ENDGM is a very efficient way in dealing with occasionally binding constraints such an alternative model may further improve the relative performance of ENDGM.

Euler equation errors are not computed if the borrowing constraint is binding.

Throughout, we have five points in the region of the binding borrowing constraint. The relative time spent on the numerical solution in this region is slightly below 10 % for \(N=25^2\) and decreases to about 2 % for \(N=200^2\).

The maximum Euler equation errors are considerably higher for EXOGM. They occur in the simulations just before the depletion of all financial assets. This is due to the fact that we do not determine explicitly the region where the borrowing constraint becomes binding and accordingly have no gridpoints located there.

Again, we have five points in the region of the binding borrowing constraint and the fraction of the overall computational time spent there varies between 1.2 and 5.3 %.

In the same vein, the envelope condition method suggested by Maliar and Maliar (2013) for infinite horizon models might be adaptable to higher dimensions and could be tested against the methods used in this paper.

## References

Aruoba, S. B., Fernandez-Villaverde, J., & Rubio-Ramirez, J. F. (2006). Comparing solution methods for dynamic equilibrium economies.

*Journal of Economic Dynamics and Control*,*30*(12), 2477–2508.Baker, T. J. (1999). Delaunay—Voronoi methods. In

*Handbook of grid generation*, Chapter 16, Boca Raton: CRC Press.Barillas, F., & Fernandez-Villaverde, J. (2007). A generalization of the endogenous grid method.

*Journal of Economic Dynamics and Control*,*31*(8), 2698–2712.Ben-Porath, Y. (1967). The production of human capital and the life cycle of earnings.

*Journal of Political Economy*,*75*, 352.Blelloch, G. E., Hardwick, J. C., Miller, G. L., & Talmor, D. (1999). Design and implementation of a practical parallel Delaunay algorithm.

*Algorithmica*,*24*, 243–269.Broer, T., Kapicka, M., & Klein, P. (2013). Consumption risk sharing with private information when earnings are persistent. Technical Report, Simon Fraser University.

Broyden, C. G. (1965). A class of methods for solving nonlinear simultaneous equations.

*Mathematics of Computation*,*19*(92), 577–593.Brumm, J., & Grill, M. (2014). Computing equilibria in dynamic models with occasionally binding constraints.

*Journal of Economic Dynamics and Control*,*38*, 142–160.Carroll, C. D. (2006). The method of endogenous gridpoints for solving dynamic stochastic optimization problems.

*Economics Letters*,*91*(3), 312–320.Dalgaard, C.-J., & Strulik, H. (2014). Optimal aging and death: Understanding the Preston curve.

*Journal of the European Economic Association*,*12*(3), 672–701.de Berg, M., Cheong, O., van Kreveld, M., & Overmars, M. (2008).

*Computational geometry: Algorithms and applications*(3rd ed.). New York: Springer.Delaunay, B. N. (1934). Sur la Sphère Vide.

*Bulletin of Academy of Sciences of the USSR*,*6*, 793–800.Devillers, O., Pion, S., & Teillaud, M. (2001). Walking in a triangulation. In

*Proceedings of the Seventeenth Annual Symposium on Computational geometry*(pp.106–114), SCG ’01, New York, NY, ACM.Fella, G. (2014). A generalized endogenous grid method for non-smooth and non-concave problems.

*Review of Economic Dynamics*,*17*(2), 329–344.Hall, R. E., & Jones, C. I. (2007). The value of life and the rise in health spending.

*The Quarterly Journal of Economics*,*122*(1), 39–72.Hintermaier, T., & Koeniger, W. (2010). The method of endogenous gridpoints with occasionally binding constraints among endogenous variables.

*Journal of Economic Dynamics and Control*,*34*(10), 2074–2088.Iskhakov, F. (2015). Multidimensional endogenous gridpoint method: Solving triangular dynamic stochastic optimization problems without root-finding operations.

*Economics Letters*,*135*, 72–76.Iskhakov, F., Jørgensen, T. H., Rust, J., & Schjerning, B. (2015). Estimating discrete-continuous choice models: The endogenous grid method with taste shocks.

Joe, B. (1991). GEOMPACK: A software package for the generation of meshes using geometric algorithms.

*Advances in Engineering Software and Workstations*,*13*, 325–331.Jørgensen, T. H. (2013). Structural estimation of continuous choice models: Evaluating EGM and MPEC.

*Economics Letters*,*119*(3), 287–290.Judd, K. L. (1992). Projection methods for solving aggregate growth models.

*Journal of Economic Theory*,*58*(2), 410–452.Judd, K. L. (1998).

*Numerical methods in economics*(1st ed.). Cambridge: The MIT Press.Krueger, D., & Ludwig, A. (2007). On the consequences of demographic change for rates of returns to capital, and the distribution of wealth and welfare.

*Journal of Monetary Economics*,*54*(1), 49–87.Krueger, D., & Ludwig, A. (2016). On the optimal provision of social insurance: Progressive taxation versus education subsidies in general equilibrium.

*Journal of Monetary Economics*,*77*, 72.Ludwig, A., & Schön, M. (2013). Endogenous grids in higher dimensions: Delaunay interpolation and hybrid methods.

Maliar, L., & Maliar, S. (2013). Envelope condition method versus endogenous grid method for solving dynamic programming problems.

*Economics Letters*,*120*(2), 262–266.Miranda, M. J., & Fackler, P. L. (2004).

*Applied computational economics and finance*. Cambridge: The MIT Press.Press, W., Teukolsky, S., Vetterling, W., & Flannery, B. (2007).

*Numerical recipes: The art of scientific computing*(3rd ed.). Cambridge: Cambridge University Press.Press, W., Teukolsky, S., Vetterling, W., Flannery, B., & Metcalf, M. (1996).

*Numerical recipes in Fortran 90: Fortran numerical recipes: The art of parallel scientific computing*(Vol. 2). Cambridge: Cambridge University Press.Santos, M. S. (2000). Accuracy of numerical solutions using the Euler equation residuals.

*Econometrica*,*68*(6), 1377–1402.Stokey, N. L., & Lucas, R. E. (1989).

*Recursive methods in economic dynamics*. Cambridge: Harvard University Press.White, M. N. (2015). The method of endogenous gridpoints in theory and practice.

*Journal of Economic Dynamics and Control*,*60*, 26–41.

## Acknowledgments

We thank the editor and four anonymous referees as well as Johannes Brumm, Christopher Carroll, Thomas Jørgensen, Michael Reiter and seminar participants at University of Cologne, the 2012 CEF and the Cologne Macroeconomic Workshop 2012 for helpful comments. Alex Ludwig gratefully acknowledges research support from the Research Center SAFE, funded by the State of Hessen initiative for research LOEWE and financial support by the German National Research Foundation under SPP 1578. Matthias Schön gratefully acknowledges financial support by the State of North Rhine-Westfalia.

## Author information

### Authors and Affiliations

### Corresponding author

## Appendix: Derivation of FOC

### Appendix: Derivation of FOC

The dynamic version of the household problem reads as

subject to

Assigning multiplier \(\mu \) to the borrowing constraint, the two first order conditions with respect to \(c_{t}\) and \(i_{t}\) are:

and \(a_{t+1} \ge 0\), \(\mu \ge 0\) and \(a_{t+1} \mu =0\).

In order to compute optimal policies we need to distinguish two cases.

**Case 1** Interior Solution

In the first case the borrowing constraint is not binding so that \(\mu = 0\). This reduces the system of equations to

Rearranging gives

**Case 2** Corner Solution—Binding Borrowing Constraint

In the second case the borrowing constraint is binding so that \(a^{\prime }=0\) and \(\mu >0\). From (8) and (9) it then follows that

and

Making use of our assumptions on functional forms, Eq. (10) reduces in EXOGM and HYBGM to

and in ENDGM to

Observe that this equation is not linear in \(i_{t}\). We therefore need to use a numerical routine in the region where the borrowing constraint is binding also for ENDGM, cf. our discussion in the main text in Sect. 3.2.

In both cases—i.e., for interior solutions and for binding borrowing constraints—the envelope conditions are

## Rights and permissions

## About this article

### Cite this article

Ludwig, A., Schön, M. Endogenous Grids in Higher Dimensions: Delaunay Interpolation and Hybrid Methods.
*Comput Econ* **51**, 463–492 (2018). https://doi.org/10.1007/s10614-016-9611-2

Accepted:

Published:

Issue Date:

DOI: https://doi.org/10.1007/s10614-016-9611-2

### Keywords

- Dynamic models
- Numerical solution
- Method of endogenous gridpoints
- Delaunay interpolation

### JEL Classification

- C63
- E21