**Supplement to Lecture Notes on "Income and Wealth Distribution" below:**

**Why Piketty Says r-g Matters for Inequality**

**Stanford University, Advanced Macroeconomics, Economics 235**

**Guest Lectures: "Heterogeneous Agent Models in Continuous Time"**

**Lecture 1 (huge file with movies)**,

**(smaller file without movies)**

**Lecture 2 (huge file with movies)**,

**(smaller file without movies)**

**Website with codes for numerical solution**

**Princeton University, Advanced Macroeconomics I, Economics 521**

**Syllabus**

**Lecture 1: Overview, Hamiltonians and Phase Diagrams**

**Lecture 2: New Keynesian Model in Continuous Time**

**Lecture 3: Werning (2012) "Managing a Liquidity Trap"**

**Lecture 4: Hamilton-Jacobi-Bellman Equations, Stochastic Differential Equations**

**Lecture 5: Stochastic HJB Equations, Kolmogorov Forward Equations**

**Lecture 6: Income and Wealth Distribution**

**Lecture 7: Stopping Time Problems, Firm Size Distribution**

**Lecture 8: Gabaix (2011) "Granular Origins", More on Heterogeneous Firms**

**Lecture 9: Lucas and Moll (2012), "Knowledge Growth and the Allocation of Time", More on Endogenous Growth**

**Lecture 10: Alvarez and Shimer (2011), "Search and Rest Unemployment"**

**MATLAB Codes:**

**HJB.m**,

**HJB_implicit.m**,

**Documentation for HJB_implicit.m**,

**HJB_stochastic_reflecting.m**

Part of these lecture notes are based on notes and/or presentation slides from Fernando Alvarez, Jess Benhabib, Xavier Gabaix, Esteban Rossi-Hansberg, and Ivan Werning. Thanks to these people.