scieee AI-readable full text Open interactive document viewer

Solving discrete time heterogeneous agent models with aggregate risk and many idiosyncratic states by perturbation

Bayer, Christian,Luetticke, Ralph

Abstract

EconStor is a publication server for scholarly economic literature, provided as a non-commercial public service by the ZBW.

Full text

Bayer, Christian; Luetticke, Ralph Article Solving discrete time heterogeneous agent models with aggregate risk and many idiosyncratic states by perturbation Quantitative Economics Provided in Cooperation with: The Econometric Society Suggested Citation: Bayer, Christian; Luetticke, Ralph (2020) : Solving discrete time heterogeneous agent models with aggregate risk and many idiosyncratic states by perturbation, Quantitative Economics, ISSN 1759-7331, The Econometric Society, New Haven, CT, Vol. 11, Iss. 4, pp. 1253-1288, https://doi.org/10.3982/QE1243 This Version is available at: https://hdl.handle.net/10419/253577 Standard-Nutzungsbedingungen: Die Dokumente auf EconStor dürfen zu eigenen wissenschaftlichen Zwecken und zum Privatgebrauch gespeichert und kopiert werden. Sie dürfen die Dokumente nicht für öffentliche oder kommerzielle Zwecke vervielfältigen, öffentlich ausstellen, öffentlich zugänglich machen, vertreiben oder anderweitig nutzen. Sofern die Verfasser die Dokumente unter Open-Content-Lizenzen (insbesondere CC-Lizenzen) zur Verfügung gestellt haben sollten, gelten abweichend von diesen Nutzungsbedingungen die in der dort genannten Lizenz gewährten Nutzungsrechte. Terms of use: Documents in EconStor may be saved and copied for your personal and scholarly purposes. You are not to copy documents for public or commercial purposes, to exhibit the documents publicly, to make them publicly available on the internet, or to distribute or otherwise use the documents in public. If the documents have been made available under an Open Content Licence (especially Creative Commons Licences), you may exercise further usage rights as specified in the indicated licence. https://creativecommons.org/licenses/by-nc/4.0/ Quantitative Economics 11 (2020), 1253–1288 1759-7331/20201253 Solving discrete time heterogeneous agent models with aggregate risk and many idiosyncratic states by perturbation Christian Bayer Department of Economics, Universität Bonn, CEPR, and IZA Ralph Luetticke Department of Economics, University College London, CEPR, and CFM This paper describes a method for solving heterogeneous agent models with aggregate risk and many idiosyncratic states formulated in discrete time. It extends the method proposed by Reiter (2009) and complements recent work by Ahn, Kaplan, Moll, Winberry, and Wolf (2017) on how to solve such models in continuous time. We suggest first solving for the stationary equilibrium of the model without aggregate risk. We then write the functionals that describe the dynamic equilibrium as sparse expansions around their stationary equilibrium counterparts. Finally, we use the perturbation method of Schmitt-Grohé and Uribe (2004)toapproximate the aggregate dynamics of the model. Keywords. Numerical methods, heterogeneous agent models, linearization, incomplete markets. JEL classification. C63, E32. 1. Introduction Models of heterogeneous agents have become widespread in macroeconomics, at least since Krusell and Smith (1997,1998) developed the first widely applicable algorithm to solve them in an environment of aggregate risk. Yet, their use has been limited initially by the computational resources needed to solve these models. Over the last decade,substantial progress has been made in developing algorithms that can solve these models more efficiently.1One of the most popular and powerful of these methods was originally developed by Reiter (2002,2009). This method extends perturbation methods to heterogeneous agent environments, that is, it builds on the methods often used to solve Christian Bayer: [email protected] Ralph Luetticke: [email protected] We would like to thank Benjamin Born and Philip Jung as well as conference and seminar participants at AMCM 2019 in Lillehammer, PASC 2019 in Zurich, Universitat Autonoma Barcelona, Universität Konstanz, and University of Oxford, for helpful comments and suggestions as well as Seungcheol Lee and Seungmoon Park for translating our codes into Python for the HARK toolkit (github.com/econ-ark/HARK). Christian Bayer gratefully acknowledges support through the ERC-CoG project Liquid-House-Cycle funded by the European Union’s Horizon 2020 Program under grant agreement No. 724204. 1See, for example, the JEDC comparison project: Den Haan, Judd, and Juillard (2010), Den Haan (2010b), Reiter (2010b), Young (2010), Maliar, Maliar, and Valli (2010), Kim, Kollmann, and Kim (2010), Algan (2010), Den Haan and Rendahl (2010). ©2020 The Authors. Licensed under the Creative Commons Attribution-NonCommercial License 4.0. Available at http://qeconomics.org.https://doi.org/10.3982/QE1243 1254 Bayer and Luetticke Quantitative Economics 11 (2020) dynamic stochastic general equilibrium models with a representative agent (see, e.g., Schmitt-Grohé and Uribe (2004)). Our paper restates this procedure and additionally shows how the necessary dimensionality reduction of the heterogeneous agent model can be achieved in a new, intuitive way. The extension of perturbation methods to heterogeneous agent models relies on writing the model in the form of a nonlinear difference equation that is functionvalued instead of vector-valued (as in representative agent models). This equation is then (linearly) approximated around the stationary equilibrium of the heterogeneous agent model without aggregate risk. The (at least) two functionals that enter the difference equation are the distribution of agents over idiosyncratic states (e.g., the wealth distribution) and the function (value or policy function) that describes the optimal individual behavior. These functionals can be seen as replacements for the aggregate capital accumulation and consumption Euler equation in representative agent models. These replacements allow us to maintain all nonlinearity with respect to microeconomic shocks—yet obtaining a model that is linear in aggregate variables. While all of this is straightforward in theory, the key practical issue is how to approximate the functionals involved because they need to be replaced by finite-dimensional objects for the actual computation of the model’s dynamics. In particular, when the individual planning problem is rich insofar as it has many idiosyncratic states, this issue is severe. The curse of dimensionality implies that it is hard to come up with a small enough finite-dimensional representation of the distribution function and the value/policy function without having any a priori knowledge of their shape. However, the solution of the stationary equilibrium provides us with such knowledge in most practical cases. Therefore, we propose a dimensionality reduction step after the stationary equilibrium of the economy (i.e., without aggregate risk) has been determined, but before perturbing the system. This dimensionality reduction is adaptive and takes into account the shape of the distribution and value function in the stationary equilibrium. As a result, the stationary equilibrium can be computed without taking into account that the goal is to solve for aggregate dynamics in the end. In detail, we suggest using sparse expansions of value and distribution functions around their nonsparse stationary equilibrium counterparts. First, we write the value function in the stationary equilibrium as a sum of a full set of basis functions and determine the coefficients on these. We then allow only those coefficients of the basis functions to vary outside the stationary equilibrium that are large in the stationary equilibrium while we keep all small coefficients at their stationary equilibrium values. This is analogous to lossy video compression where the compressed video stream is coded by strongly compressing the difference to a lightly compressed reference frame. In fact, we borrow further from image compression by writing the value functions in the form of their discrete cosine transform (i.e., as Chebyshev polynomials on the Chebyshev nodes). Second, we split the high-dimensional distribution function into the histograms of its marginals and their (joint) copula. As a baseline, we suggest keeping the copula fixed at its stationary equilibrium value. This, as a second dimensionality reduction, picks up the idea of Krusell and Smith (1997,1998) that not all moments of the wealthincome distribution are equally important for price formation and, therefore, relevant Quantitative Economics 11 (2020) Solving discrete time heterogeneous agent models 1255 for the equilibrium dynamics. The assumption of a fixed copula implies that the rank correlation among, say, wealth in various kinds of assets and income is time constant without imposing any restriction on changes in the shape of the marginal distributions. However, one can also treat the copula as time varying, applying the same dimensionality reduction for the copula as we do for the value/policy functions, that is, using the discrete cosine transforms. Concretely, we show, both for an incomplete markets model with one asset and for a model with two assets, that the assumption of a fixed copula has little impact on the model dynamics but substantially speeds up the computation. The largest share of the computation time falls on the calculation of the stationary equilibrium followed by the calculation of the derivatives of the nonlinear difference equation. However, both can be sped up by parallelization. At any rate, the models we consider can all be solved on a standard desktop computer in a matter of seconds or minutes using our algorithm. By reducing the dimensionality after the solution of the stationary equilibrium but before linearizing, our method differs from existing proposals. The original proposal by Reiter (2002) was to represent distribution functions by histograms without any dimensionality reduction and to write value functions (or other functionals describing the dynamic planning problem) as finite-dimensional parametric objects—for example, by using splines. However, when the individual planning problem is rich insofar as it has many idiosyncratic states, this procedure can become inaccurate and in many cases even infeasible to solve numerically. The first idea to tackle this issue was to be as sparse as possible in the parametric approximation of functions when solving for the stationary equilibrium (see, e.g., Reiter (2009)), for example, through sparse grid methods in the dynamic planning problem (see, e.g., Bungartz and Griebel (2004), Krueger and Kubler (2004)) and by using mixtures of parametric distributions as proposed by Winberry (2018). In other words, these methods rely on achieving dimensionality reduction ex ante, before solving for the stationary equilibrium, and hence impose a numerical constraint on this solution. The analogy of this is still in image compression, or the compression of a sequence of images picture-by-picture, which is in general inefficient for video compression because of many nonmoving parts. For a dynamic equilibrium model, this analogy carries over: Many aspects of value and policy functions do not change much with aggregate shocks, such that the stationary equilibrium functions are good “reference frames.” An alternative attack, also suggested by Reiter (2010a), is to use singular value decomposition for dimensionality reduction of the Jacobian of the system after linearizing the difference equation but before solving it. Ahn et al. (2017) developed this approach further in that they write the planning problem in continuous time and suggest using automatic differentiation in order to obtain a sparse Jacobian. This helps with both the memory requirements, and with the computing time for both the singular value decomposition and the solving of the difference equation itself. In addition, they suggest perturbing the deviations of value and distribution functions from their stationary equilibrium counterparts instead of perturbing the functions themselves. This allows for different parametric classes for deviations and stationary equilibrium functionals. As a result, it decouples the number of perturbed parameters from the number of parameters used 1256 Bayer and Luetticke Quantitative Economics 11 (2020) in the approximation of the functions in the stationary equilibrium (which can potentially be richer). Our approach shares the latter aspect with the approach of Ahn et al. (2017). Compared to their method, ours has the advantage of avoiding the calculation of a very large Jacobian because the dimensionality is reduced before this step. Thus, it can be applied to models formulated in discrete time, where the Jacobian would otherwise be too nonsparse to be efficiently stored in a PC’s memory. Another advantage is that this allows us to calculate second-order (or higher) perturbations, because the number of (higher-order) derivatives to be calculated does not increase too fast. Concretely, we provide an example where it takes a few minutes to calculate a brute-force second-order perturbation solution to the Krusell and Smith (1998) model—brute-force in the sense that we do not exploit prior theoretical knowledge of some second-order derivatives being zero. The remainder of the paper is organized as follows: Section 2defines the generic model we aim to solve with our method and lays out the solution method itself. Section 3provides the economic model of two application examples: first, a standard incomplete markets model with just a single asset, capital, as in Krusell and Smith (1998); second, an extension of that model, in which households have to choose between assets of different liquidity. They can hold a liquid nominal asset or illiquid capital. We add a nominal rigidity to this model, such that it is of the New-Keynesian flavor. For the first model variant, we can compare our solution to the original Krusell and Smith (1998)algorithm and to the standard Reiter (2009) approach. Our method is equally as precise as Reiter’s standard approach but faster. It is faster and slightly less precise than the Krusell and Smith algorithm in our example. The second model variant is too rich in terms of aggregate states to be solved by Reiter’s standard approach. Here, we only show that simulating the model along the lines of Den Haan’s (2010a) test proves the method to be accurate, that business cycle properties of the model change little when perturbing a larger set of DCT-coefficients, and that the model produces realistic asset return premia and a reasonably good approximation of asset market clearing. Section 5concludes. Example codes are provided in the Appendix (Bayer and Luetticke (2020)). 2. Method We consider a generic economy with a continuum of heterogeneous agents and aggregate risk. We first define the objects we need to work with. Thereafter, we define a stationary equilibrium and a sequential equilibrium (with recursive individual planning) for this economy. Then we describe how the sequential equilibrium can be solved for locally and how a reduction of the state space can be achieved.Finally, we give an overview of the suggested algorithm. 2.1 Prerequisites and notation Let St∈Rndenote the aggregate states in this economy other than the distribution of agents over their idiosyncratic states sit ∈Rmfor individual iat time t. In a representative agent model, these Stwould be the only state variables. With heterogeneous agents, Quantitative Economics 11 (2020) Solving discrete time heterogeneous agent models 1257 the distribution function μtof agents over sit is also part of the aggregate states of the economy but for notational purposes shall not be included in St. Both Stand sit shall be partitioned into an exogenous stochastic and an endogenous deterministic component St=Xt Dts it =xit dit(1) with length n=nx+ndand m=mx+md, respectively. With stochastic elements in Stand sit, agents in the economy face both aggregate and idiosyncratic risk. We denote the stochastic elements of the aggregate and idiosyncratic state space by Xtand xit, respectively. We assume that all stochastic variables follow a stationary Markov chain, such that Xt+1=HX(Xt)+εt+1x it+1=hx(xit)+it+1(2) and the innovations εt+1,it+1have variances ωΩ and σΣfor the aggregate and idiosyncratic variables, respectively. The remaining idiosyncratic state variables dit are chosen by households in order to maximize their utility. This choice shall be described by the generic planning problem ν(xitditStμt)=max dit+1 u(xitditdit+1;Pt)+βEν(xit+1dit+1St+1μt+1) (3) subject to dit+1∈Γ(x itditPt)where Γis a budget set and Pt=P(XtDtμt)is a pricing kernel.2Prices may result from market clearing in the sense introduced below, but may also be directly determined by the aggregate state or the distribution, such as, for example, interest rates set by the central bank or the wage rate as a function of the aggregate amount of capital. The further aggregate states move for simplicity according to some given law of motion Dt+1=HD(XtDtμt).3Note that this does not preclude prices from also depending on choices for state variables Dt+1made at time tbecause we can write these as functions of states in t. It will come in handy later to simplify notation for the Bellman equation by observing that, from the individual’s point of view, aggregates and distributions only matter through prices. These, in turn, we can summarize by adding a time index tto the value functions. Dropping the indexes to the idiosyncratic states and using to denote the next period variables, we can write the individual planning problem recursively as νt(xd) =max d∈Γt(xd) utxdd+βEνt+1xd(4) where the time index here stands for conditioning the individual planning problem and the pricing kernel on all state variables of time t. Individual policy functions hd tcan be defined accordingly. 2Potentially, prices indirectly enter into the utility function because they may change the mapping of states to consumption. 3The law of motion HDcan be the outcome of some other aggregate planning problem as well. Importantly, it is neither stochastic nor influenced by a single individual decision. 1258 Bayer and Luetticke Quantitative Economics 11 (2020) To close the model, we need a description of market clearing. We define an excess demand function Φt(hd tμt)that maps the idiosyncratic policies and the distribution, as well as prices and aggregate states (captured by the time index), into a real vector. Typically, we have as many prices as idiosyncratic endogenous states, given that we assumed an exogenous law of motion for aggregate states, that is, Φt(hd tμt)∈Rmd. For example, in an economy as in Krusell and Smith (1998), that is, with capital and aggregate productivity risk, Φis given by the difference between the marginal product of capital and the rate of return on capital. In a bond economy with only IOUs, in contrast, we would have Φ=hd t(s)dμt(a time constant Φ), and in an economy with government bondsthiswouldbeΦt=hd t(s)dμt−Bt,whereBtis the amount of government bonds issued and circulating in t(such that Φchanges in aggregates). 2.2 Stationary equilibrium and approximate solution Since the method developed by Reiter (2009) approximates the aggregate dynamics around the stationary equilibrium, we first consider an economy without aggregate risk, that is, where ω=0. For such an economy, prices, distributions, and hence value functions do not change over time, and we can define a stationary equilibrium generically as follows. Definition 1. A stationary equilibrium is a value function ν, a distribution function μ, a policy function hd(s), and prices Psuch that: 1. The individual policy hd(s) is the maximizer of the Bellman equation (3)givenP, hd(xd) =arg max d∈ΓP(xd) uxdd+βEνxd(5) 2. The value function solves the Bellman equation (3) given the individual policy hd(s). 3. Markets clear, that is, Φ(hdμ) =0. 4. The distribution μis the stationary distribution of the Markov chain induced by h(s) := hx(s)+ hd(s) . To solve for the equilibrium, it is necessary to approximate the model. Typically, the model is solved for a (full tensor) grid of points in Rmreplacing the functionals by some parametric approximation. A common approach is, for example, to replace the value functions with splines with the nodes of the spline being equal to the grid points. When first-order conditions are sufficient and the problem is differentiable, we can replace the Bellman equation with an Euler equation to describe the planning problem. Since the techniques to find the equilibrium value functions are standard, we refer only to the literature here (see, e.g., Carroll (2006), Hintermaier and Koeniger (2010)). Similarly, the distribution is often approximated by a step function (the density being replaced by a point mass) on the grid or by a piecewise linear function (the density Quantitative Economics 11 (2020) Solving discrete time heterogeneous agent models 1259 function being a step function).4Since policy functions map potentially into nongrid points, a standard technique is to introduce some trembling to the policy function such that policies fall on neighboring grid points with such probabilities that the off-grid policy equals the expected value of the tremble; see Young (2010).5 Under these assumptions, the dynamics of the wealth distribution can be described by the point-mass, in short a histogram, dμ, replacing the density, and a transition matrix Πhinduced by the policy function h. In the stationary economy, dμ=dμΠh(6) needs to hold. This is the discrete time analogue to the Kolmogorov forward/Fokker– Planck equation in continuous time systems. For a given transition probability matrix, that is, for a given policy function, the stationary distribution can then be calculated efficiently by determining the eigenvector of Πhto the eigenvalue 1. Similarly, if we assume that the value function is replaced by a linear interpolant, we obtain the result that the solution to the Bellman equation is given by a finite vector of values, with a slight abuse of notation also denoted by ν, which needs to satisfy ν=uhd+βΠhν (7) where uhdis the period payoff under the optimal policy.6 In the following, we assume that the stationary equilibrium is solved for in this way on a full tensor grid, because these methods are readily available and easy to implement, and their application is, in most cases, not constrained by memory availability even on desktop computers. However, the method laid out below extends readily to the case where the stationary equilibrium is solved for by sparse grid methods; see Bungartz and Griebel (2004)orKrueger and Kubler (2004). 2.3 Sequential equilibrium with recursive individual planning If there is uncertainty regarding the aggregate states, value functions written as functions of idiosyncratic states are no longer time constant in equilibrium. The same holds true for the distribution functions. Instead, if the model is stationary, value functions and distributions will converge to a sequence that fulfills the following equilibrium conditions.7 4We follow Young (2010) in using the point-mass approach throughout and understand the word “histogram” as a synonym for point-mass distributions. 5If one wants to read this in a strict way, then we assume that the individual planner can choose only mixed strategies over two neighboring grid points and that the current payoffs depend on the two grid points and the relative probability weights chosen. Then the solution with linear interpolation is an exact solution to the described surrogate planning problem. 6If first-order conditions are sufficient such that, say, a standard consumption Euler equation holds, we can also work with u hd=β(1+r)Πhu hd instead of (7), where u his the marginal utility of consumption under the optimal policy. 7Note that we write the problem still in recursive form from a household’s point of view. 1260 Bayer and Luetticke Quantitative Economics 11 (2020) Definition 2. A sequential competitive equilibrium with recursive individual planning is a sequence of value functions νt, a sequence of distribution functions μt, a sequence of policy functions hd t(s), a sequence of aggregate states St, and a sequence of prices Pt such that at each point in time t: 1. The individual policy is the maximizer of the Bellman equation (3)giventheprices Pt, hd t(xd) =arg max d∈Γ(xd;Pt)uxd d;Pt+βEνt+1xd(8) 2. The value function solves the Bellman equation (3) given the individual policy hd t and the expected continuation value νt+1. 3. Markets clear, that is, Φt(hd tμtPtSt)=0. 4. The distribution μt+1is induced by ht(s) := hx(s)+t hd t(s) and the distribution μt. 5. The sequence of aggregate states is induced by Xt+1 Dt+1=HX(XtDt)+εt+1 HD(XtDtμt) Again, we need to approximate the functions involved in the model in a suitable way to solve the model. For that purpose, we replace the distribution function by a histogram and add trembles to the policy. Finally, we write the value function as a linear interpolant. This implies that the discrete time Fokker–Planck equation (6) takes the form dμt+1=dμtΠht(9) which makes clear its forward equation character. Further, note that due to the continuum-of-agents assumption, there is no randomness in the transition other than through aggregate states and, therefore, shocks changing ht. The Bellman equation (7) now takes the form νt=uhd t+βΠhtνt+1(10) where uhd tis the period payoff under the optimal policy at time t. Combining these equilibrium conditions, we can summarize the sequential equilibrium conditions by the nonlinear difference equation given by F(dμtStdμt+1St+1νtPtνt+1Pt+1εt+1)= ⎡ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎣ dμt+1−dμtΠht Xt+1−HX(XtDt)+εt+1 Dt+1−HD(XtDtdμt) νt−(uhd t+βΠhtνt+1) Φthd tdμt εt+1 ⎤ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎦ (11) s.t. hd t(s) =arg max d∈Γ(xd;Pt)uxd d;Pt+βEνt+1xd(12) Quantitative Economics 11 (2020) Solving discrete time heterogeneous agent models 1267 (b) Calculate the discrete cosine transformation of Valong all md+1dimensions. This yields coefficients Θ. Find the minimal index set I,suchthat#i∈IΘ(i)2 #iΘ(i)2> 1−(by sorting the coefficients and retaining only the largest ones). (c) Define a sparse vector that has #Inonzero entries, and hence is effectively much shorter than Θ∈RJ. In the following, when we speak of perturbing θt, we mean perturbing its nonzero entries. This vector is used to assign values to those coefficients of the discrete cosine transformation of Vthat were found to be different from zero, and hence important. In other words, it assigns a value to each coefficient in the index set I, such that we obtain the full set of coefficients, ˆ Θ(θ|Θ I)∈RJ,whichisgivenby ˆ Θ=Θ(i) +θ(i) if i∈I Θ(i) if i/∈I The mapping of this array ˆ Θto the value function values ˆ V(θ) is obtained through an inverse cosine transformation. 3. Linearization (a) Define the following objects: •the difference between the value function implied from one backward iteration based on its value at time t+1and the value function for time t as implied by θt. We apply the discrete cosine transformation to the value functions and evaluate on all points in S ν(θtθt+1Pt):= θt−dctTˆ V(θt+1)|Pt∈RJ(19) The shorter vector ∗ νselects out of νonly those elements that correspond to the index set I. •for all variables j=0mdthe difference between the marginal distribution for time t+1obtained from iterating forward once (using the optimal policies) the distribution implied by (μj t)j=0mdand the copula Ξ, ∗ μμj tj=0mdμj t+1j=0mdPtθt+1∈R#(md+1)nj(20) •the excess demand function Φμj tj=0mdθt+1PtStSt+1:= ΦdΞμj tj=0mdhd Ptˆ V(θt+1)StSt+1 (21) (b) Use these differences (19)–(21) to define a function Fμj tj=0mdStSt+1μj t+1j=0mdθtPtθt+1Pt+1|ΞVI 1268 Bayer and Luetticke Quantitative Economics 11 (2020) that describes the economy as a system of nonlinear difference equations F=⎡ ⎢ ⎢ ⎢ ⎢ ⎣ ∗ ν(θtθt+1Pt) ∗ μμj tj=0mdμj t+1j=0mdPtθt+1 St+1−H(St) Φμj tj=0mdθt+1PtStSt+1 ⎤ ⎥ ⎥ ⎥ ⎥ ⎦ (22) (c) Calculate the Jacobian of F. Define A,Bas defined in the text before and as in Schmitt-Grohé and Uribe (2004). (d) Calculate the qz decomposition and solve for the linearized dynamics using the algorithm provided by Schmitt-Grohé and Uribe (2004). 3. Examples In the following, we discuss two examples to illustrate our modification of Reiter’s method to solve general equilibrium models with heterogeneous agents and aggregate risk. Both examples share the same model of consumption-savings choice in which households face uninsurable income risk and use assets to self-insure. We then specify two variants of the model: one without nominal frictions and only one asset, that is, the setup of Krusell and Smith (1998); second, a setup with two assets of different liquidity and a nominal rigidity. The first example can be solved using the original Krusell and Smith algorithm and the Reiter algorithm without state-space reduction. For the second example, state-space reduction is necessary to render the computation feasible. Details on the numerical precision of the various algorithms are provided in Section 4. 3.1 Household sector There is a continuum of ex ante identical households of measure one, indexed by i. Households are infinitely lived, have time-separablepreferences with time-discount factor β, and derive felicity from consumption cit and leisure. Households have Greenwood–Hercowitz–Huffman (GHH) preferences, and maximize the discounted sum of felicity:12 E0max {citnitkit} ∞ $ t=0 βtucit −G(hitnit) The maximization is subject to the budget constraints described further below. The felicity function uexhibits a constant relative risk aversion (CRRA) with risk aversion parameter ξ>0, u(xit)=1 1−ξx1−ξ it  12The assumption of GHH preferences simplifies the numerical analysis of the stationary equilibrium substantially but is not necessary for our implementation of Reiter’s method. Quantitative Economics 11 (2020) Solving discrete time heterogeneous agent models 1269 where xit =cit −G(hitnit)is household i’s composite demand for goods consumption cit and leisure and Gmeasures the disutility from work. Goods consumption bundles varieties jof differentiated goods according to a Dixit–Stiglitz aggregator: cit =!%c η−1 η ijt dj"η η−1 Each of these differentiated goods is offered at price pjt, so that for the aggregate price level, Pt=(p1−η jt dj) 1 1−η, the demand for each of the varieties is given by cijt =!pjt Pt"−η cit The disutility of work, G(hitnit), determines a household’s labor supply given the aggregate wage rate, wt, and a labor income tax, τ, through the first-order condition: ∂G(hitnit) ∂nit =(1−τ)wthit Assuming that Ghas a constant elasticity w.r.t. n,∂G(hit nit) ∂nit =(1+γ)G(hitnit) nit with γ>0, we can simplify the expression for the composite consumption good xit making use of the first-order condition (3.1): xit =cit −G(hitnit)=cit −(1−τ)wthitnit 1+γ When the Frisch elasticity of labor supply is constant, the disutility of labor is always a constant fraction of labor income. Therefore, in both the budgetconstraint of the household and its felicity function, only after-tax income enters, and neither hours worked nor productivity appears separately. This implies that we can assume G(hitnit)=hit n1+γ it 1+γwithout further loss of generality as long as we treat the empirical distribution of income as a calibration target. This functional form simplifies the household problem as hit drops out from the first-order condition and all households supply the same number of hours nit =N(wt). Total effective labor input, nithit di, is hence also equal to N(wt)because hit di =1. A household’s labor income wthitnit is composed of the aggregate wage rate, wt,the household’s hours worked, nit, and its idiosyncratic labor productivity, hit. Productivity evolves according to a log-AR(1)process and a fixed probability of transition to a high income state in which hit =0but households receive a share of pure rents, that is, they become entrepreneurs: hit =⎧ ⎪ ⎪ ⎨ ⎪ ⎪ ⎩ expρhloghit−1+h itwith probability 1−ζif hit−1= 0 1with probability ιif hit−1=0 0otherwise with shocks to productivity h it being normally distributed. 1270 Bayer and Luetticke Quantitative Economics 11 (2020) With probability ζhouseholds become entrepreneurs (h=0). With probability ιan entrepreneur returns to the labor force with median productivity. An entrepreneurial householdobtainsafixedshareofthepurerents,Πt, in the economy (from monopolistic competition and creation of capital). We assume that the claim to the pure rent cannot be traded as an asset. The idea here is that a household that becomes an entrepreneur develops a variety only it can produce out of intermediate goods and it loses this capacity (because its variety is replaced by another household’s drastic innovation) when returning to the labor force. 3.2 Price setting These entrepreneur households, that is, the final-goods producers, differentiate the intermediate good and set prices. We assume price adjustment costs à la Rotemberg (1982). For tractability, we assume that the actual price setting is delegated to a masszero group of households (managers) that are risk neutral and compensated by a share in profits. They do not participate in any asset market. Under this assumption, managers maximize the present value of real profits given the demand for good j, yjt =(pjt/Pt)−ηYt and quadratic costs of price adjustment, that is, they maximize E0 ∞ $ t=0 βtYt&!pjt Pt −MCt"!pjt Pt"−η −η 2κ!log pjt pjt−1"2' with a time-constant discount factor. From the corresponding first-order condition for price setting, it is straightforward to derive the Phillips curve: log(πt)=βEt(log(πt+1)Yt+1 Yt)+κ!MCt−η−1 η"(23) where πtis the gross inflation rate, πt:= Pt Pt−1,andMC tis the real marginal costs. The price adjustment then creates real costs η 2κYtlog(πt)2. Since managers are a mass-zero group in the economy, their consumption does not show up in any resource constraint and all profits—net of price adjustment costs—go to the entrepreneur households (whose h=0). In the case of the two-asset economy, these households also obtain profit income from adjusting the aggregate capital stock. They can transform Itconsumption goods into Kt+1new capital goods (and back) according to the transformation function:13 It=φ 2(Kt+1/Kt)2Kt+Kt+1 13We assume that capital goods producers are each small, and thus ignore their externality on the future cost of capital goods production. Quantitative Economics 11 (2020) Solving discrete time heterogeneous agent models 1271 Since they are facing perfect competition in this market, entrepreneurs will adjust the stock of capital until the following first-order condition holds: qt=1+φKt+1/Kt where qtis the price of capital.14 3.3 Intermediate-goods producers Intermediate goods are produced with a constant returns to scale production function: Yt=AtNα tK(1−α) t where Kt=E(kit)is the aggregate capital supply, Nt=E(h)[(1−τ)wt]1 γis the aggregate labor supply, and Atis total factor productivity. Let MCtbe the relative price at which the intermediate good is sold to entrepreneurs. The intermediate-good producer maximizes profits, MCtYt−wtNt−(rt+δ)Kt=MCtAtNα tK(1−α) t−wtNt−(rt+δ)Kt but it operates in perfectly competitive markets, such that the real wage and the user costs of capital are given by the marginal products of labor and capital: wt=αAtMCt(Kt/Nt)1−αr t+δ=(1−α)AtMCt(Nt/Kt)α 3.4 Model variants To close the model, we still need to define which assets households can trade. As stated before, we consider two model variants. First, we have a variant of the original Krusell and Smith (1998) economy where only capital is traded, which is a perfectly liquid asset. This variant serves to benchmark our solution strategy against other discrete time methods. Second, we use the economy as in Bayer et al. (2019)andLuetticke (2018) with a liquid nominal asset and illiquid capital. This economy cannot be solved without state-space reduction and serves as an application example for those cases. 3.4.1 A neoclassical economy with one asset: The Krusell–Smith setup Our model nests the Krusell and Smith (1998) economy. In that economy, households save only in capital that is perfectly liquid. There are no entrepreneurs (ζ=0), labor supply is constant, competition is perfect, and price adjustment is costless (ηκ →∞,η κ→0). In addition, there is no capital adjustment cost, φ=0,suchthatqt=1. Taxes τare zero, too. Therefore, households optimize subject to this budget constraint: cit +kit+1=kit(1+rt)+wthitN kit+1≥0 where rtis the real return on capital. 14We assume for simplicity that all depreciation is replaced immediately through maintenance investment that transforms consumption goods into replacement investment one-for-one. 1272 Bayer and Luetticke Quantitative Economics 11 (2020) Substituting the expression cit =xit +wthitN 1+γfor consumption, we obtain xit +kit+1=kit(1+rt)+!γ 1+γwthitN" kit+1≥0 With this setup, one Bellman equation characterizes the dynamic planning problem of a household: V (kh;μA) =max kuxkkh+βV kh;μA where μis the wealth-income distribution and Ais aggregate productivity as the only other state variable. Capital and labor market clearing are the only equilibrium conditions (there is classical dichotomy and the nominal side is not determined): wt=αAt(Kt/N)1−αr t+δ=(1−α)At(N/Kt)α 3.4.2 New-Keynesian variant with liquid and illiquid assets The second model variant introduces a nominal rigidity, such that the Phillips curve (23) is not vertical, and a nominal bond that pays Rt, and makes capital illiquid, such that the two assets are not close substitutes. Illiquidity is modeled as follows: Only a randomly selected fraction of households, ν, participates in the market for capital each period and can thus actively sell or buy capital. All other households obtain dividends, but may only adjust their holdings of nominal bonds. Holdings of bonds have to be above an exogenous debt limit B,and holdings of capital have to be nonnegative. Therefore, households optimize subject to their budget constraint: cit +bit+1+qtkit+1=bit RbitRb t πt +(qt+rt)kit +(1−τ)(wthitNt+Ihit =0Πt) kit+1≥0bit+1≥B where bit is real bond holdings, Bis an exogenous borrowing constraint, kit is the amount of illiquid assets, qtis the price of these assets, rtis their dividend, πt=Pt−Pt−1 Pt−1 is realized inflation, and Ris the nominal interest rate on bonds, which depends on the portfolio position of the household and the central bank’s interest rate Rb t,which is set one period before. All households that do not participate in the capital market (kit+1=kit) still obtain dividends and can adjust their bond holdings. Depreciated capital has to be replaced for maintenance, such that the dividend, rt,isthenetreturnon capital. We assume that there is a wasted intermediation cost, R, when households resort to unsecured borrowing and specify: RbitRb t=Rb tif bit ≥0 Rb t+Rif bit <0 Quantitative Economics 11 (2020) Solving discrete time heterogeneous agent models 1273 This assumption creates a mass of households with zero unsecured credit but with the possibility to borrow, though at a penalty rate. Substituting the expression cit =xit +(1−τ)wthit Nt 1+γfor consumption, we obtain xit +bit+1+qtkit+1=bit RbitRb t πt +(qt+rt)kit +(1−τ)!γ 1+γwthitNt+Ihit=0Πt" kit+1≥0bit+1≥B With this setup, two Bellman equations characterize the dynamic planning problem of a household: Vain the case where the household can adjust its capital holdings and Vnotherwise: Vabkh;μRbA=max kb a uxbb akkh+βνEV ab akh;μRbA +(1−ν)EV nb akh;μRbA Vnbkh;μRbA=max b n uxbb nkkh+βνEV ab nkh;μRbA +(1−ν)EV nb nkh;μRbA Since we allow for a nominal rigidity, the equilibrium is only determined when a monetary and a fiscal policy are specified. Monetary policy controls the nominal interest rate on liquid assets, while fiscal policy determines the amount of government bonds by controlling fiscal deficits through the adjustment of expenditures. We assume that the monetary and fiscal authorities operate independently and their behavior is described by simple rules. We assume that monetary policy sets the nominal interest rate on bonds following a Taylor-type 1993 rule with interest rate smoothing: Rb t+1 Rb=!Rb t Rb"ρR!πt π"(1−ρR)θπ  The coefficient Rb≥0determines the nominal interest rate in the steady state. The coefficient θπ≥0governs the extent to which the central bank attempts to stabilize inflation around its steady-state value: the larger θπthe stronger is the reaction of the central bank to deviations from the inflation target. When θπ→∞, inflation is perfectly stabilized at its steady-state value. ρR≥0captures interest rate smoothing. We assume that the government issues bonds according to the rule (cf. Woodford (1995)): Bt+1 Bt =!Bt B"ρB!πt π"−γπ!Tt T"−γT  using tax revenues Tt=τ(wtNt+Πt)to finance government consumption, Gt, and interest on debt. In other words, the government seeks to stabilize debt in the long run and 1274 Bayer and Luetticke Quantitative Economics 11 (2020) output in the short run. The coefficient ρBcaptures whether and how fast the government seeks to repay its outstanding obligations Bt.ForρB<1, the government actively stabilizes real government debt, and for ρB=1the government rolls over all outstanding debt. The coefficients γπ,γTcapture the cyclicality of debt issuance: for γπ=γT=0, new debt does not actively react to tax revenues and inflation, but only to the value of outstanding debt. For γπ>0>γ T, debt is countercyclical; for γπ<0<γ Tit is procyclical. In equilibrium, we need both factor markets to clear, such that wt=αMCtAt(Kt/Nt)1−αr t+δ=(1−α)AtMCt(Nt/Kt)α and we also need asset markets to clear. This requires first Bt+1=Bdμt;Rb tAt;qtπt;Vat+1Vnt+1:= Eνb∗ a+(1−ν)b∗ n(24) where b∗ a,b∗ nare bond demand functions of adjusters and nonadjusters. They are functions of the states (bkh;Rb tAt), of current prices qt,πt, and of expectations of future prices summarized in the marginal value functions Vat+1Vnt+1. Expectations in the right-hand side expression are taken w.r.t. the distribution μt(bkh). Equilibrium requires the total net amount of bonds the household sector demands, Bd, to equal the supply of government bonds. In gross terms, there are more liquid assets in circulation as some households borrow up to B. Second, the asset market for capital has to clear. This requires that qt=1+φKt+1−Kt Kt  Kt+1=Kdμt;Rb tAt;qtπt;Vat+1Vnt+1:= Eνk∗+(1−ν)k (25) Again expectations are taken w.r.t. the distribution μt(bkh). 4. Numerical performance In the following, we first demonstrate the performance and accuracy of our method by comparing it to the Krusell and Smith (1998) algorithm for the standard Krusell and Smith (K-S) model, as described in Section 3.4.1. We then show the scalability of our method by solving heterogeneous agent New-Keynesian (HANK) models with higher dimensional heterogeneity, providing accuracy measures for the variant described in Section 3.4.2. Finally, we also show that our approach also practically renders secondorder approximatableions feasible. All codes are available on the authors’ websites and as a replication file inside the Supplementary Material (Bayer and Luetticke (2020)). 4.1 Comparison to Krusell and Smith (1998) To compare the performance and accuracy of our method, we solve Krusell and Smith’s (1998) model with the standard parameterization of the JEDC comparison project (cf. Quantitative Economics 11 (2020) Solving discrete time heterogeneous agent models 1275 Den Haan, Judd, and Juillard (2010)).15 A period in the model is a quarter, the discount factor is β=099, the coefficient of relative risk aversion is ξ=1, and the rate of depreciation equals 25% per quarter.16 Idiosyncratic and aggregate productivity risk both follow two-state Markov chains. We solve the household problem on 100 grid points for idiosyncratic capital. The grid for the aggregate capital stock has 3points for the Krusell– Smith algorithm and covers the unconditional ±3STD interval from the linearized solution. 4.1.1 Numerical quality Figure 1shows simulations of the K-S model for three different solution methods: (1) perturbation with state-space reduction via the fixed copula assumption and policy function compression (25 coefficients of the discrete cosine transformation conserve 9999% of the energy), (2) perturbation with a full policy function and histogram on the tensor product of the income and capital grid as in Reiter (2002), and (3) the original Krusell and Smith algorithm.17 The response of aggregate capital to TFP shocks is virtually the same in all three simulations. Table 1confirms this. The mean absolute error between the time series from the two linearization methods and the K-S algorithm is 003%. What is more, the linearization methods with and without state and control space reduction yield basically the same simulation for the aggregate stock of capital with a maximum absolute error of 0001%. To further evaluate the accuracy of our solutionmethod, we use the error metric suggested by Den Haan (2010a), comparing the simulation from the linearized solution of the model to one in which we solve for the equilibrium interest rate every period and Figure 1. Simulations of Krusell & Smith model. Notes: Both panels show simulations of the Krusell and Smith (1998) model with TFP shocks solved with (1) the Reiter method with our proposed state-space reduction, (2) the original Reiter method without state-space reduction, and (3) the original Krusell and Smith algorithm; simulated for 1000 periods. The draws for the productivity process are kept constant across solution methods. 15Setting η→∞and κ→∞, that is, no markups and flexible prices, yields the standard neoclassical incomplete markets model. 16See Appendix B, Table 11 for the calibration. 17The simulations start from the steady state without aggregaterisk, which is the same for all three methods. For all statistics, we simulate the model for 1000 periods. 1276 Bayer and Luetticke Quantitative Economics 11 (2020) Table 1. Simulation errors relative to Krusell and Smith algorithm. Absolute difference (in %) of log capital stocks Ktbetween simulations Reiter-Reduction vs. K-S Reiter-Full vs. K-S R.-Reduction vs. R.-Full Mean 00324 00324 00003 Max 00670 00662 00012 Note: Differences in percent between simulations of aggregate capital for the Krusell and Smith (1998) model solved with (1) the Reiter method with our proposed state-space reduction, (2) the original Reiter method without state-space reduction, (3) the original Krusell and Smith algorithm. The first two columns show the performance of (1) and (2) relative to (3), and the last column shows the performance of (1) relative to (2) for 1000 periods. The draws for the productivity process are kept constant across solution methods. Table 2. Den Haan errors. Absolute error (in %) for log capital Kt Reiter-Reduction Reiter-Full K-S Mean 00100 00102 00051 Max 00191 00193 00131 Note: Differences in percent between the simulation of the linearized solutions of the model and simulations in which we solve for the intratemporal equilibrium prices in every period and track the full histogram over time for t={11000};see Den Haan (2010a). Table 3. Run time for Krusell and Smith model. Stationary equilibrium Krusell and Smith Reiter-Reduction Reiter-Full in seconds 705 9161 038 119 Note: Run time in seconds on a Dell laptop with an Intel i7-7500U CPU at 270 GHz at 4. Model calibration and number of grid points as in Den Haan, Judd, and Juillard (2010). Code in Matlab. track the full histogram over time. The mean absolute error is 001% and the maximum error is 0019%;seeTable2. The K-S algorithm, which is the most accurate algorithm in Den Haan, Judd, and Juillard (2010), here is also most precise with a mean absolute error of 0005%. In Appendix A.2, we show that this result is not specific to the parameterization (as can be expected for a first-order perturbation, solution quality deteriorates with the variance of shocks). Finally, Table 3shows the run times of all three methods and the steady state separately. The Reiter method with state and control space reduction only takes 04seconds. This makes it more than 240 times faster than the Krusell and Smith algorithm. Without reduction, the run time increases by a factor of 3. Even when the time to compute the stationary equilibrium is taken into account, our linearization method is 13 times faster than the Krusell–Smith algorithm. The main advantage of linearization with state and control space reduction, however, lies in its capacity to solve models with many idiosyncratic states fast and precisely as the next section shows. Before going there, we will provide a short illustration of our dimension reduction procedure in the Krusell–Smith economy. Quantitative Economics 11 (2020) Solving discrete time heterogeneous agent models 1283 Table 6. Accuracy for two-asset model. Absolute error (in %)* Mean, for  Max, for  capital Ktbonds Btcapital Ktbonds Bt Baseline 0033 0081 0092 0617 Retain more DCT coefficients 0031 0080 0087 0610 Baseline +perturb copula 0043 0080 0151 0777 *Differences in percent between the simulation of the linearized solution of the model and a simulation in which we solve for the intratemporal equilibrium prices in every period and track the full histogram over time for t={11000};seeDen Haan (2010a). Table 7. Business cycle statistics for the two-asset model. σ(Yt)σ(C t)σ(I t) Baseline 140 139 449 Retain more DCT coefficients 142 142 449 Baseline +perturb copula 131 128 456 Note: The table displays the standard deviations of output Yt, consumption Ct, and investment It, alongside the Sharperatio for the excess return of illiquid assets for the two-asset model with only a TFP shock as described in the main text. Baseline refers to the numerical baseline specification, where we retain coefficients of the DCTs to maintain 999999% of the “energy” in the policy functions. In the second row, we increase this to 9999999%. The third row refers to a setup, where we perturb also 50 coefficients of the DCT representation of the copula. 4.3.2 Business cycles, asset prices The calibration of the model as in the previous subsection is meant to be as comparable as possible to the Krusell and Smith setup with one asset—there are no further frictions besides market incompleteness. A practical application of the method to a business cycle model, however, typically will feature nominal and real frictions. Appendix B, Table 13 summarizes such a calibration that we use in the following. Table 7shows that for this business cycle calibration with TFP, monetary, and uncertainty shocks also the business cycle statistics do vary relatively little, when we change the numerical specification. This resembles the results displayed in Figure 4for the KS model. Again, we consider a specification that perturbs the copula, too, and a specification that retains more coefficients of the DCT, allowing the energy to drop only by 10−7 instead of 10−6. Perturbing the copula slightly lowers output volatility and increases the volatility of investment somewhat. In addition to the business cycle statistics, we also look at how the model performs in terms of asset prices; see Table 8. We report the average and maximum absolute deviation from asset market clearing that the linearized solution produces, that is, we evaluate the difference in asset supply and demand for both Band Kgiven prices and the wealth distribution that we get from the simulation of the linearized solution. We find that deviations from exact market clearing for the two assets are small and of similar order of magnitude as the Den Haan statistics in Table 6. What is more, we calculate the Sharpe ratio for the model across the various numerical variants. Since the model produces a steady state return difference, an illiquidity 1284 Bayer and Luetticke Quantitative Economics 11 (2020) Table 8. Asset market clearing for the two-asset model. Deviation from Market Clearing in % Sharpe-Ratio Mean-Absolute Max-Absolute on Kton Bton Kton Bt Baseline 003% 005% 029% 065% 070 Retain more DCT coefficients 003% 005% 028% 064% 067 Baseline +perturb copula 001% 002% 022% 059% 068 Note: The table displays the deviation from market clearing in the asset markets obtained by comparing the model solution for bonds Band capital K(the bond supply and capital demand by firms) to values implied by the solution for the wealth distribution. Baseline refers to the numerical baseline specification, where we retain coefficients of the DCTs to maintain 999999% of the “energy” in the policy functions. In the second row, we increase this to 9999999%. The third row refers to a setup, where we perturb also 50 coefficients of the DCT representation of the copula. Figure 7. Aggregate response to idiosyncratic uncertainty shock. Notes:Responsetoa54% increase in uncertainty (measured by STD) of idiosyncratic income. premium for capital, the model gets a long way in terms of being close to the observed Sharpe-ratios of Jordà, Knoll, Kuvshinov, Schularick, and Taylor (2019) that range between 06for housing and 025 for equities. The model has somewhat to stable asset returns if anything. This illiquidity premium is closely tied to the concept of “wealthy hand-to-mouth” households (Kaplan and Violante (2014)) and the latter implies different investment behavior (see Bayer et al. (2019)andLuetticke (2018)). Figure 7shows the effect of higher uncertainty about idiosyncratic productivity in the Krusell and Smith model and the two-asset HANK model. Consumption falls in both models as households increase their precautionary savings in response tohigher uncertainty. In the Krusell and Smith model, higher savings translate one-for-one into capital, which leads to an economic expansion. In the two-asset model, by contrast, households prefer to hold more liquid portfolios. They sell illiquid capital to save more in liquid assets. Higher uncertainty therefore causes a simultaneous fall in consumption, investment, and output. The recessionary effect is further amplified through sticky prices, which makes the economy demand- Quantitative Economics 11 (2020) Solving discrete time heterogeneous agent models 1285 driven in the short run. See Bayer et al. (2019) for a more detailed discussion of the portfolio rebalancing channel of uncertainty. 5. Conclusion In this paper, we propose an extension of Reiter’s method to solve heterogeneous agent models with aggregate risk by perturbation. The proposed method relies on reducing the state space after solving for the stationary equilibrium but before linearizing the nonlinear difference equation that characterizes the equilibrium dynamics. The state-space reduction is achieved by “lossy compression” of the value functions, which are control variables of the system, and by approximating the dynamics of the multidimensional distribution of individual characteristics by a distribution with an (almost) fixed copula and varying marginals. Both steps effectively reduce the problem that high-dimensional idiosyncratic state spaces pose and allow us to efficiently and precisely solve for the equilibrium dynamics of heterogeneous agent economies as we have shown in two examples. Dealing with the curse of dimensionality is essential because it allows us to analyze business cycle models with rich heterogeneity. Examples that go beyond what we show here are models where aging adds another dimension to the household problem or where a richer household portfolio needs to be modeled, for example, when households own liquid assets, own houses, and write mortgages at the same time. To all these setups, the proposed method lends itself well to solving for equilibrium dynamics. References Ahmed, N., T. Natarajan, and K. R. Rao (1974), “Discrete cosine transform.” IEEE Transactions on Computers, C-23 (1), 90–93. [1263] Ahn, S., G. Kaplan, B. Moll, T. Winberry, and C. Wolf (2017), “When inequality matters for macro and macro matters for inequality.” In NBER Macroeconomics Annual,Vol.32, National Bureau of Economic Research. [1253,1255,1256,1262,1264] Algan, Y. (2010), “Solving the incomplete markets model with aggregate uncertainty using parameterized cross-sectional distributions.” Journal of Economic Dynamics and Control, 34 (1), 59–68. Computational Suite of Models with Heterogeneous Agents: Incomplete Markets and Aggregate Uncertainty. [1253] Bayer, C., R. Luetticke, L. Pham-Dao, and V. Tjaden (2019), “Precautionary savings, illiquid assets, and the aggregate consequences of shocks to household income risk.” Econometrica, 87 (1), 255–290. [1264,1271,1284,1285] Bayer, C. and R. Luetticke (2020), “Supplement to ‘Solving discrete time heterogeneous agent models with aggregate risk and many idiosyncratic states by perturbation’.” Quantitative Economics Supplemental Material, 11, https://doi.org/10.3982/QE1243. [1256,1274] Bungartz, H.-J. and M. Griebel (2004), “Sparse grids.” Acta Numerica, 13, 147–269. [1255, 1259] 1286 Bayer and Luetticke Quantitative Economics 11 (2020) Carroll, C. D. (2006), “The method of endogenous gridpoints for solving dynamic stochastic optimization problems.” Economics Letters, 91 (3), 312–320. [1258] Den Haan, W. J. (2010a), “Assessing the accuracy of the aggregate law of motion in models with heterogeneous agents.” Journal of Economic Dynamics and Control, 34 (1), 79– 99. [1256,1265,1275,1276,1282,1283] Den Haan, W. J. (2010b), “Comparison of solutions to the incomplete markets model with aggregate uncertainty.” Journal of Economic Dynamics and Control, 34 (1), 4–27. Computational Suite of Models with Heterogeneous Agents: Incomplete Markets and Aggregate Uncertainty. [1253] Den Haan, W. J., K. L. Judd, and M. Juillard (2010), “Computational suite of models with heterogeneous agents: Incomplete markets and aggregate uncertainty.” Journal of Economic Dynamics and Control,34(1),1–3.[1253,1275,1276] Den Haan, W. J. and P. Rendahl (2010), “Solving the incomplete markets model with aggregate uncertainty using explicit aggregation.” Journal of Economic Dynamics and Control, 34 (1), 69–78. Computational Suite of Models with Heterogeneous Agents: Incomplete Markets and Aggregate Uncertainty. [1253] Hintermaier, T. and W. Koeniger (2010), “The method of endogenous gridpoints with occasionally binding constraints among endogenous variables.” Journal of Economic Dynamics and Control, 34 (10), 2074–2088. [1258] Hu, X.-Y. and X.-H. Yu (1998), “The Chebyshev polynomial fitting properties of discrete cosine transform.” Signal Processing: Image Communication, 13 (1), 15–20. [1263] Jordà, Ò., K. Knoll, D. Kuvshinov, M. Schularick, and A. M. Taylor (2019), “The rate of return on everything, 1870–2015.” The Quarterly Journal of Economics, 134 (3), 1225– 1298. [1284] Kaplan, G. and G. L. Violante (2014), “A model of the consumption response to fiscal stimulus payments.” Econometrica, 82, 1199–1239. [1284] Kim, S. H., R. Kollmann, and J. Kim (2010), “Solving the incomplete market model with aggregate uncertainty using a perturbation method.” Journal of Economic Dynamics and Control, 34 (1), 50–58. Computational Suite of Models with Heterogeneous Agents: Incomplete Markets and Aggregate Uncertainty. [1253] Klein, P. (2000), “Using the generalized Schur form to solve a multivariate linear rational expectations model.” Journal of Economic Dynamics and Control, 24 (10), 1405–1423. [1261] Krueger, D. and F. Kubler (2004), “Computing equilibrium in OLG models with stochastic production.” Journal of Economic Dynamics and Control, 28 (7), 1411–1436. [1255,1259] Krusell, P. and A. A. Smith (1997), “Income and wealth heterogeneity, portfolio choice, and equilibrium asset returns.” Macroeconomic Dynamics, 1 (2), 387–422. [1253,1254] Quantitative Economics 11 (2020) Solving discrete time heterogeneous agent models 1287 Krusell, P. and A. A. Smith (1998), “Income and wealth heterogeneity in the macroeconomy.” Journal of Political Economy, 106 (5), 867–896. [1253,1254,1256,1258,1264,1268, 1271,1274,1275,1276,1281] Luetticke, R. (2018), “Transmission of monetary policy with heterogeneity in household portfolios.” CFM Discussion Paper Series (CFM-DP2018-19). [1264,1271,1284] Maliar, L., S. Maliar, and F. Valli (2010), “Solving the incomplete markets model with aggregate uncertainty using the Krusell–Smith algorithm.” Journal of Economic Dynamics and Control, 34 (1), 42–49. Computational Suite of Models with Heterogeneous Agents: Incomplete Markets and Aggregate Uncertainty. [1253] Mertens, T. M. and K. L. Judd (2018), “Solving an incomplete markets model with a large cross-section of agents.” Journal of Economic Dynamics and Control, 91 (C), 349–368. [1262] Ragot, X. (2018), “Heterogeneous agents in the macroeconomy: Reduced-heterogeneity representations.” In Handbook of Computational Economics, Vol. 4, 215–253, Elsevier. [1262] Reiter, M. (2002), “Recursive computation of heterogeneous agent models.” Report, Universitat Pompeu Fabra. [1253,1255,1261,1275] Reiter, M. (2009), “Solving heterogeneous-agent models by projection and perturbation.” Journal of Economic Dynamics and Control, 33 (3), 649–665. [1253,1255,1256, 1258,1262,1263,1264,1268,1277,1285] Reiter, M. (2010a), “Approximate and almost-exact aggregation in dynamic stochastic heterogeneous-agent models.” Economics Series 258, Institute for Advanced Studies. [1255] Reiter, M. (2010b), “Solving the incomplete markets model with aggregate uncertainty by backward induction.” Journal of Economic Dynamics and Control, 34 (1), 28–35. Computational Suite of Models with Heterogeneous Agents: Incomplete Markets and Aggregate Uncertainty. [1253] Rotemberg, J. J. (1982), “Sticky prices in the United States.” Journal of Political Economy, 1187–1211. [1270] Schmitt-Grohé, S. and M. Uribe (2004), “Solving dynamic general equilibrium models using a second-order approximation to the policy function.” Journal of Economic Dynamics and Control, 28 (4), 755–775. [1253,1254,1261,1268,1281] Taylor, J. B. (1993), “Discretion versus policy rules in practice.” Carnegie–Rochester Conference Series on Public Policy, 39, 195–214. [1273] Winberry, T. (2018), “A method for solving and estimating heterogeneous agent macro models.” Quantitative Economics, 9 (3), 1123–1151. [1255,1262,1263,1277] Woodford, M. (1995), “Price-level determinacy without control of a monetary aggregate.” Carnegie–Rochester Conference Series on Public Policy, 43 (Supplement C), 1–46. [1273] 1288 Bayer and Luetticke Quantitative Economics 11 (2020) Young, E. R. (2010), “Solving the incomplete markets model with aggregate uncertainty using the Krusell Smith algorithm and non-stochastic simulations.” Journal of Economic Dynamics and Control, 34 (1), 36–41. Computational Suite of Models with Heterogeneous Agents: Incomplete Markets and Aggregate Uncertainty. [1253,1259] Co-editor Kjetil Storesletten handled this manuscript. Manuscript received 15 November, 2018; final version accepted 10 July, 2020; available online 5 August, 2020.