{
"cells": [
{
"cell_type": "markdown",
"id": "37b1a6b3",
"metadata": {},
"source": [
"# A Lake Model of Employment"
]
},
{
"cell_type": "markdown",
"id": "a8439145",
"metadata": {},
"source": [
"## Outline\n",
"\n",
"In addition to what’s in Anaconda, this lecture will need the following libraries:"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "e1995251",
"metadata": {
"hide-output": false
},
"outputs": [],
"source": [
"import numpy as np\n",
"import matplotlib.pyplot as plt"
]
},
{
"cell_type": "markdown",
"id": "e2c5cccc",
"metadata": {},
"source": [
"## The Lake model\n",
"\n",
"This model is sometimes called the **lake model** because there are two pools of workers:\n",
"\n",
"1. those who are currently employed. \n",
"1. those who are currently unemployed but are seeking employment. \n",
"\n",
"\n",
"The “flows” between the two lakes are as follows:\n",
"\n",
"1. workers exit the labor market at rate $ d $. \n",
"1. new workers enter the labor market at rate $ b $. \n",
"1. employed workers separate from their jobs at rate $ \\alpha $. \n",
"1. unemployed workers find jobs at rate $ \\lambda $. \n",
"\n",
"\n",
"The below graph illustrates the lake model.\n",
"\n",
"![https://intro.quantecon.org/_static/lecture_specific/lake_model/lake_model_worker.png](https://intro.quantecon.org/_static/lecture_specific/lake_model/lake_model_worker.png)\n",
"\n",
"An illustration of the lake model "
]
},
{
"cell_type": "markdown",
"id": "819ce6c4",
"metadata": {},
"source": [
"## Dynamics\n",
"\n",
"Let $ e_t $ and $ u_t $ be the number of employed and unemployed workers at time $ t $ respectively.\n",
"\n",
"The total population of workers is $ n_t = e_t + u_t $.\n",
"\n",
"The number of unemployed and employed workers thus evolves according to:\n",
"\n",
"\n",
"\n",
"$$\n",
"\\begin{aligned}\n",
" u_{t+1} &= (1-d)(1-\\lambda)u_t + \\alpha(1-d)e_t + bn_t \\\\\n",
" &= ((1-d)(1-\\lambda) + b)u_t + (\\alpha(1-d) + b)e_t \\\\\n",
" e_{t+1} &= (1-d)\\lambda u_t + (1 - \\alpha)(1-d)e_t\n",
"\\end{aligned} \\tag{40.1}\n",
"$$\n",
"\n",
"We can arrange [(40.1)](#equation-lake-model) as a linear system of equations in matrix form $ x_{t+1} = Ax_t $ where\n",
"\n",
"$$\n",
"x_{t+1} =\n",
"\\begin{bmatrix}\n",
" u_{t+1} \\\\\n",
" e_{t+1}\n",
"\\end{bmatrix}\n",
"\\quad\n",
"A =\n",
"\\begin{bmatrix}\n",
" (1-d)(1-\\lambda) + b & \\alpha(1-d) + b \\\\\n",
" (1-d)\\lambda & (1 - \\alpha)(1-d)\n",
"\\end{bmatrix}\n",
"\\quad \\text{and} \\quad\n",
"x_t =\n",
"\\begin{bmatrix}\n",
" u_t \\\\\n",
" e_t\n",
"\\end{bmatrix}.\n",
"$$\n",
"\n",
"Suppose at $ t=0 $ we have $ x_0 = \\begin{bmatrix} u_0 & e_0 \\end{bmatrix}^\\top $.\n",
"\n",
"Then, $ x_1=Ax_0 $, $ x_2=Ax_1=A^2x_0 $ and thus $ x_t = A^tx_0 $.\n",
"\n",
"Thus the long-run outcomes of this system may depend on the initial condition $ x_0 $ and the matrix $ A $.\n",
"\n",
"We are interested in how $ u_t $ and $ e_t $ evolve over time.\n",
"\n",
"What long-run unemployment rate and employment rate should we expect?\n",
"\n",
"Do long-run outcomes depend on the initial values $ (u_0, e_o) $?"
]
},
{
"cell_type": "markdown",
"id": "7175e0e7",
"metadata": {},
"source": [
"### Visualising the long-run outcomes\n",
"\n",
"Let us first plot the time series of unemployment $ u_t $, employment $ e_t $, and labor force $ n_t $."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "29da96d5",
"metadata": {
"hide-output": false
},
"outputs": [],
"source": [
"class LakeModel:\n",
" \"\"\"\n",
" Solves the lake model and computes dynamics of the unemployment stocks and\n",
" rates.\n",
"\n",
" Parameters:\n",
" ------------\n",
" λ : scalar\n",
" The job finding rate for currently unemployed workers\n",
" α : scalar\n",
" The dismissal rate for currently employed workers\n",
" b : scalar\n",
" Entry rate into the labor force\n",
" d : scalar\n",
" Exit rate from the labor force\n",
"\n",
" \"\"\"\n",
" def __init__(self, λ=0.1, α=0.013, b=0.0124, d=0.00822):\n",
" self.λ, self.α, self.b, self.d = λ, α, b, d\n",
"\n",
" λ, α, b, d = self.λ, self.α, self.b, self.d\n",
" self.g = b - d\n",
" g = self.g\n",
"\n",
" self.A = np.array([[(1-d)*(1-λ) + b, α*(1-d) + b],\n",
" [ (1-d)*λ, (1-α)*(1-d)]])\n",
"\n",
"\n",
" self.ū = (1 + g - (1 - d) * (1 - α)) / (1 + g - (1 - d) * (1 - α) + (1 - d) * λ)\n",
" self.ē = 1 - self.ū\n",
"\n",
"\n",
" def simulate_path(self, x0, T=1000):\n",
" \"\"\"\n",
" Simulates the sequence of employment and unemployment\n",
"\n",
" Parameters\n",
" ----------\n",
" x0 : array\n",
" Contains initial values (u0,e0)\n",
" T : int\n",
" Number of periods to simulate\n",
"\n",
" Returns\n",
" ----------\n",
" x : iterator\n",
" Contains sequence of employment and unemployment rates\n",
"\n",
" \"\"\"\n",
" x0 = np.atleast_1d(x0) # Recast as array just in case\n",
" x_ts= np.zeros((2, T))\n",
" x_ts[:, 0] = x0\n",
" for t in range(1, T):\n",
" x_ts[:, t] = self.A @ x_ts[:, t-1]\n",
" return x_ts"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "498f90e9",
"metadata": {
"hide-output": false
},
"outputs": [],
"source": [
"lm = LakeModel()\n",
"e_0 = 0.92 # Initial employment\n",
"u_0 = 1 - e_0 # Initial unemployment, given initial n_0 = 1\n",
"\n",
"lm = LakeModel()\n",
"T = 100 # Simulation length\n",
"\n",
"x_0 = (u_0, e_0)\n",
"x_path = lm.simulate_path(x_0, T)\n",
"\n",
"fig, axes = plt.subplots(3, 1, figsize=(10, 8))\n",
"\n",
"\n",
"axes[0].plot(x_path[0, :], lw=2)\n",
"axes[0].set_title('Unemployment')\n",
"\n",
"axes[1].plot(x_path[1, :], lw=2)\n",
"axes[1].set_title('Employment')\n",
"\n",
"axes[2].plot(x_path.sum(0), lw=2)\n",
"axes[2].set_title('Labor force')\n",
"\n",
"for ax in axes:\n",
" ax.grid()\n",
"\n",
"plt.tight_layout()\n",
"plt.show()"
]
},
{
"cell_type": "markdown",
"id": "610bcdd0",
"metadata": {},
"source": [
"Not surprisingly, we observe that labor force $ n_t $ increases at a constant rate.\n",
"\n",
"This coincides with the fact there is only one inflow source (new entrants pool) to unemployment and employment pools.\n",
"\n",
"The inflow and outflow of labor market system\n",
"is determined by constant exit rate and entry rate of labor market in the long run.\n",
"\n",
"In detail, let $ \\mathbb{1}=[1, 1]^\\top $ be a vector of ones.\n",
"\n",
"Observe that\n",
"\n",
"$$\n",
"\\begin{aligned}\n",
" n_{t+1} &= u_{t+1} + e_{t+1} \\\\\n",
" &= \\mathbb{1}^\\top x_{t+1} \\\\\n",
" &= \\mathbb{1}^\\top A x_t \\\\\n",
" &= (1 + b - d) (u_t + e_t) \\\\\n",
" &= (1 + b - d) n_t.\n",
" \\end{aligned}\n",
"$$\n",
"\n",
"Hence, the growth rate of $ n_t $ is fixed at $ 1 + b - d $.\n",
"\n",
"Moreover, the times series of unemployment and employment seems to grow at some stable rates in the long run."
]
},
{
"cell_type": "markdown",
"id": "34360984",
"metadata": {},
"source": [
"### The application of Perron-Frobenius theorem\n",
"\n",
"Since by intuition if we consider unemployment pool and employment pool as a closed system, the growth should be similar to the labor force.\n",
"\n",
"We next ask whether the long run growth rates of $ e_t $ and $ u_t $\n",
"also dominated by $ 1+b-d $ as labor force.\n",
"\n",
"The answer will be clearer if we appeal to [Perron-Frobenius theorem](https://intro.quantecon.org/eigen_II.html#perron-frobe).\n",
"\n",
"The importance of the Perron-Frobenius theorem stems from the fact that\n",
"firstly in the real world most matrices we encounter are nonnegative matrices.\n",
"\n",
"Secondly, many important models are simply linear iterative models that\n",
"begin with an initial condition $ x_0 $ and then evolve recursively by the rule\n",
"$ x_{t+1} = Ax_t $ or in short $ x_t = A^tx_0 $.\n",
"\n",
"This theorem helps characterise the dominant eigenvalue $ r(A) $ which\n",
"determines the behavior of this iterative process."
]
},
{
"cell_type": "markdown",
"id": "18cde010",
"metadata": {},
"source": [
"#### Dominant eigenvector\n",
"\n",
"We now illustrate the power of the Perron-Frobenius theorem by showing how it\n",
"helps us to analyze the lake model.\n",
"\n",
"Since $ A $ is a nonnegative and irreducible matrix, the Perron-Frobenius theorem implies that:\n",
"\n",
"- the spectral radius $ r(A) $ is an eigenvalue of $ A $, where \n",
"\n",
"\n",
"$$\n",
"r(A) := \\max\\{|\\lambda|: \\lambda \\text{ is an eigenvalue of } A \\}\n",
"$$\n",
"\n",
"- any other eigenvalue $ \\lambda $ in absolute value is strictly smaller than $ r(A) $: $ |\\lambda|< r(A) $, \n",
"- there exist unique and everywhere positive right eigenvector $ \\phi $ (column vector) and left eigenvector $ \\psi $ (row vector): \n",
"\n",
"\n",
"$$\n",
"A \\phi = r(A) \\phi, \\quad \\psi A = r(A) \\psi\n",
"$$\n",
"\n",
"- if further $ A $ is positive, then with $ <\\psi, \\phi> = \\psi \\phi=1 $ we have \n",
"\n",
"\n",
"$$\n",
"r(A)^{-t} A^t \\to \\phi \\psi\n",
"$$\n",
"\n",
"The last statement implies that the magnitude of $ A^t $ is identical to the magnitude of $ r(A)^t $ in the long run, where $ r(A) $ can be considered as the dominant eigenvalue in this lecture.\n",
"\n",
"Therefore, the magnitude $ x_t = A^t x_0 $ is also dominated by $ r(A)^t $ in the long run.\n",
"\n",
"Recall that the spectral radius is bounded by column sums: for $ A \\geq 0 $, we have\n",
"\n",
"\n",
"\n",
"$$\n",
"\\min_j \\text{colsum}_j (A) \\leq r(A) \\leq \\max_j \\text{colsum}_j (A) \\tag{40.2}\n",
"$$\n",
"\n",
"Note that $ \\text{colsum}_j(A) = 1 + b - d $ for $ j=1,2 $ and by [(40.2)](#equation-pf-bounds) we can thus conclude that the dominant eigenvalue\n",
"is $ r(A) = 1 + b - d $.\n",
"\n",
"Denote $ g = b - d $ as the overall growth rate of the total labor force, so that $ r(A) = 1 + g $.\n",
"\n",
"The Perron-Frobenius implies that there is a unique positive eigenvector $ \\bar{x} = \\begin{bmatrix} \\bar{u} \\\\ \\bar{e} \\end{bmatrix} $\n",
"such that $ A\\bar{x} = r(A)\\bar{x} $ and $ \\begin{bmatrix} 1 & 1 \\end{bmatrix} \\bar{x} = 1 $:\n",
"\n",
"\n",
"\n",
"$$\n",
"\\begin{aligned}\n",
" \\bar{u} & = \\frac{b + \\alpha (1-d)}{b + (\\alpha+\\lambda)(1-d)} \\\\\n",
" \\bar{e} & = \\frac{\\lambda(1-d)}{b + (\\alpha+\\lambda)(1-d)}\n",
"\\end{aligned} \\tag{40.3}\n",
"$$\n",
"\n",
"Since $ \\bar{x} $ is the eigenvector corresponding to the dominant eigenvalue $ r(A) $, we call $ \\bar{x} $ the dominant eigenvector.\n",
"\n",
"This dominant eigenvector plays an important role in determining long-run outcomes as illustrated below."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "2ecba554",
"metadata": {
"hide-output": false
},
"outputs": [],
"source": [
"def plot_time_paths(lm, x0=None, T=1000, ax=None):\n",
" \"\"\"\n",
" Plots the simulated time series.\n",
"\n",
" Parameters\n",
" ----------\n",
" lm : class\n",
" Lake Model\n",
" x0 : array\n",
" Contains some different initial values.\n",
" T : int\n",
" Number of periods to simulate\n",
"\n",
" \"\"\"\n",
"\n",
"\n",
" if x0 is None:\n",
" x0 = np.array([[5.0, 0.1]])\n",
"\n",
" ū, ē = lm.ū, lm.ē\n",
"\n",
" x0 = np.atleast_2d(x0)\n",
"\n",
" if ax is None:\n",
" fig, ax = plt.subplots(figsize=(10, 8))\n",
" # Plot line D\n",
" s = 10\n",
" ax.plot([0, s * ū], [0, s * ē], \"k--\", lw=1, label='set $D$')\n",
"\n",
" # Set the axes through the origin\n",
" for spine in [\"left\", \"bottom\"]:\n",
" ax.spines[spine].set_position(\"zero\")\n",
" for spine in [\"right\", \"top\"]:\n",
" ax.spines[spine].set_color(\"none\")\n",
"\n",
" ax.set_xlim(-2, 6)\n",
" ax.set_ylim(-2, 6)\n",
" ax.set_xlabel(\"unemployed workforce\")\n",
" ax.set_ylabel(\"employed workforce\")\n",
" ax.set_xticks((0, 6))\n",
" ax.set_yticks((0, 6))\n",
"\n",
"\n",
"\n",
"\n",
" # Plot time series\n",
" for x in x0:\n",
" x_ts = lm.simulate_path(x0=x)\n",
"\n",
" ax.scatter(x_ts[0, :], x_ts[1, :], s=4,)\n",
"\n",
" u0, e0 = x\n",
" ax.plot([u0], [e0], \"ko\", ms=2, alpha=0.6)\n",
" ax.annotate(f'$x_0 = ({u0},{e0})$',\n",
" xy=(u0, e0),\n",
" xycoords=\"data\",\n",
" xytext=(0, 20),\n",
" textcoords=\"offset points\",\n",
" arrowprops=dict(arrowstyle = \"->\"))\n",
"\n",
" ax.plot([ū], [ē], \"ko\", ms=4, alpha=0.6)\n",
" ax.annotate(r'$\\bar{x}$',\n",
" xy=(ū, ē),\n",
" xycoords=\"data\",\n",
" xytext=(20, -20),\n",
" textcoords=\"offset points\",\n",
" arrowprops=dict(arrowstyle = \"->\"))\n",
"\n",
" if ax is None:\n",
" plt.show()"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "1dfd34c2",
"metadata": {
"hide-output": false
},
"outputs": [],
"source": [
"lm = LakeModel(α=0.01, λ=0.1, d=0.02, b=0.025)\n",
"x0 = ((5.0, 0.1), (0.1, 4.0), (2.0, 1.0))\n",
"plot_time_paths(lm, x0=x0)"
]
},
{
"cell_type": "markdown",
"id": "261dd32b",
"metadata": {},
"source": [
"Since $ \\bar{x} $ is an eigenvector corresponding to the eigenvalue $ r(A) $, all the vectors in the set\n",
"$ D := \\{ x \\in \\mathbb{R}^2 : x = \\alpha \\bar{x} \\; \\text{for some} \\; \\alpha >0 \\} $ are also eigenvectors corresponding\n",
"to $ r(A) $.\n",
"\n",
"This set $ D $ is represented by a dashed line in the above figure.\n",
"\n",
"The graph illustrates that for two distinct initial conditions $ x_0 $ the sequences of iterates $ (A^t x_0)_{t \\geq 0} $ move towards $ D $ over time.\n",
"\n",
"This suggests that all such sequences share strong similarities in the long run, determined by the dominant eigenvector $ \\bar{x} $."
]
},
{
"cell_type": "markdown",
"id": "4020a937",
"metadata": {},
"source": [
"#### Negative growth rate\n",
"\n",
"In the example illustrated above we considered parameters such that overall growth rate of the labor force $ g>0 $.\n",
"\n",
"Suppose now we are faced with a situation where the $ g<0 $, i.e., negative growth in the labor force.\n",
"\n",
"This means that $ b-d<0 $, i.e., workers exit the market faster than they enter.\n",
"\n",
"What would the behavior of the iterative sequence $ x_{t+1} = Ax_t $ be now?\n",
"\n",
"This is visualised below."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "521353ad",
"metadata": {
"hide-output": false
},
"outputs": [],
"source": [
"lm = LakeModel(α=0.01, λ=0.1, d=0.025, b=0.02)\n",
"plot_time_paths(lm, x0=x0)"
]
},
{
"cell_type": "markdown",
"id": "b380d15f",
"metadata": {},
"source": [
"Thus, while the sequence of iterates still moves towards the dominant eigenvector $ \\bar{x} $, in this case\n",
"they converge to the origin.\n",
"\n",
"This is a result of the fact that $ r(A)<1 $, which ensures that the iterative sequence $ (A^t x_0)_{t \\geq 0} $ will converge\n",
"to some point, in this case to $ (0,0) $.\n",
"\n",
"This leads us to the next result."
]
},
{
"cell_type": "markdown",
"id": "1e009c35",
"metadata": {},
"source": [
"### Properties\n",
"\n",
"Since the column sums of $ A $ are $ r(A)=1 $, the left eigenvector is $ \\mathbb{1}^\\top=[1, 1] $.\n",
"\n",
"Perron-Frobenius theory implies that\n",
"\n",
"$$\n",
"r(A)^{-t} A^{t} \\approx \\bar{x} \\mathbb{1}^\\top = \\begin{bmatrix} \\bar{u} & \\bar{u} \\\\ \\bar{e} & \\bar{e} \\end{bmatrix}.\n",
"$$\n",
"\n",
"As a result, for any $ x_0 = (u_0, e_0)^\\top $, we have\n",
"\n",
"$$\n",
"\\begin{aligned}\n",
"x_t = A^t x_0 &\\approx r(A)^t \\begin{bmatrix} \\bar{u} & \\bar{u} \\\\ \\bar{e} & \\bar{e} \\end{bmatrix} \\begin{bmatrix}u_0 \\\\ e_0 \\end{bmatrix} \\\\\n",
"&= (1+g)^t(u_0 + e_0) \\begin{bmatrix}\\bar{u} \\\\ \\bar{e} \\end{bmatrix} \\\\\n",
"&= (1 + g)^t n_0 \\bar{x} \\\\\n",
"&= n_t \\bar{x}.\n",
"\\end{aligned}\n",
"$$\n",
"\n",
"as $ t $ is large enough.\n",
"\n",
"We see that the growth of $ u_t $ and $ e_t $ also dominated by $ r(A) = 1+g $ in the long run: $ x_t $ grows along $ D $ as $ r(A) > 1 $ and converges to $ (0, 0) $ as $ r(A) < 1 $.\n",
"\n",
"Moreover, the long-run unemployment and employment are steady fractions of $ n_t $.\n",
"\n",
"The latter implies that $ \\bar{u} $ and $ \\bar{e} $ are long-run unemployment rate and employment rate, respectively.\n",
"\n",
"In detail, we have the unemployment rates and employment rates: $ x_t / n_t = A^t n_0 / n_t \\to \\bar{x} $ as $ t \\to \\infty $.\n",
"\n",
"To illustrate the dynamics of the rates, let $ \\hat{A} := A / (1+g) $ be the transition matrix of $ r_t := x_t/ n_t $.\n",
"\n",
"The dynamics of the rates follow\n",
"\n",
"$$\n",
"r_{t+1} = \\frac{x_{t+1}}{n_{t+1}} = \\frac{x_{t+1}}{(1+g) n_{t}} = \\frac{A x_t}{(1+g)n_t} = \\hat{A} \\frac{x_t}{n_t}\n",
"=\\hat{A} r_t.\n",
"$$\n",
"\n",
"Observe that the column sums of $ \\hat{A} $ are all one so that $ r(\\hat{A})=1 $.\n",
"\n",
"One can check that $ \\bar{x} $ is also the right eigenvector of $ \\hat{A} $ corresponding to $ r(\\hat{A}) $ that $ \\bar{x} = \\hat{A} \\bar{x} $.\n",
"\n",
"Moreover, $ \\hat{A}^t r_0 \\to \\bar{x} $ as $ t \\to \\infty $ for any $ r_0 = x_0 / n_0 $, since the above discussion implies\n",
"\n",
"$$\n",
"r_t = \\hat{A}^t r_0 = (1+g)^{-t} A^t r_0 = r(A)^{-t} A^t r_0 \\to \\begin{bmatrix} \\bar{u} & \\bar{u} \\\\ \\bar{e} & \\bar{e} \\end{bmatrix} r_0 = \\begin{bmatrix} \\bar{u} \\\\ \\bar{e} \\end{bmatrix}.\n",
"$$\n",
"\n",
"This is illustrated below."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "0eb1913d",
"metadata": {
"hide-output": false
},
"outputs": [],
"source": [
"lm = LakeModel()\n",
"e_0 = 0.92 # Initial employment\n",
"u_0 = 1 - e_0 # Initial unemployment, given initial n_0 = 1\n",
"\n",
"lm = LakeModel()\n",
"T = 100 # Simulation length\n",
"\n",
"x_0 = (u_0, e_0)\n",
"\n",
"x_path = lm.simulate_path(x_0, T)\n",
"\n",
"rate_path = x_path / x_path.sum(0)\n",
"\n",
"fig, axes = plt.subplots(2, 1, figsize=(10, 8))\n",
"\n",
"# Plot steady ū and ē\n",
"axes[0].hlines(lm.ū, 0, T, 'r', '--', lw=2, label='ū')\n",
"axes[1].hlines(lm.ē, 0, T, 'r', '--', lw=2, label='ē')\n",
"\n",
"titles = ['Unemployment rate', 'Employment rate']\n",
"locations = ['lower right', 'upper right']\n",
"\n",
"# Plot unemployment rate and employment rate\n",
"for i, ax in enumerate(axes):\n",
" ax.plot(rate_path[i, :], lw=2, alpha=0.6)\n",
" ax.set_title(titles[i])\n",
" ax.grid()\n",
" ax.legend(loc=locations[i])\n",
"\n",
"\n",
"plt.tight_layout()\n",
"plt.show()"
]
},
{
"cell_type": "markdown",
"id": "e73db17e",
"metadata": {},
"source": [
"To provide more intuition for convergence, we further explain the convergence below without the Perron-Frobenius theorem.\n",
"\n",
"Suppose that $ \\hat{A} = P D P^{-1} $ is diagonalizable, where $ P = [v_1, v_2] $ consists of eigenvectors $ v_1 $ and $ v_2 $ of $ \\hat{A} $\n",
"corresponding to eigenvalues $ \\gamma_1 $ and $ \\gamma_2 $ respectively,\n",
"and $ D = \\text{diag}(\\gamma_1, \\gamma_2) $.\n",
"\n",
"Let $ \\gamma_1 = r(\\hat{A})=1 $ and $ |\\gamma_2| < \\gamma_1 $, so that the spectral radius is a dominant eigenvalue.\n",
"\n",
"The dynamics of the rates follow $ r_{t+1} = \\hat{A} r_t $, where $ r_0 $ is a probability vector: $ \\sum_j r_{0,j}=1 $.\n",
"\n",
"Consider $ z_t = P^{-1} r_t $.\n",
"\n",
"Then, we have $ z_{t+1} = P^{-1} r_{t+1} = P^{-1} \\hat{A} r_t = P^{-1} \\hat{A} P z_t = D z_t $.\n",
"\n",
"Hence, we obtain $ z_t = D^t z_0 $, and for some $ z_0 = (c_1, c_2)^\\top $ we have\n",
"\n",
"$$\n",
"r_t = P z_t = \\begin{bmatrix} v_1 & v_2 \\end{bmatrix} \\begin{bmatrix} \\gamma_1^t & 0 \\\\ 0 & \\gamma_2^t \\end{bmatrix}\n",
"\\begin{bmatrix} c_1 \\\\ c_2 \\end{bmatrix} = c_1 \\gamma_1^t v_1 + c_2 \\gamma_2^t v_2.\n",
"$$\n",
"\n",
"Since $ |\\gamma_2| < |\\gamma_1|=1 $, the second term in the right hand side converges to zero.\n",
"\n",
"Therefore, the convergence follows $ r_t \\to c_1 v_1 $.\n",
"\n",
"Since the column sums of $ \\hat{A} $ are one and $ r_0 $ is a probability vector, $ r_t $ must be a probability vector.\n",
"\n",
"In this case, $ c_1 v_1 $ must be a normalized eigenvector, so $ c_1 v_1 = \\bar{x} $ and then $ r_t \\to \\bar{x} $."
]
},
{
"cell_type": "markdown",
"id": "4a2b4bd0",
"metadata": {},
"source": [
"## Exercise"
]
},
{
"cell_type": "markdown",
"id": "0331b40d",
"metadata": {},
"source": [
"## (Evolution of unemployment and employment rate)Exercise 40.1\n",
"\n",
"How do the long-run unemployment rate and employment rate evolve if there is an increase in the separation rate $ \\alpha $\n",
"or a decrease in job finding rate $ \\lambda $?\n",
"\n",
"Is the result compatible with your intuition?\n",
"\n",
"Plot the graph to illustrate how the line $ D := \\{ x \\in \\mathbb{R}^2 : x = \\alpha \\bar{x} \\; \\text{for some} \\; \\alpha >0 \\} $\n",
"shifts in the unemployment-employment space."
]
},
{
"cell_type": "markdown",
"id": "35ea1937",
"metadata": {},
"source": [
"## Solution to[ Exercise 40.1 (Evolution of unemployment and employment rate)](https://intro.quantecon.org/#lake_model_ex1)\n",
"\n",
"Eq. [(40.3)](#equation-steady-x) implies that the long-run unemployment rate will increase, and the employment rate will decrease\n",
"if $ \\alpha $ increases or $ \\lambda $ decreases.\n",
"\n",
"Suppose first that $ \\alpha=0.01, \\lambda=0.1, d=0.02, b=0.025 $.\n",
"Assume that $ \\alpha $ increases to $ 0.04 $.\n",
"\n",
"The below graph illustrates that the line $ D $ shifts clockwise downward, which indicates that\n",
"the fraction of unemployment rises as the separation rate increases."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "fa30107d",
"metadata": {
"hide-output": false
},
"outputs": [],
"source": [
"fig, ax = plt.subplots(figsize=(10, 8))\n",
"\n",
"lm = LakeModel(α=0.01, λ=0.1, d=0.02, b=0.025)\n",
"plot_time_paths(lm, ax=ax)\n",
"s=10\n",
"ax.plot([0, s * lm.ū], [0, s * lm.ē], \"k--\", lw=1, label='set $D$, α=0.01')\n",
"\n",
"lm = LakeModel(α=0.04, λ=0.1, d=0.02, b=0.025)\n",
"plot_time_paths(lm, ax=ax)\n",
"ax.plot([0, s * lm.ū], [0, s * lm.ē], \"r--\", lw=1, label='set $D$, α=0.04')\n",
"\n",
"ax.legend(loc='best')\n",
"plt.show()"
]
}
],
"metadata": {
"date": 1720431610.1392643,
"filename": "lake_model.md",
"kernelspec": {
"display_name": "Python",
"language": "python3",
"name": "python3"
},
"title": "A Lake Model of Employment"
},
"nbformat": 4,
"nbformat_minor": 5
}