Skip to content

Commit 6b3e4e5

Browse files
committed
misc
1 parent 647e41e commit 6b3e4e5

File tree

1 file changed

+27
-17
lines changed

1 file changed

+27
-17
lines changed

lectures/aiyagari_egm.md

Lines changed: 27 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ kernelspec:
2626
:depth: 2
2727
```
2828

29-
In addition to what's included in base Anaconda, we need to install JAX
29+
In addition to what's included in base Anaconda, we need to install QuantEcon's Python library and JAX.
3030

3131
```{code-cell} ipython3
3232
:tags: [hide-output]
@@ -41,23 +41,27 @@ This lecture combines two important computational methods in macroeconomics:
4141
1. The **Aiyagari model** {cite}`Aiyagari1994` - a heterogeneous agent model with incomplete markets
4242
2. The **endogenous grid method** (EGM) {cite}`Carroll2006` - an efficient algorithm for solving dynamic programming problems
4343

44-
In the {doc}`standard Aiyagari lecture <aiyagari>`, we solved the household problem using Howard policy iteration (a value function iteration variant) and computed aggregate capital using the stationary distribution of the finite Markov chain.
44+
In the {doc}`standard Aiyagari lecture <aiyagari>`, we solved the household problem using discretization and value function iteration.
45+
46+
We then computed aggregate capital at a given set of prices using the stationary distribution of the finite Markov chain.
4547

4648
In this lecture, we take a different approach:
4749

48-
* We use the **endogenous grid method** to solve the household problem via the Euler equation, avoiding costly root-finding operations
49-
* We compute aggregate capital by **simulation** rather than calculating the stationary distribution analytically
50+
1. We use the **endogenous grid method** to solve the household problem via the Euler equation and linear interpolation.
51+
2. We compute aggregate capital by **simulation** rather than an algebraic technique (which only works for the finite case).
5052

5153
These modifications make the solution method faster and more flexible, especially when dealing with more complex models.
5254

5355
### References
5456

5557
The primary references for this lecture are:
5658

59+
* our {doc}`previous Aiyagari lecture <aiyagari>` for the key ideas
5760
* {cite}`Aiyagari1994` for the economic model
5861
* {cite}`Carroll2006` for the endogenous grid method
5962
* Chapter 18 of {cite}`Ljungqvist2012` for textbook treatment
6063

64+
6165
### Preliminaries
6266

6367
We use the following imports:
@@ -81,50 +85,56 @@ jax.config.update("jax_enable_x64", True)
8185

8286
## The Economy
8387

88+
The economy consists of households and a representative firm.
89+
8490
### Households
8591

8692
Infinitely lived households face idiosyncratic income shocks and a borrowing constraint.
8793

8894
The savings problem faced by a typical household is
8995

9096
$$
91-
\max \mathbb E \sum_{t=0}^{\infty} \beta^t u(c_t)
97+
\max \mathbb E \sum_{t=0}^{\infty} \beta^t u(c_t)
9298
$$
9399

94100
subject to
95101

96102
$$
97-
a_{t+1} + c_t \leq w z_t + (1 + r) a_t
98-
\quad
99-
c_t \geq 0,
100-
\quad \text{and} \quad
101-
a_t \geq -B
103+
a_{t+1} + c_t \leq w z_t + (1 + r) a_t
104+
\quad
105+
c_t \geq 0,
106+
\quad \text{and} \quad
107+
a_t \geq -B
102108
$$
103109

104110
where
105111

106112
* $c_t$ is current consumption
107113
* $a_t$ is assets
108114
* $z_t$ is an exogenous component of labor income (stochastic employment status)
109-
* $w$ is a wage rate
110-
* $r$ is a net interest rate
115+
* $w$ is the wage rate
116+
* $r$ is the interest rate
111117
* $B$ is the maximum amount that the agent is allowed to borrow
112118

113119
The exogenous process $\{z_t\}$ follows a finite state Markov chain with stochastic matrix $\Pi$.
114120

115-
The Euler equation for this problem is
121+
Optimal interior consumption choices satisfy the Euler equation
116122

117123
$$
118-
u'(c_t) = \beta \mathbb{E}_t [(1 + r) u'(c_{t+1})]
124+
u'(c) = \beta \mathbb{E_z} [(1 + r) u'(c')]
119125
$$
120126

121-
or, in terms of assets,
127+
(We use $'$ symbols for both derivatives and future values, which is not ideal but convenient and common.)
128+
129+
In terms of assets, this is
122130

123131
$$
124-
u'(w z_t + (1 + r) a_t - a_{t+1}) = \beta (1 + r) \sum_{z'} \Pi(z_t, z') u'(w z' + (1 + r) a_{t+1} - a'(a_{t+1}, z'))
132+
u'(w z + (1 + r) a - a')
133+
= \beta (1 + r) \sum_{z'} u'(w z' + (1 + r) a' - s(a', z')) \Pi(z, z')
125134
$$
126135

127-
where $a'(a, z)$ is the optimal savings policy function.
136+
where $s$ is the optimal savings policy function.
137+
128138

129139
### Firms
130140

0 commit comments

Comments
 (0)