Question 2.1: Adding labor supply to the model.

One natural extension to the problem is to add preferences for leisure to characterize labor supply changes.

Denote the labor supply as \(l_t\). For simplicity, let household has 1 unit of labor endowment each period. Leisure can thus be denoted as \(1 - l_t\). Now, consider the following problem:

\[\begin{align*} V(k_0) \equiv \max_{\{c_t, l_t, k_{t+1}\}_{t=0}^\infty} &\sum_{t=0}^\infty \beta^t u(c_t, 1 - l_t) \\ \text{subject to } c_t + k_{t+1} &\leq F(k_t, l_t) + (1 - \delta) k_t, \forall t\\ c_t, k_{t+1} \geq 0,& l_t \in [0,1], \forall t \\ \quad k_0 &\text{ given } \end{align*}\]

Let the utility be denoted as:

Exercise: Find the Euler equation as before. What changed? In addition, use the FOCs from \(c_t\) and \(l_t\) to characterize the intratemporal substitution between consumption and leisure. Make some economic justifications for the results.

The recursive formulation of the problem is:

\[\begin{align*} V(k) = & \max_{c,l, k'} \{u(c, 1 - l) + \beta V(k') \}\\ \text{subject to } & c + k' \leq F(k, l) + (1 - \delta) k\\ & c , k' \geq 0, l \in [0, 1] \end{align*}\]

Again, we can substitute in \(c\) and write the problem as the following,

\[ V(k) = \max_{l, k' \in \Gamma(k)} \{u(F(k, l) + (1 - \delta) k - k', 1 - l) + \beta V(k')\} \] where \(\Gamma(k) \equiv \{k', l | l \in [0,1], k' \in [0, F(k, l) + (1 - \delta) k]\}\)

Solving the problem

Let’s specify some parameter values as before. Again we take use of struct.

Base.@kwdef struct Household_labor # or simply @kwdef
    σ :: Float64 = 2.0
    β :: Float64 = 0.9
    A :: Float64 = 2.0
    α :: Float64 = 0.7
    δ :: Float64 = 0.9
    γ :: Float64 = 0.3 # additional parameter for the utility weight between consumption and leisure
end

h_l = Household() 
Household(2.0, 0.9, 2.0, 0.7, 0.9)

In addition, we need to specify the utility function and the production function. We use a separable CRRA utility for consumption and leisure. Production function is the same.

u2(c,l, m) = γ * c^(1.0 - m.σ)/(1.0 - m.σ) + (1.0 - γ) * (1.0 - l)^(1.0 - m.σ)/(1.0 - m.σ)
F2(k,l, m) = m.A * k^m.α * l^(1.0 - m.α)
F2 (generic function with 1 method)

Let’s build towards solving the model. First, note that the maximum sustainable capital is the same as before. Again, \(F(\tilde{k}, 1) = \delta \tilde{k}\), which is \(A \tilde{k}^\alpha = \delta \tilde{k}\). Since \(\delta > 0\), \(\tilde{k} = (\frac{A}{\delta})^{\frac{1}{1 - \alpha}}\). Intuitively, this is because that if we let consumption be \(0\) and use all labor endowment for production. The maximum sustainable level for capital in the long term will be when \(F(\tilde{k}, 1) = \delta \tilde{k}\).

Everything else basically follows, except that we also need to find optimal labor supply (or leisure). There are two ways to do this. You will write the codes for VFI with the algorithms provided below. Try to write all codes by yourself and check with the basic model without labor supply decisions in the lecture.

The brute force way of solving this starts with constructing an additional grid for labor and search over maximized value with different combinations of \(k'\) and \(l\). Since \(l \in [0,1]\), we can initialize \(l\) with range(0.0, 1.0, 10) (10 grids for simplicity).

The algorithm is very similar to that in the lecture. We need an additional loop over possible values of \(l\). You will also need two policy functions, pol_kprime for storing optimal policy index for \(k'\) and \(pol_l\) for \(l\). For each combination of \(k'\) and \(l\), compute \(c\) and check whether it is non-negative.

Exercise: Write the function for performing VFI for the new model. Write the loop version first. After that, plot the value function and the policy function for \(k'\) and \(l\) given each \(k\).

Think: does the trick with strictly increasing policy function we used in the lecture still apply here? If so how can we implement it?

Exercise: Vectorize your code as in the lecture. (partially first and try full vectorization if you are confident) Check with the result from the loop version.