# 9. Consumption Smoothing#

## 9.1. Overview#

Technically, this lecture is a sequel to this quantecon lecture present values, although it might not seem so at first.

It will take a while for a “present value” or asset price explicilty to appear in this lecture, but when it does it will be a key actor.

In this lecture, we’ll study a famous model of the “consumption function” that Milton Friedman [Fri56] and Robert Hall [Hal78]) proposed to fit some empirical data patterns that the simple Keynesian model described in this quantecon lecture geometric series had missed.

The key insight of Friedman and Hall was that today’s consumption ought not to depend just on today’s non-financial income: it should also depend on a person’s anticipations of her future non-financial incomes at various dates.

In this lecture, we’ll study what is sometimes called the “consumption-smoothing model” using only linear algebra, in particular matrix multiplication and matrix inversion.

Formulas presented in present value formulas are at the core of the consumption smoothing model because they are used to define a consumer’s “human wealth”.

import numpy as np
import matplotlib.pyplot as plt
from collections import namedtuple


Our model describes the behavior of a consumer who lives from time $$t=0, 1, \ldots, T$$, receives a stream $$\{y_t\}_{t=0}^T$$ of non-financial income and chooses a consumption stream $$\{c_t\}_{t=0}^T$$.

We usually think of the non-financial income stream as coming from the person’s salary from supplying labor.

The model takes that non-financial income stream as an input, regarding it as “exogenous” in the sense of not being determined by the model.

The consumer faces a gross interest rate of $$R >1$$ that is constant over time, at which she is free to borrow or lend, up to some limits that we’ll describe below.

To set up the model, let

• $$T \geq 2$$ be a positive integer that constitutes a time-horizon

• $$y = \{y_t\}_{t=0}^T$$ be an exogenous sequence of non-negative non-financial incomes $$y_t$$

• $$a = \{a_t\}_{t=0}^{T+1}$$ be a sequence of financial wealth

• $$c = \{c_t\}_{t=0}^T$$ be a sequence of non-negative consumption rates

• $$R \geq 1$$ be a fixed gross one period rate of return on financial assets

• $$\beta \in (0,1)$$ be a fixed discount factor

• $$a_0$$ be a given initial level of financial assets

• $$a_{T+1} \geq 0$$ be a terminal condition on final assets

While the sequence of financial wealth $$a$$ is to be determined by the model, it must satisfy two boundary conditions that require it to be equal to $$a_0$$ at time $$0$$ and $$a_{T+1}$$ at time $$T+1$$.

The terminal condition $$a_{T+1} \geq 0$$ requires that the consumer not die leaving debts.

plt.show()


## 9.4. Wrapping up the consumption-smoothing model#

The consumption-smoothing model of Milton Friedman [Fri56] and Robert Hall [Hal78]) is a cornerstone of modern macro that has important ramifications about the size of the Keynesian “fiscal policy multiplier” described briefly in quantecon lecture geometric series.

In particular, Milton Friedman and others showed that it lowered the fiscal policy multiplier relative to the one implied by the simple Keynesian consumption function presented in geometric series.

Friedman and Hall’s work opened the door to a lively literature on the aggregate consumption function and implied fiscal multipliers that remains very active today.

## 9.5. Difference equations with linear algebra#

In the preceding sections we have used linear algebra to solve a consumption smoothing model.

The same tools from linear algebra – matrix multiplication and matrix inversion – can be used to study many other dynamic models too.

We’ll concluse this lecture by giving a couple of examples.

In particular, we’ll describe a useful way of representing and “solving” linear difference equations.

To generate some $$y$$ vectors, we’ll just write down a linear difference equation with appropriate initial conditions and then use linear algebra to solve it.

### 9.5.1. First-order difference equation#

We’ll start with a first-order linear difference equation for $$\{y_t\}_{t=0}^T$$:

$y_{t} = \lambda y_{t-1}, \quad t = 1, 2, \ldots, T$

where $$y_0$$ is a given initial condition.

We can cast this set of $$T$$ equations as a single matrix equation

$\begin{bmatrix} 1 & 0 & 0 & \cdots & 0 & 0 \cr -\lambda & 1 & 0 & \cdots & 0 & 0 \cr 0 & -\lambda & 1 & \cdots & 0 & 0 \cr \vdots & \vdots & \vdots & \cdots & \vdots & \vdots \cr 0 & 0 & 0 & \cdots & -\lambda & 1 \end{bmatrix} \begin{bmatrix} y_1 \cr y_2 \cr y_3 \cr \vdots \cr y_T \end{bmatrix} = \begin{bmatrix} \lambda y_0 \cr 0 \cr 0 \cr \vdots \cr 0 \end{bmatrix}$

Multiplying both sides by inverse of the matrix on the left provides the solution

(9.4)#$\begin{bmatrix} y_1 \cr y_2 \cr y_3 \cr \vdots \cr y_T \end{bmatrix} = \begin{bmatrix} 1 & 0 & 0 & \cdots & 0 & 0 \cr \lambda & 1 & 0 & \cdots & 0 & 0 \cr \lambda^2 & \lambda & 1 & \cdots & 0 & 0 \cr \vdots & \vdots & \vdots & \cdots & \vdots & \vdots \cr \lambda^{T-1} & \lambda^{T-2} & \lambda^{T-3} & \cdots & \lambda & 1 \end{bmatrix} \begin{bmatrix} \lambda y_0 \cr 0 \cr 0 \cr \vdots \cr 0 \end{bmatrix}$

Exercise 9.1

In the (9.4), we multiply the inverse of the matrix $$A$$. In this exercise, please confirm that

$\begin{bmatrix} 1 & 0 & 0 & \cdots & 0 & 0 \cr \lambda & 1 & 0 & \cdots & 0 & 0 \cr \lambda^2 & \lambda & 1 & \cdots & 0 & 0 \cr \vdots & \vdots & \vdots & \cdots & \vdots & \vdots \cr \lambda^{T-1} & \lambda^{T-2} & \lambda^{T-3} & \cdots & \lambda & 1 \end{bmatrix}$

is the inverse of $$A$$ and check that $$A A^{-1} = I$$

### 9.5.2. Second order difference equation#

A second-order linear difference equation for $$\{y_t\}_{t=0}^T$$ is

$y_{t} = \lambda_1 y_{t-1} + \lambda_2 y_{t-2}, \quad t = 1, 2, \ldots, T$

where now $$y_0$$ and $$y_{-1}$$ are two given initial equations determined outside the model.

As we did with the first-order difference equation, we can cast this set of $$T$$ equations as a single matrix equation

$\begin{bmatrix} 1 & 0 & 0 & \cdots & 0 & 0 & 0 \cr -\lambda_1 & 1 & 0 & \cdots & 0 & 0 & 0 \cr -\lambda_2 & -\lambda_1 & 1 & \cdots & 0 & 0 & 0 \cr \vdots & \vdots & \vdots & \cdots & \vdots & \vdots \cr 0 & 0 & 0 & \cdots & -\lambda_2 & -\lambda_1 & 1 \end{bmatrix} \begin{bmatrix} y_1 \cr y_2 \cr y_3 \cr \vdots \cr y_T \end{bmatrix} = \begin{bmatrix} \lambda_1 y_0 + \lambda_2 y_{-1} \cr \lambda_2 y_0 \cr 0 \cr \vdots \cr 0 \end{bmatrix}$

Multiplying both sides by inverse of the matrix on the left again provides the solution.

Exercise 9.2

As an exercise, we ask you to represent and solve a third order linear difference equation. How many initial conditions must you specify?