24. Shock Non Invertibility#

24.1. Overview#

This is another member 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 Recursive Models of Dynamic Linear Economies.

In addition to what’s in Anaconda, this lecture uses the quantecon library.

!pip install --upgrade quantecon

Hide code cell output

Requirement already satisfied: quantecon in /home/runner/miniconda3/envs/quantecon/lib/python3.12/site-packages (0.8.2)
Requirement already satisfied: numba>=0.49.0 in /home/runner/miniconda3/envs/quantecon/lib/python3.12/site-packages (from quantecon) (0.60.0)
Requirement already satisfied: numpy>=1.17.0 in /home/runner/miniconda3/envs/quantecon/lib/python3.12/site-packages (from quantecon) (1.26.4)
Requirement already satisfied: requests in /home/runner/miniconda3/envs/quantecon/lib/python3.12/site-packages (from quantecon) (2.32.3)
Requirement already satisfied: scipy>=1.5.0 in /home/runner/miniconda3/envs/quantecon/lib/python3.12/site-packages (from quantecon) (1.13.1)
Requirement already satisfied: sympy in /home/runner/miniconda3/envs/quantecon/lib/python3.12/site-packages (from quantecon) (1.13.2)
Requirement already satisfied: llvmlite<0.44,>=0.43.0dev0 in /home/runner/miniconda3/envs/quantecon/lib/python3.12/site-packages (from numba>=0.49.0->quantecon) (0.43.0)
Requirement already satisfied: charset-normalizer<4,>=2 in /home/runner/miniconda3/envs/quantecon/lib/python3.12/site-packages (from requests->quantecon) (3.3.2)
Requirement already satisfied: idna<4,>=2.5 in /home/runner/miniconda3/envs/quantecon/lib/python3.12/site-packages (from requests->quantecon) (3.7)
Requirement already satisfied: urllib3<3,>=1.21.1 in /home/runner/miniconda3/envs/quantecon/lib/python3.12/site-packages (from requests->quantecon) (2.2.3)
Requirement already satisfied: certifi>=2017.4.17 in /home/runner/miniconda3/envs/quantecon/lib/python3.12/site-packages (from requests->quantecon) (2024.8.30)
Requirement already satisfied: mpmath<1.4,>=1.1.0 in /home/runner/miniconda3/envs/quantecon/lib/python3.12/site-packages (from sympy->quantecon) (1.3.0)

We’ll make these imports:

import numpy as np
import quantecon as qe
import matplotlib.pyplot as plt
from quantecon import DLE
from math import sqrt

This lecture describes an early contribution to what is now often called a news and noise issue.

In particular, it analyzes a shock-invertibility issue that is endemic within a class of permanent income models.

Technically, the invertibility problem indicates a situation in which histories of the shocks in an econometrician’s autoregressive or Wold moving average representation span a smaller information space than do the shocks that are seen by the agents inside the econometrician’s model.

An econometrician who is unaware of the problem would misinterpret shocks and likely responses to them.

A shock-invertibility that is technically close to the one studied here is discussed by Eric Leeper, Todd Walker, and Susan Yang [Leeper et al., 2013] in their analysis of fiscal foresight.

A distinct shock-invertibility issue is present in the special LQ consumption smoothing model in this quantecon lecture Information and Consumption Smoothing.

24.2. Model#

We consider the following modification of Robert Hall’s (1978) model [Hall, 1978] in which the endowment process is the sum of two orthogonal autoregressive processes:

Preferences

12Et=0βt[(ctbt)2+lt2]|J0
st=ct
bt=Ubzt

Technology

ct+it=γkt1+dt
kt=δkkt1+it
gt=ϕ1it,ϕ1>0
gtgt=lt2

Information

zt+1=[10000000.90000000000001000000100000010]zt+[001004000000]wt+1
Ub=[3000000]
Ud=[5110.80.60.4000000]

The preference shock is constant at 30, while the endowment process is the sum of a constant and two orthogonal processes.

Specifically:

dt=5+d1t+d2t
d1t=0.9d1t1+w1t
d2t=4w2t+0.8(4w2t1)+0.6(4w2t2)+0.4(4w2t3)

d1t is a first-order AR process, while d2t is a third-order pure moving average process.

γ_1 = 0.05
γ = np.array([[γ_1], [0]])
ϕ_c = np.array([[1], [0]])
ϕ_g = np.array([[0], [1]])
ϕ_1 = 0.00001
ϕ_i = np.array([[1], [-ϕ_1]])
δ_k = np.array([[1]])
θ_k = np.array([[1]])
β = np.array([[1 / 1.05]])
l_λ = np.array([[0]])
π_h = np.array([[1]])
δ_h = np.array([[.9]])
θ_h = np.array([[1]]) - δ_h
ud = np.array([[5, 1, 1, 0.8, 0.6, 0.4],
               [0, 0, 0,   0,   0,   0]])
a22 = np.zeros((6, 6))
# Chase's great trick
a22[[0, 1, 3, 4, 5], [0, 1, 2, 3, 4]] = np.array([1.0, 0.9, 1.0, 1.0, 1.0])
c2 = np.zeros((6, 2))
c2[[1, 2], [0, 1]] = np.array([1.0, 4.0])
ub = np.array([[30, 0, 0, 0, 0, 0]])
x0 = np.array([[5], [150], [1], [0], [0], [0], [0], [0]])

info1 = (a22, c2, ub, ud)
tech1 = (ϕ_c, ϕ_g, ϕ_i, γ, δ_k, θ_k)
pref1 = (β, l_λ, π_h, δ_h, θ_h)

econ1 = DLE(info1, tech1, pref1)

We define the household’s net of interest deficit as ctdt.

Hall’s model imposes “expected present-value budget balance” in the sense that

Ej=0βj(ct+jdt+j)|Jt=β1kt1t

Define a moving average representation of (ct,ctdt) in terms of the wts to be:

[ctctdt]=[σ1(L)σ2(L)]wt

Hall’s model imposes the restriction σ2(β)=[00].

  • The consumer who lives inside this model observes histories of both components of the endowment process d1t and d2t.

  • The econometrician has data on the history of the pair [ct,dt], but not directly on the history of wt’s.

  • The econometrician obtains a Wold representation for the process [ct,ctdt]:

[ctctdt]=[σ1(L)σ2(L)]ut

A representation with equivalent shocks would be recovered by estimating a bivariate vector autoregression for ct,ctdt.

The Appendix of chapter 8 of [Hansen and Sargent, 2013] explains why the impulse response functions in the Wold representation estimated by the econometrician do not resemble the impulse response functions that depict the response of consumption and the net-of-interest deficit to innovations wt to the consumer’s information.

Technically, σ2(β)=[00] implies that the history of uts spans a smaller linear space than does the history of wts.

This means that ut will typically be a distributed lag of wt that is not concentrated at zero lag:

ut=j=0αjwtj

Thus, the econometrician’s news ut typically responds belatedly to the consumer’s news wt.

24.3. Code#

We will construct Figures from Chapter 8 Appendix E of [Hansen and Sargent, 2013] to illustrate these ideas:

# This is Fig 8.E.1 from p.188 of HS2013

econ1.irf(ts_length=40, shock=None)

fig, (ax1, ax2) = plt.subplots(1, 2, figsize=(12, 4))
ax1.plot(econ1.c_irf, label='Consumption')
ax1.plot(econ1.c_irf - econ1.d_irf[:,0].reshape(40,1), label='Deficit')
ax1.legend()
ax1.set_title('Response to $w_{1t}$')

shock2 = np.array([[0], [1]])
econ1.irf(ts_length=40, shock=shock2)

ax2.plot(econ1.c_irf, label='Consumption')
ax2.plot(econ1.c_irf - econ1.d_irf[:,0].reshape(40, 1), label='Deficit')
ax2.legend()
ax2.set_title('Response to $w_{2t}$')
plt.show()
_images/e466523aa554d61ed1a31e47bc6a16b1e9e4dfc94e58d1e459c06429f6a931f3.png

The above figure displays the impulse response of consumption and the net-of-interest deficit to the innovations wt to the consumer’s non-financial income or endowment process.

Consumption displays the characteristic “random walk” response with respect to each innovation.

Each endowment innovation leads to a temporary surplus followed by a permanent net-of-interest deficit.

The temporary surplus just offsets the permanent deficit in terms of expected present value.

G_HS = np.vstack([econ1.Sc, econ1.Sc-econ1.Sd[0, :].reshape(1, 8)])
H_HS = 1e-8 * np.eye(2)  # Set very small so there is no measurement error
lss_hs = qe.LinearStateSpace(econ1.A0, econ1.C, G_HS, H_HS)

hs_kal = qe.Kalman(lss_hs)
w_lss = hs_kal.whitener_lss()
ma_coefs = hs_kal.stationary_coefficients(50, 'ma')

# This is Fig 8.E.2 from p.189 of HS2013

ma_coefs = ma_coefs
jj = 50
y1_w1 = np.empty(jj)
y2_w1 = np.empty(jj)
y1_w2 = np.empty(jj)
y2_w2 = np.empty(jj)

for t in range(jj):
    y1_w1[t] = ma_coefs[t][0, 0]
    y1_w2[t] = ma_coefs[t][0, 1]
    y2_w1[t] = ma_coefs[t][1, 0]
    y2_w2[t] = ma_coefs[t][1, 1]

# This scales the impulse responses to match those in the book
y1_w1 = sqrt(hs_kal.stationary_innovation_covar()[0, 0]) * y1_w1
y2_w1 = sqrt(hs_kal.stationary_innovation_covar()[0, 0]) * y2_w1
y1_w2 = sqrt(hs_kal.stationary_innovation_covar()[1, 1]) * y1_w2
y2_w2 = sqrt(hs_kal.stationary_innovation_covar()[1, 1]) * y2_w2

fig, (ax1, ax2) = plt.subplots(1, 2, figsize=(12, 4))
ax1.plot(y1_w1, label='Consumption')
ax1.plot(y2_w1, label='Deficit')
ax1.legend()
ax1.set_title('Response to $u_{1t}$')

ax2.plot(y1_w2, label='Consumption')
ax2.plot(y2_w2, label='Deficit')
ax2.legend()
ax2.set_title('Response to $u_{2t}$')
plt.show()
_images/f185dd7bfd8bc84f33480e3a2a7544889d4f3ea6510bcdfad666bea0587134e1.png

The above figure displays the impulse response of consumption and the deficit to the innovations in the econometrician’s Wold representation

  • this is the object that would be recovered from a high order vector autoregression on the econometrician’s observations.

Consumption responds only to the first innovation

  • this is indicative of the Granger causality imposed on the [ct,ctdt] process by Hall’s model: consumption Granger causes ctdt, with no reverse causality.

# This is Fig 8.E.3 from p.189 of HS2013

jj = 20
irf_wlss = w_lss.impulse_response(jj)
ycoefs = irf_wlss[1]
# Pull out the shocks
a1_w1 = np.empty(jj)
a1_w2 = np.empty(jj)
a2_w1 = np.empty(jj)
a2_w2 = np.empty(jj)

for t in range(jj):
    a1_w1[t] = ycoefs[t][0, 0]
    a1_w2[t] = ycoefs[t][0, 1]
    a2_w1[t] = ycoefs[t][1, 0]
    a2_w2[t] = ycoefs[t][1, 1]

fig, (ax1, ax2) = plt.subplots(1, 2, figsize=(12, 4))
ax1.plot(a1_w1, label='Consumption innov.')
ax1.plot(a2_w1, label='Deficit innov.')
ax1.set_title('Response to $w_{1t}$')
ax1.legend()
ax2.plot(a1_w2, label='Consumption innov.')
ax2.plot(a2_w2, label='Deficit innov.')
ax2.legend()
ax2.set_title('Response to $w_{2t}$')
plt.show()
_images/9b19bc8c60ee05c4a0e5a74734413684387096ab7f58891af70c333238e26491.png

The above figure displays the impulse responses of ut to wt, as depicted in:

ut=j=0αjwtj

While the responses of the innovations to consumption are concentrated at lag zero for both components of wt, the responses of the innovations to (ctdt) are spread over time (especially in response to w1t).

Thus, the innovations to (ctdt) as revealed by the vector autoregression depend on what the economic agent views as “old news”.