diff --git a/lectures/mccall_model_with_separation.md b/lectures/mccall_model_with_separation.md index 245aa8202..93e8fe612 100644 --- a/lectures/mccall_model_with_separation.md +++ b/lectures/mccall_model_with_separation.md @@ -34,7 +34,7 @@ In addition to what's in Anaconda, this lecture will need the following librarie ```{code-cell} ipython3 :tags: [hide-output] -!pip install quantecon +!pip install quantecon jax myst-nb ``` ## Overview @@ -65,7 +65,7 @@ from quantecon.distributions import BetaBinomial from myst_nb import glue ``` -## The Model +## The model The model is similar to the {doc}`baseline McCall job search model `. @@ -94,7 +94,7 @@ Wage offers $\{ W_t \}$ are IID with common distribution $q$. The set of possible wage values is denoted by $\mathbb W$. -### Timing and Decisions +### Timing and decisions At the start of each period, the agent can be either @@ -118,7 +118,7 @@ The process then repeats. We do not allow for job search while employed---this topic is taken up in a {doc}`later lecture `. ``` -## Solving the Model +## Solving the model We drop time subscripts in what follows and primes denote next period values. @@ -135,7 +135,7 @@ the worker makes optimal decisions at all future points in time. As we now show, obtaining these functions is key to solving the model. -### The Bellman Equations +### The Bellman equations We recall that, in {doc}`the original job search model `, the value 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$. Once we have them in hand, we will be able to make optimal choices. -### The Reservation Wage +### The reservation wage Let @@ -234,7 +234,7 @@ Let's now implement a solution method based on the two Bellman equations {eq}`bell2_mccall` and {eq}`bell1_mccall`. -### Set Up +### Set up The default utility function is a CRRA utility function @@ -310,8 +310,8 @@ than some small tolerance level. ```{code-cell} ipython3 def solve_full_model( model, - tol: float=1e-6, - max_iter: int=1_000, + tol: float = 1e-6, + max_iter: int = 1_000, ): """ Solves for both value functions v_u and v_e iteratively. @@ -337,7 +337,7 @@ def solve_full_model( -### Computing the Reservation Wage +### Computing the reservation wage Now that we can solve for both value functions, let's investigate the reservation wage. @@ -390,7 +390,7 @@ This value seems close to where the two lines meet. (ast_mcm)= -## A Simplifying Transformation +## A simplifying transformation The approach above works, but iterating over two vector-valued functions is computationally expensive. @@ -428,7 +428,7 @@ useful. But we can go further, but eliminating $v_e$ from the above equation. -### Simplifying to a Single Equation +### Simplifying to a single equation As a first step, we rearrange the expression defining $h$ (see {eq}`defh_mm`) to obtain @@ -485,7 +485,7 @@ If we can solve this for $h$, we can easily recover $v_e$ using Then we have enough information to compute the reservation wage. -### Solving the Bellman Equations +### Solving the Bellman equations To solve {eq}`bell_scalar`, we use the iteration rule @@ -595,11 +595,11 @@ However, the simplified method is far more efficient. Next we will investigate how the reservation wage varies with parameters. -## Impact of Parameters +## Impact of parameters In each instance below, we'll show you a figure and then ask you to reproduce it in the exercises. -### The Reservation Wage and Unemployment Compensation +### The reservation wage and unemployment compensation First, let's look at how $\bar w$ varies with unemployment compensation. @@ -615,7 +615,7 @@ As expected, higher unemployment compensation causes the worker to hold out for In effect, the cost of continuing job search is reduced. -### The Reservation Wage and Discounting +### The reservation wage and discounting Next, let's investigate how $\bar w$ varies with the discount factor. @@ -629,7 +629,7 @@ $\beta$ Again, the results are intuitive: More patient workers will hold out for higher wages. -### The Reservation Wage and Job Destruction +### The reservation wage and job destruction Finally, let's look at how $\bar w$ varies with the job separation rate $\alpha$. @@ -682,7 +682,7 @@ w_bar_vals = jax.vmap(compute_res_wage_given_c)(c_vals) fig, ax = plt.subplots() ax.set(xlabel='unemployment compensation', ylabel='reservation wage') -ax.plot(c_vals, w_bar_vals, label=r'$\bar w$ as a function of $c$') +ax.plot(c_vals, w_bar_vals, lw=2, label=r'$\bar w$ as a function of $c$') ax.legend() glue("mccall_resw_c", fig, display=False) plt.show() @@ -700,7 +700,7 @@ w_bar_vals = jax.vmap(compute_res_wage_given_beta)(β_vals) fig, ax = plt.subplots() ax.set(xlabel='discount factor', ylabel='reservation wage') -ax.plot(β_vals, w_bar_vals, label=r'$\bar w$ as a function of $\beta$') +ax.plot(β_vals, w_bar_vals, lw=2, label=r'$\bar w$ as a function of $\beta$') ax.legend() glue("mccall_resw_beta", fig, display=False) plt.show() @@ -718,7 +718,7 @@ w_bar_vals = jax.vmap(compute_res_wage_given_alpha)(α_vals) fig, ax = plt.subplots() ax.set(xlabel='separation rate', ylabel='reservation wage') -ax.plot(α_vals, w_bar_vals, label=r'$\bar w$ as a function of $\alpha$') +ax.plot(α_vals, w_bar_vals, lw=2, label=r'$\bar w$ as a function of $\alpha$') ax.legend() glue("mccall_resw_alpha", fig, display=False) plt.show()