21. Permanent Income Model using the DLE Class#
This lecture is part of a suite of lectures that use the quantecon DLE class to instantiate models within the [Hansen and Sargent, 2013] class of models described in detail in Recursive Models of Dynamic Linear Economies.
In addition to what’s included in Anaconda, this lecture uses the quantecon library.
!pip install --upgrade quantecon
This lecture adds a third solution method for the
linear-quadratic-Gaussian permanent income model with
The additional solution method uses the DLE class.
In this way, we map the permanent income model into the framework of Hansen & Sargent (2013) “Recursive Models of Dynamic Linear Economies” [Hansen and Sargent, 2013].
We’ll also require the following imports
import numpy as np
import matplotlib.pyplot as plt
from quantecon import DLE
np.set_printoptions(suppress=True, precision=4)
21.1. The Permanent Income Model#
The LQ permanent income model is an example of a savings problem.
A consumer has preferences over consumption streams that are ordered by the utility functional
where
The LQ model gets its name partly from assuming that the utility
function
where
The consumer maximizes the utility functional (21.1) by choosing a
consumption, borrowing plan
where
We shall assume that
Equation (21.2) is linear.
We use another set of linear equations to model the endowment process.
In particular, we assume that the endowment process has the state-space representation
where
We impose the following condition on the consumption, borrowing plan:
This condition suffices to rule out Ponzi schemes.
(We impose this condition to rule out a borrow-more-and-more plan that would allow the household to enjoy bliss consumption forever)
The state vector confronting the household at
where
We assume that
21.1.1. Solution with the DLE Class#
One way of solving this model is to map the problem into the framework outlined in Section 4.8 of [Hansen and Sargent, 2013] by setting up our technology, information and preference matrices as follows:
Technology:
Information:
Preferences:
We set parameters
(The value of
The chosen matrices mean that the household’s technology is:
Combining the first two of these gives the budget constraint of the
permanent income model, where
The third equation is a very small penalty on debt-accumulation to rule out Ponzi schemes.
We set up this instance of the DLE class below:
α, β, ρ_1, ρ_2, σ = 10, 0.95, 0.9, 0, 1
γ = np.array([[-1], [0]])
ϕ_c = np.array([[1], [0]])
ϕ_g = np.array([[0], [1]])
ϕ_1 = 1e-5
ϕ_i = np.array([[-1], [-ϕ_1]])
δ_k = np.array([[0]])
θ_k = np.array([[1 / β]])
β = np.array([[β]])
l_λ = np.array([[0]])
π_h = np.array([[1]])
δ_h = np.array([[0]])
θ_h = np.array([[0]])
a22 = np.array([[1, 0, 0],
[α, ρ_1, ρ_2],
[0, 1, 0]])
c2 = np.array([[0], [σ], [0]])
ud = np.array([[0, 1, 0],
[0, 0, 0]])
ub = np.array([[100, 0, 0]])
x0 = np.array([[0], [0], [1], [0], [0]])
info1 = (a22, c2, ub, ud)
tech1 = (ϕ_c, ϕ_g, ϕ_i, γ, δ_k, θ_k)
pref1 = (β, l_λ, π_h, δ_h, θ_h)
econ1 = DLE(info1, tech1, pref1)
To check the solution of this model with that from the LQ problem,
we select the
The solution to the DLE economy has:
econ1.Sc
array([[ 0. , -0.05 , 65.5172, 0.3448, 0. ]])
The state vector in the DLE class is:
where
The state vector in the LQ problem is
Consequently, the relevant elements of econ1.Sc
are the same as in
The plot below quickly replicates the first two figures of that lecture and that notebook to confirm that the solutions are the same
fig, (ax1, ax2) = plt.subplots(1, 2, figsize=(12, 4))
for i in range(25):
econ1.compute_sequence(x0, ts_length=150)
ax1.plot(econ1.c[0], c='g')
ax1.plot(econ1.d[0], c='b')
ax1.plot(econ1.c[0], label='Consumption', c='g')
ax1.plot(econ1.d[0], label='Income', c='b')
ax1.legend()
for i in range(25):
econ1.compute_sequence(x0, ts_length=150)
ax2.plot(econ1.k[0], color='r')
ax2.plot(econ1.k[0], label='Debt', c='r')
ax2.legend()
plt.show()
