@@ -34,7 +34,7 @@ In addition to what's in Anaconda, this lecture will need the following librarie
3434``` {code-cell} ipython3
3535:tags: [hide-output]
3636
37- !pip install quantecon
37+ !pip install quantecon jax myst-nb
3838```
3939
4040## Overview
@@ -65,7 +65,7 @@ from quantecon.distributions import BetaBinomial
6565from myst_nb import glue
6666```
6767
68- ## The Model
68+ ## The model
6969
7070The model is similar to the {doc}` baseline McCall job search model <mccall_model> ` .
7171
@@ -94,7 +94,7 @@ Wage offers $\{ W_t \}$ are IID with common distribution $q$.
9494
9595The set of possible wage values is denoted by $\mathbb W$.
9696
97- ### Timing and Decisions
97+ ### Timing and decisions
9898
9999At the start of each period, the agent can be either
100100
@@ -118,7 +118,7 @@ The process then repeats.
118118We do not allow for job search while employed---this topic is taken up in a {doc}`later lecture <jv>`.
119119```
120120
121- ## Solving the Model
121+ ## Solving the model
122122
123123We drop time subscripts in what follows and primes denote next period values.
124124
@@ -135,7 +135,7 @@ the worker makes optimal decisions at all future points in time.
135135As we now show, obtaining these functions is key to solving the model.
136136
137137
138- ### The Bellman Equations
138+ ### The Bellman equations
139139
140140We recall that, in {doc}` the original job search model <mccall_model> ` , the
141141value function (the value of being unemployed with a given wage offer) satisfied
@@ -200,7 +200,7 @@ enough information to solve for both $v_e$ and $v_u$.
200200Once we have them in hand, we will be able to make optimal choices.
201201
202202
203- ### The Reservation Wage
203+ ### The reservation wage
204204
205205
206206Let
@@ -234,7 +234,7 @@ Let's now implement a solution method based on the two Bellman equations
234234{eq}` bell2_mccall ` and {eq}` bell1_mccall ` .
235235
236236
237- ### Set Up
237+ ### Set up
238238
239239The default utility function is a CRRA utility function
240240
@@ -310,8 +310,8 @@ than some small tolerance level.
310310``` {code-cell} ipython3
311311def solve_full_model(
312312 model,
313- tol: float= 1e-6,
314- max_iter: int= 1_000,
313+ tol: float = 1e-6,
314+ max_iter: int = 1_000,
315315 ):
316316 """
317317 Solves for both value functions v_u and v_e iteratively.
@@ -337,7 +337,7 @@ def solve_full_model(
337337
338338
339339
340- ### Computing the Reservation Wage
340+ ### Computing the reservation wage
341341
342342Now that we can solve for both value functions, let's investigate the reservation wage.
343343
@@ -390,7 +390,7 @@ This value seems close to where the two lines meet.
390390
391391
392392(ast_mcm)=
393- ## A Simplifying Transformation
393+ ## A simplifying transformation
394394
395395The approach above works, but iterating over two vector-valued functions is computationally expensive.
396396
@@ -428,7 +428,7 @@ useful.
428428But we can go further, but eliminating $v_e$ from the above equation.
429429
430430
431- ### Simplifying to a Single Equation
431+ ### Simplifying to a single equation
432432
433433As a first step, we rearrange the expression defining $h$ (see {eq}` defh_mm ` ) to obtain
434434
@@ -485,7 +485,7 @@ If we can solve this for $h$, we can easily recover $v_e$ using
485485Then we have enough information to compute the reservation wage.
486486
487487
488- ### Solving the Bellman Equations
488+ ### Solving the Bellman equations
489489
490490To solve {eq}` bell_scalar ` , we use the iteration rule
491491
@@ -595,11 +595,11 @@ However, the simplified method is far more efficient.
595595Next we will investigate how the reservation wage varies with parameters.
596596
597597
598- ## Impact of Parameters
598+ ## Impact of parameters
599599
600600In each instance below, we'll show you a figure and then ask you to reproduce it in the exercises.
601601
602- ### The Reservation Wage and Unemployment Compensation
602+ ### The reservation wage and unemployment compensation
603603
604604First, let's look at how $\bar w$ varies with unemployment compensation.
605605
@@ -615,7 +615,7 @@ As expected, higher unemployment compensation causes the worker to hold out for
615615
616616In effect, the cost of continuing job search is reduced.
617617
618- ### The Reservation Wage and Discounting
618+ ### The reservation wage and discounting
619619
620620Next, let's investigate how $\bar w$ varies with the discount factor.
621621
@@ -629,7 +629,7 @@ $\beta$
629629
630630Again, the results are intuitive: More patient workers will hold out for higher wages.
631631
632- ### The Reservation Wage and Job Destruction
632+ ### The reservation wage and job destruction
633633
634634Finally, let's look at how $\bar w$ varies with the job separation rate $\alpha$.
635635
@@ -682,7 +682,7 @@ w_bar_vals = jax.vmap(compute_res_wage_given_c)(c_vals)
682682
683683fig, ax = plt.subplots()
684684ax.set(xlabel='unemployment compensation', ylabel='reservation wage')
685- ax.plot(c_vals, w_bar_vals, label=r'$\bar w$ as a function of $c$')
685+ ax.plot(c_vals, w_bar_vals, lw=2, label=r'$\bar w$ as a function of $c$')
686686ax.legend()
687687glue("mccall_resw_c", fig, display=False)
688688plt.show()
@@ -700,7 +700,7 @@ w_bar_vals = jax.vmap(compute_res_wage_given_beta)(β_vals)
700700
701701fig, ax = plt.subplots()
702702ax.set(xlabel='discount factor', ylabel='reservation wage')
703- ax.plot(β_vals, w_bar_vals, label=r'$\bar w$ as a function of $\beta$')
703+ ax.plot(β_vals, w_bar_vals, lw=2, label=r'$\bar w$ as a function of $\beta$')
704704ax.legend()
705705glue("mccall_resw_beta", fig, display=False)
706706plt.show()
@@ -718,7 +718,7 @@ w_bar_vals = jax.vmap(compute_res_wage_given_alpha)(α_vals)
718718
719719fig, ax = plt.subplots()
720720ax.set(xlabel='separation rate', ylabel='reservation wage')
721- ax.plot(α_vals, w_bar_vals, label=r'$\bar w$ as a function of $\alpha$')
721+ ax.plot(α_vals, w_bar_vals, lw=2, label=r'$\bar w$ as a function of $\alpha$')
722722ax.legend()
723723glue("mccall_resw_alpha", fig, display=False)
724724plt.show()
0 commit comments