Skip to content

Commit f1ad9ff

Browse files
committed
fix minor typos and section title capitalization
1 parent 72ae11f commit f1ad9ff

File tree

2 files changed

+25
-22
lines changed

2 files changed

+25
-22
lines changed

lectures/mccall_fitted_vfi.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -361,14 +361,17 @@ def vfi(
361361
```
362362

363363
Here's a function that uses a solution $v_u$ to compute the remaining functions of
364-
interest: $v_u$, and the continuation value function $h$.
364+
interest: $v_e$, and the continuation value function $h$.
365365

366366
We use the same expressions as we did in the {doc}`discrete case <mccall_model_with_sep_markov>`, after replacing sums with integrals.
367367

368368
```{code-cell} ipython3
369369
def compute_solution_functions(model, v_u):
370370
371-
# Interpolate v_u
371+
# Unpack model parameters
372+
c, α, β, ρ, ν, γ, w_grid, z_draws = model
373+
374+
# Interpolate v_u on the wage grid
372375
vf = lambda x: jnp.interp(x, w_grid, v_u)
373376
374377
def compute_expectation(w):
@@ -604,7 +607,7 @@ When unemployed, the agent accepts offers that exceed the reservation wage.
604607

605608
When employed, the agent faces job separation with probability $\alpha$ each period.
606609

607-
### Cross-Sectional Analysis
610+
### Cross-sectional analysis
608611

609612
Now let's simulate many agents simultaneously to examine the cross-sectional unemployment rate.
610613

lectures/mccall_model_with_sep_markov.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ libraries
4949
```{code-cell} ipython3
5050
:tags: [hide-output]
5151
52-
!pip install quantecon
52+
!pip install quantecon jax
5353
```
5454

5555
We use the following imports:
@@ -64,7 +64,7 @@ import matplotlib.pyplot as plt
6464
from functools import partial
6565
```
6666

67-
## Model Setup
67+
## Model setup
6868

6969
The setting is as follows:
7070

@@ -74,7 +74,7 @@ The setting is as follows:
7474
- Unemployed workers receive compensation $c$ per period
7575
- Future payoffs are discounted by factor $\beta \in (0,1)$
7676

77-
### Decision Problem
77+
### Decision problem
7878

7979
When unemployed and receiving wage offer $w$, the agent chooses between:
8080

@@ -86,7 +86,7 @@ The wage updates are as follows:
8686
* If an unemployed agent rejects offer $w$, then their next offer is drawn from $P(w, \cdot)$
8787
* If an employed agent loses a job in which they were paid wage $w$, then their next offer is drawn from $P(w, \cdot)$
8888

89-
### The Wage Offer Process
89+
### The wage offer process
9090

9191
To construct the wage offer process we start with an AR1 process.
9292

@@ -112,7 +112,7 @@ Actually, in practice, we approximate this wage process as follows:
112112

113113

114114

115-
### Value Functions
115+
### Value functions
116116

117117
We let
118118

@@ -168,12 +168,12 @@ $$
168168

169169
+++
170170

171-
### Optimal Policy
171+
### Optimal policy
172172

173173
Once we have the solutions $v_e$ and $v_u$ to these Bellman equations, we can compute the optimal policy: accept at current wage offer $w$ if
174174

175175
$$
176-
v_e(w) u(c) + β(Pv_u)(w)
176+
v_e(w) \geq u(c) + \beta (P v_u)(w)
177177
$$
178178

179179
The optimal policy turns out to be a reservation wage strategy: accept all wages above some threshold.
@@ -185,7 +185,7 @@ The optimal policy turns out to be a reservation wage strategy: accept all wages
185185

186186
Let's now implement the model.
187187

188-
### Set Up
188+
### Set up
189189

190190
The default utility function is a CRRA utility function
191191

@@ -234,7 +234,7 @@ def create_js_with_sep_model(
234234
```
235235

236236

237-
### Solution: First Pass
237+
### Solution: first pass
238238

239239
Let's put together a (not very efficient) routine for calculating the
240240
reservation wage.
@@ -244,7 +244,7 @@ reservation wage.
244244
It works by starting with guesses for $v_e$ and $v_u$ and iterating to
245245
convergence.
246246

247-
Here's are Bellman operators that update $v_u$ and $v_e$ respectively.
247+
Here are Bellman operators that update $v_u$ and $v_e$ respectively.
248248

249249

250250
```{code-cell} ipython3
@@ -313,7 +313,7 @@ def solve_model_first_pass(
313313
```
314314

315315

316-
### Road Test
316+
### Road test
317317

318318
Let's solve the model:
319319

@@ -348,9 +348,9 @@ The reservation wage is at the intersection of $v_e$, and the continuation value
348348
function, which is the value of rejecting.
349349

350350

351-
## Improving Efficiency
351+
## Improving efficiency
352352

353-
The solution method desribed above works fine but we can do much better.
353+
The solution method described above works fine but we can do much better.
354354

355355
First, we use the employed worker's Bellman equation to express
356356
$v_e$ in terms of $Pv_u$
@@ -495,7 +495,7 @@ The result is the same as before but we only iterate on one array --- and also
495495
our JAX code is more efficient.
496496

497497

498-
## Sensitivity Analysis
498+
## Sensitivity analysis
499499

500500
Let's examine how reservation wages change with the separation rate.
501501

@@ -523,7 +523,7 @@ Can you provide an intuitive economic story behind the outcome that you see in t
523523

524524
+++
525525

526-
## Employment Simulation
526+
## Employment simulation
527527

528528
Now let's simulate the employment dynamics of a single agent under the optimal policy.
529529

@@ -691,15 +691,15 @@ often leads a high new draw.
691691

692692
+++
693693

694-
## The Ergodic Property
694+
## Ergodic property
695695

696696
Below we examine cross-sectional unemployment.
697697

698698
In particular, we will look at the unemployment rate in a cross-sectional
699699
simulation and compare it to the time-average unemployment rate, which is the
700700
fraction of time an agent spends unemployed over a long time series.
701701

702-
We will see that these two values are approximately equal -- if fact they are
702+
We will see that these two values are approximately equal -- in fact they are
703703
exactly equal in the limit.
704704

705705
The reason is that the process $(S_t, W_t)$, where
@@ -744,7 +744,7 @@ Often the second approach is better for our purposes, since it's easier to paral
744744

745745
+++
746746

747-
## Cross-Sectional Analysis
747+
## Cross-sectional analysis
748748

749749
Now let's simulate many agents simultaneously to examine the cross-sectional unemployment rate.
750750

@@ -907,7 +907,7 @@ Now let's visualize the cross-sectional distribution:
907907
plot_cross_sectional_unemployment(model)
908908
```
909909

910-
## Lower Unemployment Compensation (c=0.5)
910+
## Lower unemployment compensation (c=0.5)
911911

912912
What happens to the cross-sectional unemployment rate with lower unemployment compensation?
913913

0 commit comments

Comments
 (0)