# Finite Differences on Sparse Grids for Continuous-Time Heterogeneous Agent Models
## 2 Heterogeneous Agent Models as Optimal Control Problems
### Optimal Control Problems in Economics  
The above framework can be used to model economic settings. We present a slightly simplified two asset model from [4]; further details and economic background can be found therein. Note that we have omitted the initial state in the following and denoted the time dependence of the states by a subscript \(t\). Specifically, we want to solve the following maximization problem  
\[\max_{\{c_{t},d_{t}\}_{t\geq 0}}\mathbb{E}_{0}\int_{0}^{\infty}e^{-\rho t}h(c _{t})dt \tag{3}\]  
subject to  
\[b_{t} =wz_{t}+r^{b}(b_{t})b_{t}-d_{t}-\chi(d_{t},a_{t})-c_{t} \tag{4a}\] \[\dot{a}_{t} =r^{a}a_{t}+d_{t}\] (4b) \[z_{t} =\text{Poisson with intensities }\lambda(z,z^{\prime})\] (4c) \[b_{t} \geq\dot{b},\ a_{t}\geq 0. \tag{4d}\]  
Here, \(b_{t}\) denotes liquid assets and \(a_{t}\) illiquid assets. The respective returns on these assets are \(r^{b}\) and \(r^{a}\), where \(r^{b}(b_{t})\) summarizes the interest rate schedule faced by households. Further, we have consumption \(c_{t}\), deposits \(d_{t}\), and the transaction cost function \(\chi\). Instead of obtaining wage \(w\), one receives uninsured income \(wz_{t}\), where we assume that the exogenous productivity state \(z\) evolves stochastically over time, which is modeled as a Poisson or diffusion process. While _wage_ and _consumption_ are self-explanatory, we aim to explain the other components of the model. One can label an asset as liquid or illiquid depending on the extend to which transaction costs are involved for buying or selling them. As conducted in [4], we define _liquid assets_ as deposits in financial institutions' saving, checking, call and money market accounts, government bonds, and corporate bonds net of revolving consumer credit. The _rate of returns_ indicates at which rate the assets generate earnings. Note that for negative \(b_{t}\), this is a borrowing rate. A _borrowing constraint_ is the maximum amount of money an agent can borrow, e.g., from banks, firms, or governments [3]. It is modeled as \(b_{t}\geq b\). Note that \(\underline{b}=0\) implies that the agent cannot borrow, but just save. Contrary to liquid assets \(b_{t}\), illiquid assets \(a_{t}\) cannot be sold that easily without losing value since (higher) transaction costs for selling and buying are involved. The _deposit rate_ is the amount one transfers into the other account. If \(d_{t}>0\), one deposits into the illiquid account and if \(d_{t}<0\), one withdraws from the illiquid account. Households have to pay a _transaction cost_\(\chi(d_{t},a_{t})\) for depositing or withdrawing from their illiquid account. In [4], it is pointed out that in the equilibrium, illiquid assets pay a higher return than liquid assets due to the transaction costs, i.e., \(r^{a}>r^{b}\). In the framework given in Section 2.1, we have the state \(x(t)=(b_{t},a_{t})\) consisting of liquid \(b_{t}\) and illiquid \(a_{t}\) assets. The control \(\alpha(t)\) at time \(t\) reflects the consumption \(c_{t}\) and deposit \(d_{t}\). Moreover, the state changes \(f(x(t),\alpha(t))=(wz_{t}+r^{b}(b_{t})b_{t}-d_{t}-\chi(d_{t},a_{t})-c_{t},r^{a} a_{t}+d_{t})^{T}\) at time \(t\) follows (4a) and (4b). Thus, at time \(t\), for the asset state \((b_{t},a_{t})\), we want to choose an optimal control \((c_{t},d_{t})\), i.e., how much we consume and deposit, to maximize (3). Note again that this choice directly results in a change in the state. A standard choice for the return function \(h(c)\) in (3) is the Constant Relative Risk Aversion (CRRA)-utility function \(u\) given by  
\[u(c)=\frac{c^{1-\gamma}}{1-\gamma}, \tag{5}\]  
with risk aversion \(\gamma>0\). Note that \(u\) is strictly convex and strictly monotonously increasing in \(c\).