Skip to content

Commit 69962e4

Browse files
Tom's Sept 2 edits of Zejin's fine new lecture
1 parent ab01e5f commit 69962e4

File tree

1 file changed

+72
-68
lines changed

1 file changed

+72
-68
lines changed

lectures/ak_aiyagari.md

Lines changed: 72 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,37 @@ kernelspec:
1111
name: python3
1212
---
1313

14-
# Prerequisite
1514

16-
Two quantecon lectures:
15+
# A Long-Lived, Heterogeneous Agent, Overlapping Generations Model
16+
17+
## Overview
18+
19+
This lecture describes an overlapping generations model with these features:
20+
21+
- A competitive equilibrium with incomplete markets determines prices and quantities
22+
- Agents live many periods as in {cite}`auerbach1987dynamic`
23+
- Agents receive idiosyncratic labor productivity shocks that cannot be fully insured as in {cite}`Aiyagari1994`
24+
- Government fiscal policy instruments include tax rates, debt, and transfers as in chapter 2 of {cite}`auerbach1987dynamic` and {doc}`Transitions in an Overlapping Generations Model<ak_2>`
25+
- Among other equilibrium objects, a competitive determines a sequence of cross-section densities of heterogeneous agents' consumptions, labor incomes, and savings
26+
27+
28+
We use the model to study:
29+
- How fiscal policies affect different generations
30+
- How market incompleteness promotes precautionary savings
31+
- How life-cycle savings and buffer-stock savings motives interact
32+
- How fiscal policies redistribute resources across and within generations
33+
34+
35+
As prerequisites for this lecture, we recommend two quantecon lectures:
1736

1837
1. [Discrete State Dynamic Programming](https://python-advanced.quantecon.org/discrete_dp.html)
1938
2. [Transitions in an Overlapping Generations Model](https://python.quantecon.org/ak2.html)
2039

21-
Optional: [The Aiyagari Model (with JAX)](https://jax.quantecon.org/aiyagari_jax.html)
40+
as well as the following optional reading
41+
42+
3. [The Aiyagari Model (with JAX)](https://jax.quantecon.org/aiyagari_jax.html)
43+
44+
As usual, let's start by importing some Python modules.
2245

2346
```{code-cell} ipython3
2447
:id: ac32ac26
@@ -33,59 +56,42 @@ import jax
3356

3457
+++ {"id": "ec922397", "user_expressions": []}
3558

36-
# Transitions in an AK-Aiyagari Model
59+
## Environment
3760

38-
## 1. Introduction
39-
40-
This lecture describes an overlapping generations model with these features:
41-
42-
43-
- Agents live many periods as in Auerbach and Kotlikoff (1987) (AK)
44-
- Agents receive idiosyncratic labor productivity shocks that cannot be fully insured as in Aiyagari (1994)
45-
- Government fiscal policy instruments include taxes, debt, and transfers as in AK
46-
- A competitive equilibrium determines prices and quantities
47-
48-
We use the framework to study:
49-
- How fiscal policies affect different generations
50-
- How market incompleteness promotes precautionary savings
51-
- How life-cycle savings and buffer-stock savings motives interact
52-
- Fiscal policies that redistribute resources across and within generations
53-
54-
## 2. Basic Settings
55-
56-
### Demographics and Time
61+
## Demographics and Time
5762

5863
- Time is discrete and is indexed by $t = 0, 1, 2, ...$
5964
- Each agent lives for $J = 50$ periods and faces no mortality risk
6065
- Age is indexed by $j = 0, 1, ..., 49$
6166
- Population size is fixed at $1/J$
6267

63-
### Individual State Variables
68+
## Individuals' State Variables
6469

65-
Agent $i$ of age $j$ at time t is characterized by:
70+
Agent $i$ of age $j$ at time $t$ has
6671

67-
1. Asset holdings $a_{i,j,t}$
68-
2. Idiosyncratic labor productivity $γ_{i,j,t}$
72+
- Asset holdings $a_{i,j,t}$
73+
- Idiosyncratic labor productivity $γ_{i,j,t}$
6974

70-
The idiosyncratic labor productivity process follows a two-state Markov chain with:
75+
An idiosyncratic labor productivity process follows a two-state Markov chain with:
7176
- Values $γ_l, γ_h$
7277
- Transition matrix $Π$
7378
- Initial distribution for newborns $π = [0.5, 0.5]$
7479

75-
### Labor Supply
80+
## Labor Supply
7681

7782
- An agent with productivity $γ_{i,j,t}$ supplies $l(j)γ_{i,j,t}$ efficiency units of labor
7883
- $l(j)$ is a deterministic age-specific labor efficiency units profile
79-
- An agent's effective labor supply combines both the life-cycle efficiency profile and the idiosyncratic stochastic process
80-
### Initial Conditions
84+
- An agent's effective labor supply depends on a life-cycle efficiency profile and an idiosyncratic stochastic process
85+
86+
## Initial Conditions
8187

8288
- Newborns start with zero assets: $a_{i,0,t} = 0$
8389
- Initial idiosyncratic productivityies are drawn from distribution $π$
8490
- Agents leave no bequests and have terminal value function $V_J(a) = 0$
8591

86-
## 3. Production
92+
## Production
8793

88-
A representative firm operates a constant returns to scale Cobb-Douglas technology:
94+
A representative firm operates a constant returns to scale Cobb-Douglas production:
8995

9096
$$Y_t = Z_t K_t^\alpha L_t^{1-\alpha}$$
9197

@@ -95,16 +101,16 @@ where:
95101
- $Z_t$ is total factor productivity
96102
- $α$ is the capital share
97103

98-
## 4. Government
104+
## Government
99105

100-
The government:
106+
The government
101107

102108
1. Issues one-period debt $D_t$
103109
2. Collects flat-rate tax rate $τ_t$ on labor and capital income
104110
3. Implements age-specific lump-sum taxes/transfers $δ_{j,t}$
105111
4. Makes government purchases $G_t$
106112

107-
### Government Budget Constraint
113+
108114

109115
The government budget constraint at time $t$ is:
110116

@@ -114,11 +120,11 @@ where total tax revenues $T_t$ satisfy:
114120

115121
$$T_t = \tau_t w_t L_t + \tau_t r_t(D_t + K_t) + \sum_j \delta_{j,t}$$
116122

117-
## 5. Activities in Factor Markets
123+
## Activities in Factor Markets
118124

119125
At each time $t ≥ 0$, agents supply labor and capital:
120126

121-
### Age-Specific Labor Supply
127+
### Age-Specific Labor Supplies
122128
- Agents of age $j ∈ {0,1,...,J-1}$ supply labor according to:
123129
* Their deterministic age-efficiency profile $l(j)$
124130
* Their current idiosyncratic productivity shock $γ_{i,j,t}$
@@ -134,39 +140,39 @@ At each time $t ≥ 0$, agents supply labor and capital:
134140
* Receive/pay age-specific transfers $δ_{j,t}$
135141

136142
### Key Features
137-
1. Lifecycle Patterns:
143+
* Lifecycle Patterns:
138144
- Labor productivity varies systematically with age according to $l(j)$
139145
- Asset holdings typically follow a lifecycle pattern
140146
- Age-specific fiscal transfers are described by $δ_{j,t}$
141147

142-
2. Within-Cohort Heterogeneity:
148+
* Within-Cohort Heterogeneity:
143149
- Agents of the same age differ in:
144150
* Their asset holdings $a_{i,j,t}$ due to different histories of idiosyncratic productivity shocks
145151
* Their productivities $γ_{i,j,t}$
146152
* Their consequent labor incomes and financial wealth
147153

148-
3. Cross-Cohort Interactions:
154+
* Cross-Cohort Interactions:
149155
- All cohorts participate together in factor markets
150156
- Asset supplies from all cohorts determine aggregate capital
151157
- Effective labor supplies from all cohorts determine aggregate labor
152158
- Equilibrium prices reflect both lifecycle and re-distributional forces
153159

154-
## 6. Representative Firm's Problem
160+
## Representative Firm's Problem
155161

156162
A representative firm chooses capital and effective labor to maximize profits:
157163

158164
$$\max_{K,L} Z_t K_t^\alpha L_t^{1-\alpha} - r_t K_t - w_t L_t$$
159165

160-
First-order necessary conditions yield:
166+
First-order necessary conditions imply that
161167

162168
$$w_t = (1-\alpha)Z_t(K_t/L_t)^\alpha$$
163169
$$r_t = \alpha Z_t(K_t/L_t)^{\alpha-1}$$
164170

165-
## 7. Individual's Problems
171+
## Households' Problems
172+
166173

167-
### Value Function
168174

169-
The household's value functions satisfy the Bellman equations
175+
A household's value function satisfies a Bellman equation
170176

171177
$$V_{j,t}(a, \gamma) = \max_{c,a'} \{u(c) + \beta\mathbb{E}[V_{j+1,t+1}(a', \gamma')]\}$$
172178

@@ -175,40 +181,40 @@ where maximization is subject to
175181
$$c + a' = (1 + r_t(1-\tau_t))a + (1-\tau_t)w_t l(j)\gamma - \delta_{j,t}$$
176182
$$c \geq 0$$
177183

178-
and the terminal condition
184+
and a terminal condition
179185
$V_{J,t}(a, γ) = 0$
180186

181-
### Population Dynamics
187+
## Population Dynamics
182188

183189
The joint probability density function $μ_{j,t}(a,γ)$ of asset holdings and idiosyncratic labor evolves according to
184190

185-
1. For newborns $(j=0)$:
191+
- For newborns $(j=0)$:
186192
$$μ_{0,t+1}(a',γ') = π(γ')\text{ if }a'=0\text{, }0\text{ otherwise}$$
187193

188-
2. For other cohorts:
194+
- For other cohorts:
189195
$$\mu_{j+1,t+1}(a',\gamma') = \int 1\{\sigma_{j,t}(a,\gamma)=a'\}\Pi(\gamma,\gamma')\mu_{j,t}(a,\gamma)d(a,\gamma)$$
190196

191197
where $σ_{j,t}(a,γ)$ is the optimal saving policy function.
192198

193-
## 8. Equilibrium
199+
## Equilibrium
194200

195201
An equilibrium consists of:
196-
1. Value functions $V_{j,t}$
197-
2. Policy functions $σ_{j,t}$
198-
3. Joint probability distributions $μ_{j,t}$
199-
4. Prices $r_t, w_t$
200-
5. Government policies $τ_t, D_t, δ_{j,t}, G_t$
202+
- Value functions $V_{j,t}$
203+
- Policy functions $σ_{j,t}$
204+
- Joint probability distributions $μ_{j,t}$
205+
- Prices $r_t, w_t$
206+
- Government policies $τ_t, D_t, δ_{j,t}, G_t$
201207

202208
that satisfy the following conditions
203209

204-
1. Given prices and government policies, value and policy functions solve households' problems
205-
2. Given prices, firms maximize profits
206-
3. Government budget constraints are satisfied
207-
4. Markets clear:
210+
- Given prices and government policies, value and policy functions solve households' problems
211+
- Given prices, the representative firm maximizes profits
212+
- Government budget constraints are satisfied
213+
- Markets clear:
208214
- Asset market: $K_t = \sum_j \int a \mu_{j,t}(a,\gamma)d(a,\gamma) - D_t$
209215
- Labor market: $L_t = \sum_j \int l(j)\gamma \mu_{j,t}(a,\gamma)d(a,\gamma)$
210216

211-
Relative to the AK model, our model adds
217+
Relative to the model presented in {doc}`Transitions in an Overlapping Generations Model<ak_2>`, the present model adds
212218
- Heterogeneity within generations due to productivity shocks
213219
- A precautionary savings motive
214220
- More re-distributional effects
@@ -220,22 +226,20 @@ Relative to the AK model, our model adds
220226

221227
+++ {"id": "pZKvFG_D6bK-", "user_expressions": []}
222228

223-
Using tools in [discrete state dynamic programming lecture](https://python-advanced.quantecon.org/discrete_dp.html), we solve our
224-
AK-Aiyagari model by combining
229+
Using tools in [discrete state dynamic programming lecture](https://python-advanced.quantecon.org/discrete_dp.html), we solve our model by combining
225230

226231
* value function iteration with
227232
* equilibrium price determination.
228233

229-
A reasonable approach is to nest a discrete DP solver inside an outer loop that searches for market-clearing prices.
234+
A sensible approach is to nest a discrete DP solver inside an outer loop that searches for market-clearing prices.
230235

231236
For each candidate sequence of prices (interest rates $r$ and wages $w$), we can solve individual households' dynamic programming problems using either value function iteration or policy function iteration to obtain optimal policy functions, then deduce associated stationary joint probability distributions of asset holdings and idiosyncratic labor efficiency units for each age cohort.
232237

233-
That would give us aggregate capital supply (from household savings) and labor supply (from the age-efficiency profile and productivity shocks).
238+
That will give us an aggregate capital supply (from household savings) and a labor supply (from the age-efficiency profile and productivity shocks).
234239

235-
We can then compare these with capital and labor demand from firms, compute deviations between factor market supplies and demands,
236-
then update our price guesses until we find market-clearing prices.
240+
We can then compare these with capital and labor demand from firms, compute deviations between factor market supplies and demands, then update price guesses until we find market-clearing prices.
237241

238-
For transition dynamics, we want to compute sequences of time-varying prices by
242+
For transition dynamics, we can compute sequences of time-varying prices by
239243

240244
* using backward induction to compute value and policy functions,
241245
* forward iteration for the distributions of agents across states.

0 commit comments

Comments
 (0)