# Finite Differences on Sparse Grids for Continuous-Time Heterogeneous Agent Models
## 1 Introduction  
In recent years, advances in economic research are due to the formulation of models that do not admit closed form solutions. One is particularly interested in models of higher dimensionality, such as heterogeneous agent models which may have a large amount of agents that differ in some dimensions. These heterogeneities, such as productivity, can be modeled by stochastic processes. Further, there are models with a large number of state variables, e.g., New Keynesian models, and asset pricing models may feature many different assets, while multi-country models may have a large number of countries. Thus, it is important to develop efficient numerical methods to approximate and compute the solution of higher dimensional problems. For this purpose we propose and investigate adaptive sparse grids. With standard discretizations, one faces the problem that one cannot introduce many variables due to the curse of dimensionality, a terminology coined by [PERSON] in [1] that describes the exponential dependence of the overall computational effort on the number of dimensions. In this work, we study how to solve continuous-time heterogeneous agent models with multiple assets in higher dimensions with a finite difference (FD) approach on sparse grids that is based on standard interpolation and allows easy implementation. In [2], a finite difference method is used to solve the Hamilton-Jacobi-Bellman (HJB) equation in the economic context. This approach was improved in [3] to handle borrowing constraints by mathematically recasting them as state constraints. The computational method was further adapted in [4] to handle non-convexities and multiple assets. In [5], finite differences on sparse grids were introduced and several theoretical results regarding consistency, stability, and convergence are shown. Further studies have been made in [6; 7; 8]. Nevertheless, the theory remains limited mostly due to the difficult handling of specific basis transformations used in the sparse grid finite difference operators. Furthermore, the implementation is non-trivial and most sparse grid libraries do not feature these operators. Therefore, we introduce and employ a finite difference method following [9], which is based on interpolation on adaptive sparse grids and which can be implemented easily using existing sparse grid implementations. Notice that interpolation-based ideas were already presented in [10]. With the presented finite difference approach using adaptive sparse grid interpolation, we are able to solve continuous-time heterogeneous agent models in higher dimensions. Note that we use a finite difference approach following [3] to solve these agent models, but instead of implementing it on full grids we performed it on adaptive sparse grids. This allowed the numerical treatment of scenarios in up to six dimensions, thereby extending the range of possible numerical studies, in particular economic. This article is structured as follows. The setup and motivation is given in Section 2, where we present a two-dimensional model problem. In Section 3, we briefly describe sparse grids and the employed finite differences on sparse grids [9]. An investigation of sparse grid interpolation is carried out in Section 3.3 to explain why we do not simply obtain convergence by means of Barles and Souganidis [11], which comes down to the non-monotonicity of sparse grid interpolation. We further present some approaches to overcome some of the arising issues regarding non-convergence. This is followed by a detailed presentation of the algorithm and its implementation in Section 4. Even though we do not have a theoretical convergence result, we give numerical results in Section 5 that show that our sparse grid solution converges to the full grid solution for a two-dimensional model. We further implement higher dimensional models for our numerical experiments in which we analyze the convergence behavior for regular sparse grids and for adaptive sparse grids with different adaptivity approaches.