Skip to main content

Endogenous Grids in Higher Dimensions: Delaunay Interpolation and Hybrid Methods

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.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8

Notes

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

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

  3. 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.

  4. The standard method that we and White (2015) apply is the so-called visibility walk. It is known that it may fall into a cycle in non-Delaunay triangulations, cf. Devillers et al. (2001).

  5. 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.

  6. 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.

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

  8. 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.

  9. This rationale does not imply that h must be zero in period \(T+1\) because human capital is—in contrast to financial assets—inalienable.

  10. 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.

  11. In principle, this could be accommodated by an additional rootfinder to detect the kink—i.e., the ah-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.

  12. 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.

  13. 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)\).

  14. 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.

  15. 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).

  16. 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).

  17. This procedure is described in Press et al. (2007). We use the numerical package geompack3 based on Joe (1991) for both the Delaunay triangulation and the “visibility walk”, described next.

  18. 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).

  19. 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.

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

  21. 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).

  22. 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.

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

  24. 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\).

  25. 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.

  26. 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 %.

  27. 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.

    Article  Google Scholar 

  • 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.

    Article  Google Scholar 

  • Ben-Porath, Y. (1967). The production of human capital and the life cycle of earnings. Journal of Political Economy, 75, 352.

    Article  Google Scholar 

  • 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.

    Article  Google Scholar 

  • 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.

    Article  Google Scholar 

  • Brumm, J., & Grill, M. (2014). Computing equilibria in dynamic models with occasionally binding constraints. Journal of Economic Dynamics and Control, 38, 142–160.

    Article  Google Scholar 

  • Carroll, C. D. (2006). The method of endogenous gridpoints for solving dynamic stochastic optimization problems. Economics Letters, 91(3), 312–320.

    Article  Google Scholar 

  • Dalgaard, C.-J., & Strulik, H. (2014). Optimal aging and death: Understanding the Preston curve. Journal of the European Economic Association, 12(3), 672–701.

    Article  Google Scholar 

  • de Berg, M., Cheong, O., van Kreveld, M., & Overmars, M. (2008). Computational geometry: Algorithms and applications (3rd ed.). New York: Springer.

    Book  Google Scholar 

  • Delaunay, B. N. (1934). Sur la Sphère Vide. Bulletin of Academy of Sciences of the USSR, 6, 793–800.

    Google Scholar 

  • 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.

    Article  Google Scholar 

  • 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.

    Article  Google Scholar 

  • 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.

    Article  Google Scholar 

  • Iskhakov, F. (2015). Multidimensional endogenous gridpoint method: Solving triangular dynamic stochastic optimization problems without root-finding operations. Economics Letters, 135, 72–76.

    Article  Google Scholar 

  • 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.

    Article  Google Scholar 

  • Jørgensen, T. H. (2013). Structural estimation of continuous choice models: Evaluating EGM and MPEC. Economics Letters, 119(3), 287–290.

    Article  Google Scholar 

  • Judd, K. L. (1992). Projection methods for solving aggregate growth models. Journal of Economic Theory, 58(2), 410–452.

    Article  Google Scholar 

  • Judd, K. L. (1998). Numerical methods in economics (1st ed.). Cambridge: The MIT Press.

    Google Scholar 

  • 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.

    Article  Google Scholar 

  • 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.

    Article  Google Scholar 

  • 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.

    Article  Google Scholar 

  • Miranda, M. J., & Fackler, P. L. (2004). Applied computational economics and finance. Cambridge: The MIT Press.

    Google Scholar 

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

    Google Scholar 

  • 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.

    Google Scholar 

  • Santos, M. S. (2000). Accuracy of numerical solutions using the Euler equation residuals. Econometrica, 68(6), 1377–1402.

    Article  Google Scholar 

  • Stokey, N. L., & Lucas, R. E. (1989). Recursive methods in economic dynamics. Cambridge: Harvard University Press.

    Google Scholar 

  • White, M. N. (2015). The method of endogenous gridpoints in theory and practice. Journal of Economic Dynamics and Control, 60, 26–41.

    Article  Google Scholar 

Download references

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

Authors

Corresponding author

Correspondence to Alexander Ludwig.

Appendix: Derivation of FOC

Appendix: Derivation of FOC

The dynamic version of the household problem reads as

$$\begin{aligned} V_{t}(a_{t},h_{t}) = \underset{c_{t},i_{t},a_{t+1},h_{t+1}}{\max }\left\{ u(c_{t}) + \beta \psi \left( h_{t+1}\right) V_{t+1}(a_{t+1},h_{t+1})\right\} \end{aligned}$$

subject to

$$\begin{aligned} a_{t+1}&= R\left( a_{t} + wh_{t} - c_{t} - i_{t}\right) \\ h_{t+1}&= \left( 1 - \delta \right) \left( h_{t} + f\left( i_{t}\right) \right) \\ a_{t+1}&\ge 0. \end{aligned}$$

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

$$\begin{aligned} \frac{\partial V_{t}\left( a_{t},h_{t}\right) }{\partial c_{t}}&= u_{c} - \beta \psi \left( h_{t+1}\right) V_{t+1_{a}} R - R \mu \overset{!}{=}0 \Leftrightarrow u_{c} - \beta \psi \left( h_{t+1}\right) R V_{t+1_{a}} = R \mu , \end{aligned}$$
(8)
$$\begin{aligned} \frac{\partial V_{t}\left( a_{t},h_{t}\right) }{\partial i_{t}}&= \psi _{h}\left( h_{t+1}\right) \left( 1 - \delta \right) f_{i} \beta V_{t+1} + \psi \left( h_{t+1}\right) \beta \left( V_{t+1_{a}} \left( -R\right) + V_{t+1_{h}} \left( 1 - \delta \right) f_{i}\right) - R\mu \overset{!}{=}0 \nonumber \\&\Leftrightarrow \psi _{h}\left( h_{t+1}\right) \left( 1 - \delta \right) f_{i} \beta V_{t+1} + \psi \left( h_{t+1}\right) \beta \left( V_{t+1_{a}} \left( -R\right) + V_{t+1_{h}} \left( 1 - \delta \right) f_{i}\right) = R \mu \end{aligned}$$
(9)

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

$$\begin{aligned}&u_{c} - \beta \psi \left( h_{t+1}\right) R V_{t+1_{a}} = 0 \\ \psi _{h}\left( h_{t+1}\right) \left( 1 - \delta \right) f_{i} \beta&\quad V_{t+1} + \psi \left( h_{t+1}\right) \beta \left( V_{t+1_{a}} \left( -R\right) + V_{t+1_{h}}\left( 1 - \delta \right) f_{i}\right) = 0. \end{aligned}$$

Rearranging gives

$$\begin{aligned} u_{c}&= \beta \psi \left( h_{t+1}\right) V_{t+1_{a}} R \\ f_{i}&= \frac{R}{\left( 1 - \delta \right) } \frac{\psi \left( h_{t+1}\right) V_{t+1_{a}}}{\psi _{h} \left( h_{t+1}\right) V_{t+1} + \psi \left( h_{t+1}\right) V_{t+1_{h}}}. \end{aligned}$$

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

$$\begin{aligned} u_{c} = \psi _{h}\left( h_{t+1}\right) \beta V_{t+1} + \psi \left( h_{t+1}\right) \beta V_{t+1_{h}} \left( 1 - \delta \right) f_{i} \end{aligned}$$
(10)

and

$$\begin{aligned} u_{c} = \beta \left( 1 - \delta \right) f_{i} \left( \psi _{h} \left( h_{t+1}\right) V_{t+1} + \psi \left( h_{t+1}\right) V_{t+1_{h}}\right) \\ a_{t+1} = 0 \Leftrightarrow c_{t}=a_{t}+wh_{t}-i_{t}. \end{aligned}$$

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

$$\begin{aligned}&\left( a_{t} + w h_{t} - i_{t}\right) ^{-\theta } - \frac{1}{\left( \left( 1 - \delta \right) \left( h_{t} + i_{t}^{\xi }\right) \right) ^{2}} V_{t+1}\left[ 0,\left( 1 - \delta \right) \left( h_{t} + i_{t}^{\xi }\right) \right) \beta \left( 1 - \delta \right) i_{t}^{-(1-\xi )} \\&\quad -\left( 1 - \frac{1}{\left( 1 - \delta \right) \left( h_{t} + \frac{1}{\xi }i_{t}^{\xi }\right) }\right) V_{t+1_{h}}\left( 0,\left( 1 - \delta \right) \left( h_{t} + \frac{1}{\xi }i_{t}^{\xi }\right) \right) \beta \left( 1 - \delta \right) i_{t}^{-(1-\xi )} = 0 \end{aligned}$$

and in ENDGM to

$$\begin{aligned}&\left( a_{t} + w \left( \frac{h_{t+1}}{1 - \delta } - i_{t}^{1-\xi }\right) - i_{t}\right) ^{-\theta } - \frac{1}{\left( h_{t+1}\right) ^{2}} \beta V_{t+1}\left( 0,h_{t+1}\right) \left( 1 - \delta \right) i_{t}^{-(1-\xi )} \\&\quad -\left( 1 - \frac{1}{1 + h_{t+1}}\right) \beta V_{t+1_{h}}\left( 0,h_{t+1}\right) \left( 1 - \delta \right) i_{t}^{-(1-\xi )} = 0. \end{aligned}$$

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

$$\begin{aligned}&\displaystyle \frac{\partial V_{t}\left( a_{t},h_{t}\right) }{\partial a_{t}} \equiv V_{t_{a}} = \beta V_{t+1_{a}} R + R \mu = u_{c} \\&\displaystyle \frac{\partial V_{t}\left( a_{t},h_{t}\right) }{\partial h_{t}} \equiv V_{t_{h}} \\&\displaystyle = \beta \psi _{h}\left( h_{t+1}\right) V_{t+1}(a_{t+1},h_{t+1}) \left( 1 - \delta \right) +\beta \psi \left( h_{t+1}\right) V_{t_{a}}(a_{t+1},h_{t+1}) w R + \\&\displaystyle \qquad \beta \psi \left( h_{t+1}\right) V_{t+1_{h}}(a_{t+1},h_{t+1}) \left( 1 - \delta \right) + R \mu \\&\displaystyle = \left( w + \frac{1}{f_{i}}\right) u_{c}. \end{aligned}$$

Rights and permissions

Reprints and Permissions

About this article

Verify currency and authenticity via CrossMark

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

Download citation

  • 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