# dle¶

class quantecon.dle.DLE(information, technology, preferences)[source]

Bases: `object`

This class is for analyzing dynamic linear economies, as set out in Hansen & Sargent (2013). The planner’s problem is to choose {c_t, s_t, i_t, h_t, k_t, g_t}_{t=0}^infty to maximize

max -(1/2) mathbb{E} sum_{t=0}^{infty} beta^t [(s_t - b_t).(s_t-b_t) + g_t.g_t]

subject to the linear constraints

Phi_c c_t + Phi_g g_t + Phi_i i_t = Gamma k_{t-1} + d_t k_t = Delta_k k_{t-1} + Theta_k i_t h_t = Delta_h h_{t-1} + Theta_h c_t s_t = Lambda h_{t-1} + Pi c_t

and

z_{t+1} = A_{22} z_t + C_2 w_{t+1} b_t = U_b z_t d_t = U_d z_t

where h_{-1}, k_{-1}, and z_0 are given as initial conditions.

Section 5.5 of HS2013 describes how to map these matrices into those of a LQ problem.

HS2013 sort the matrices defining the problem into three groups:

Information: A_{22}, C_2, U_b , and U_d characterize the motion of information sets and of taste and technology shocks

Technology: Phi_c, Phi_g, Phi_i, Gamma, Delta_k, and Theta_k determine the technology for producing consumption goods

Preferences: Delta_h, Theta_h, Lambda, and Pi determine the technology for producing consumption services from consumer goods. A scalar discount factor beta determines the preference ordering over consumption services.

Parameters:
Informationtuple

Information is a tuple containing the matrices A_{22}, C_2, U_b, and U_d

Technologytuple

Technology is a tuple containing the matrices Phi_c, Phi_g, Phi_i, Gamma, Delta_k, and Theta_k

Preferencestuple

Preferences is a tuple containing the scalar beta and the matrices Lambda, Pi, Delta_h, and Theta_h

Methods

 Compute canonical preference representation Uses auxiliary problem of 9.4.2, with the preference shock process reintroduced Calculates pihat, llambdahat and ubhat for the equivalent canonical household technology `compute_sequence`(x0[, ts_length, Pay]) Simulate quantities and prices for the economy Computes the non-stochastic steady-state of the economy. `irf`([ts_length, shock]) Create Impulse Response Functions
canonical()[source]

Compute canonical preference representation Uses auxiliary problem of 9.4.2, with the preference shock process reintroduced Calculates pihat, llambdahat and ubhat for the equivalent canonical household technology

compute_sequence(x0, ts_length=None, Pay=None)[source]

Simulate quantities and prices for the economy

Parameters:
x0array_like(float)

The initial state

ts_lengthscalar(int)

Length of the simulation

Payarray_like(float)

Vector to price an asset whose payout is Pay*xt

Computes the non-stochastic steady-state of the economy.

Parameters:
nncarray_like(float)

nnc is the location of the constant in the state vector x_t

irf(ts_length=100, shock=None)[source]

Create Impulse Response Functions

Parameters:
ts_lengthscalar(int)

Number of periods to calculate IRF

Shockarray_like(float)

Vector of shocks to calculate IRF to. Default is first element of w