# Computational Notes on Heterogeneous-Agent Macroeconomics¶

# Overview¶

These notes provide a crash course on solving heterogeneous-agent macro models. We will solve a simple representative-agent RBC model as a warm-up. We then turn to a partial equilibrium consumption-savings problem to introduce the Endogenous Grid Method for solving such problems. We then solve for a stationary equilibrium as in the Aiyagari (1994) model. This is our version of the deterministic steady staate although here there is still idiosyncratic risk even though there is no aggregate risk. In this context we will discuss non-stochastic simulation techniques. Next we will discuss the methodological challenges of adding aggregate risk to heterogeneous-agent models. The best-known solution method for heterogeneous-agent models with aggregate risk is the Krusell-Smith algorithm. The Reiter method uses perturbation techniques to create a local approximation to the dynamics of the economy around the stationary equilibrium. The advantage of the Reiter method is that it does not involve simulation, which can be time consuming when one needs to find market-clearing prices as part of the simulation. The disadvantage is that it is a linear, local approximation and therefore not able to capture higher order terms such as precautionary savings motives with respect to aggregate shocks (as is familiar from linearized representative agent models). We finish with an application of the Reiter method to a heterogeneous agent new Keynesian model.

These notes will present the ideas without getting too deep into the code that implements them. A set of Python programs implements the methods.