{
"cells": [
{
"cell_type": "markdown",
"id": "e6185678",
"metadata": {},
"source": [
"\n",
"\n",
"\n",
""
]
},
{
"cell_type": "markdown",
"id": "3b51c383",
"metadata": {},
"source": [
"# Recursive Models of Dynamic Linear Economies"
]
},
{
"cell_type": "markdown",
"id": "23f4bf59",
"metadata": {},
"source": [
"## Contents\n",
"\n",
"- [Recursive Models of Dynamic Linear Economies](#Recursive-Models-of-Dynamic-Linear-Economies) \n",
" - [A Suite of Models](#A-Suite-of-Models) \n",
" - [Econometrics](#Econometrics) \n",
" - [Dynamic Demand Curves and Canonical Household Technologies](#Dynamic-Demand-Curves-and-Canonical-Household-Technologies) \n",
" - [Gorman Aggregation and Engel Curves](#Gorman-Aggregation-and-Engel-Curves) \n",
" - [Partial Equilibrium](#Partial-Equilibrium) \n",
" - [Equilibrium Investment Under Uncertainty](#Equilibrium-Investment-Under-Uncertainty) \n",
" - [A Rosen-Topel Housing Model](#A-Rosen-Topel-Housing-Model) \n",
" - [Cattle Cycles](#Cattle-Cycles) \n",
" - [Models of Occupational Choice and Pay](#Models-of-Occupational-Choice-and-Pay) \n",
" - [Permanent Income Models](#Permanent-Income-Models) \n",
" - [Gorman Heterogeneous Households](#Gorman-Heterogeneous-Households) \n",
" - [Non-Gorman Heterogeneous Households](#Non-Gorman-Heterogeneous-Households) "
]
},
{
"cell_type": "markdown",
"id": "672ecc9e",
"metadata": {},
"source": [
"> “Mathematics is the art of giving the same name to different things” – Henri Poincare\n",
"\n",
"\n",
"> “Complete market economies are all alike” – Robert E. Lucas, Jr., (1989)\n",
"\n",
"\n",
"> “Every partial equilibrium model can be reinterpreted as a general equilibrium model.” – Anonymous"
]
},
{
"cell_type": "markdown",
"id": "5480109f",
"metadata": {},
"source": [
"## A Suite of Models\n",
"\n",
"This lecture presents a class of linear-quadratic-Gaussian models of general economic equilibrium\n",
"designed by Lars Peter Hansen and Thomas J. Sargent [[HS13](https://python-advanced.quantecon.org/zreferences.html#id67)].\n",
"\n",
"The class of models is implemented in a Python class DLE that is part of quantecon.\n",
"\n",
"Subsequent lectures use the DLE class to implement various instances that have appeared in the economics literature\n",
"\n",
"1. [Growth in Dynamic Linear Economies](https://python-advanced.quantecon.org/growth_in_dles.html) \n",
"1. [Lucas Asset Pricing using DLE](https://python-advanced.quantecon.org/lucas_asset_pricing_dles.html) \n",
"1. [IRFs in Hall Model](https://python-advanced.quantecon.org/irfs_in_hall_model.html) \n",
"1. [Permanent Income Using the DLE class](https://python-advanced.quantecon.org/permanent_income_dles.html) \n",
"1. [Rosen schooling model](https://python-advanced.quantecon.org/rosen_schooling_model.html) \n",
"1. [Cattle cycles](https://python-advanced.quantecon.org/cattle_cycles.html) \n",
"1. [Shock Non Invertibility](https://python-advanced.quantecon.org/hs_invertibility_example.html) "
]
},
{
"cell_type": "markdown",
"id": "4d2a25a7",
"metadata": {},
"source": [
"### Overview of the Models\n",
"\n",
"In saying that “complete markets are all alike”, Robert E. Lucas, Jr. was noting that all of them have\n",
"\n",
"- a commodity space. \n",
"- a space dual to the commodity space in which prices reside. \n",
"- endowments of resources. \n",
"- peoples’ preferences over goods. \n",
"- physical technologies for transforming resources into goods. \n",
"- random processes that govern shocks to technologies and preferences and associated information flows. \n",
"- a single budget constraint per person. \n",
"- the existence of a representative consumer even when there are many people in the model. \n",
"- a concept of competitive equilibrium. \n",
"- theorems connecting competitive equilibrium allocations to allocations that would be chosen by a benevolent social planner. \n",
"\n",
"\n",
"The models have **no frictions** such as $ \\ldots $\n",
"\n",
"- Enforcement difficulties \n",
"- Information asymmetries \n",
"- Other forms of transactions costs \n",
"- Externalities \n",
"\n",
"\n",
"The models extensively use the powerful ideas of\n",
"\n",
"- Indexing commodities and their prices by time (John R. Hicks). \n",
"- Indexing commodities and their prices by chance (Kenneth Arrow). \n",
"\n",
"\n",
"Much of the imperialism of complete markets models comes from applying these two tricks.\n",
"\n",
"The Hicks trick of indexing commodities by time is the idea that **dynamics are a special case of statics**.\n",
"\n",
"The Arrow trick of indexing commodities by chance is the idea that **analysis of trade under uncertainty is a special\n",
"case of the analysis of trade under certainty**.\n",
"\n",
"The [[HS13](https://python-advanced.quantecon.org/zreferences.html#id67)] class of models specify the commodity space, preferences, technologies, stochastic shocks and information flows in ways\n",
"that allow the models to be analyzed completely using only the tools of linear time series models and linear-quadratic optimal control described\n",
"in the two lectures [Linear State Space Models](https://python-intro.quantecon.org/linear_models.html) and [Linear Quadratic Control](https://python-intro.quantecon.org/lqcontrol.html).\n",
"\n",
"There are costs and benefits associated with the simplifications and specializations needed to make a particular model fit within the\n",
"[[HS13](https://python-advanced.quantecon.org/zreferences.html#id67)] class\n",
"\n",
"- the costs are that linear-quadratic structures are sometimes too confining. \n",
"- benefits include computational speed, simplicity, and ability to analyze many model features analytically or nearly analytically. \n",
"\n",
"\n",
"A variety of superficially different models are all instances of the [[HS13](https://python-advanced.quantecon.org/zreferences.html#id67)] class of models\n",
"\n",
"- Lucas asset pricing model \n",
"- Lucas-Prescott model of investment under uncertainty \n",
"- Asset pricing models with habit persistence \n",
"- Rosen-Topel equilibrium model of housing \n",
"- Rosen schooling models \n",
"- Rosen-Murphy-Scheinkman model of cattle cycles \n",
"- Hansen-Sargent-Tallarini model of robustness and asset pricing \n",
"- Many more $ \\ldots $ \n",
"\n",
"\n",
"\n",
"\n",
"The diversity of these models conceals an essential unity that illustrates the quotation by Robert E. Lucas, Jr., with which\n",
"we began this lecture."
]
},
{
"cell_type": "markdown",
"id": "98f09aef",
"metadata": {},
"source": [
"### Forecasting?\n",
"\n",
"A consequence of a single budget constraint per person plus the Hicks-Arrow tricks is that households and firms need not forecast.\n",
"\n",
"But there exist equivalent structures called **recursive competitive equilibria** in which they do appear to need to forecast.\n",
"\n",
"In these structures, to forecast, households and firms use:\n",
"\n",
"- equilibrium pricing functions, and \n",
"- knowledge of the Markov structure of the economy’s state vector. "
]
},
{
"cell_type": "markdown",
"id": "ce11568e",
"metadata": {},
"source": [
"### Theory and Econometrics\n",
"\n",
"For an application of the [[HS13](https://python-advanced.quantecon.org/zreferences.html#id67)] class of models, the outcome of theorizing is a stochastic process, i.e., a probability\n",
"distribution over sequences of prices and quantities, indexed by parameters describing preferences, technologies, and information flows.\n",
"\n",
"Another name for that object is a likelihood function, a key object of both frequentist and Bayesian statistics.\n",
"\n",
"There are two important uses of an **equilibrium stochastic process** or **likelihood function**.\n",
"\n",
"The first is to solve the **direct problem**.\n",
"\n",
"The **direct problem** takes as inputs values of the parameters that define preferences, technologies, and information flows and as\n",
"an output characterizes or simulates random paths of quantities and prices.\n",
"\n",
"The second use of an equilibrium stochastic process or likelihood function is to solve the **inverse problem**.\n",
"\n",
"The **inverse problem** takes as an input a time series sample of observations on a subset of prices and quantities determined by the model\n",
"and from them makes inferences about the parameters that define the model’s preferences, technologies, and information flows."
]
},
{
"cell_type": "markdown",
"id": "fe5cb2be",
"metadata": {},
"source": [
"### More Details\n",
"\n",
"A [[HS13](https://python-advanced.quantecon.org/zreferences.html#id67)] economy consists of **lists of matrices** that describe peoples’ household technologies, their preferences over\n",
"consumption services, their production technologies, and their information sets.\n",
"\n",
"There are complete markets in history-contingent commodities.\n",
"\n",
"Competitive equilibrium allocations and prices\n",
"\n",
"- satisfy equations that are easy to write down and solve \n",
"- have representations that are convenient econometrically \n",
"\n",
"\n",
"Different example economies manifest themselves simply as different settings for various matrices.\n",
"\n",
"[[HS13](https://python-advanced.quantecon.org/zreferences.html#id67)] use these tools:\n",
"\n",
"- A theory of recursive dynamic competitive economies \n",
"- Linear optimal control theory \n",
"- Recursive methods for estimating and interpreting vector\n",
" autoregressions \n",
"\n",
"\n",
"The models are flexible enough to express alternative senses of a representative household\n",
"\n",
"- A single ‘stand-in’ household of the type used to good effect by Edward C. Prescott. \n",
"- Heterogeneous households satisfying conditions for Gorman aggregation\n",
" into a representative household. \n",
"- Heterogeneous household technologies that violate conditions for Gorman\n",
" aggregation but are still susceptible to aggregation into a single\n",
" representative household via ‘non-Gorman’ or ‘mongrel’ aggregation’. \n",
"\n",
"\n",
"These three alternative types of aggregation have different consequences in terms of how prices and allocations can be computed.\n",
"\n",
"In particular, can prices and an aggregate allocation be computed before the\n",
"equilibrium allocation to individual heterogeneous households is computed?\n",
"\n",
"- Answers are “Yes” for Gorman aggregation, “No” for non-Gorman\n",
" aggregation. \n",
"\n",
"\n",
"In summary, the insights and practical benefits from economics to be introduced in this lecture\n",
"are\n",
"\n",
"- Deeper understandings that come from recognizing common underlying\n",
" structures. \n",
"- Speed and ease of computation that comes from unleashing a common suite of Python programs. \n",
"\n",
"\n",
"We’ll use the following **mathematical tools**\n",
"\n",
"- Stochastic Difference Equations (Linear). \n",
"- Duality: LQ Dynamic Programming and Linear Filtering are the same things\n",
" mathematically. \n",
"- The Spectral Factorization Identity (for understanding vector\n",
" autoregressions and non-Gorman aggregation). \n",
"\n",
"\n",
"So here is our roadmap.\n",
"\n",
"We’ll describe sets of matrices that pin down\n",
"\n",
"- Information \n",
"- Technologies \n",
"- Preferences \n",
"\n",
"\n",
"Then we’ll describe\n",
"\n",
"- Equilibrium concept and computation \n",
"- Econometric representation and estimation \n",
"\n",
"\n",
"\n",
""
]
},
{
"cell_type": "markdown",
"id": "1bf4dadf",
"metadata": {},
"source": [
"### Stochastic Model of Information Flows and Outcomes\n",
"\n",
"We’ll use stochastic linear difference equations to describe information flows **and** equilibrium outcomes.\n",
"\n",
"The sequence $ \\{w_t : t=1,2, \\ldots\\} $ is said to be a martingale\n",
"difference sequence adapted to $ \\{J_t : t=0, 1, \\ldots \\} $ if\n",
"$ E(w_{t+1} \\vert J_t) = 0 $ for $ t=0, 1, \\ldots\\, $.\n",
"\n",
"The sequence $ \\{w_t : t=1,2,\\ldots\\} $ is said to be conditionally\n",
"homoskedastic if $ E(w_{t+1}w_{t+1}^\\prime \\mid J_t) = I $ for\n",
"$ t=0,1, \\ldots\\, $.\n",
"\n",
"We assume that the $ \\{w_t : t=1,2,\\ldots\\} $ process is\n",
"conditionally homoskedastic.\n",
"\n",
"\n",
"\n",
"Let $ \\{x_t : t=1,2,\\ldots\\} $ be a sequence of\n",
"$ n $-dimensional random vectors, i.e. an $ n $-dimensional\n",
"stochastic process.\n",
"\n",
"The process $ \\{x_t : t=1,2,\\ldots\\} $ is constructed recursively\n",
"using an initial random vector\n",
"$ x_0\\sim {\\mathcal N}(\\hat x_0, \\Sigma_0) $ and a time-invariant\n",
"law of motion:\n",
"\n",
"$$\n",
"x_{t+1} = Ax_t + Cw_{t+1}\n",
"$$\n",
"\n",
"for $ t=0,1,\\ldots $ where $ A $ is an $ n $ by $ n $ matrix and $ C $ is an\n",
"$ n $ by $ N $ matrix.\n",
"\n",
"Evidently, the distribution of $ x_{t+1} $ conditional on $ x_t $ is\n",
"$ {\\mathcal N}(Ax_t, CC') $."
]
},
{
"cell_type": "markdown",
"id": "9911c1c4",
"metadata": {},
"source": [
"### Information Sets\n",
"\n",
"Let $ J_0 $ be generated by $ x_0 $ and $ J_t $ be generated\n",
"by $ x_0, w_1, \\ldots ,\n",
"w_t $, which means that $ J_t $ consists of the set of all measurable\n",
"functions of $ \\{x_0, w_1,\\ldots,\n",
"w_t\\} $."
]
},
{
"cell_type": "markdown",
"id": "97af87ab",
"metadata": {},
"source": [
"### Prediction Theory\n",
"\n",
"The optimal forecast of $ x_{t+1} $ given current information is\n",
"\n",
"$$\n",
"E(x_{t+1} \\mid J_t) = Ax_t\n",
"$$\n",
"\n",
"and the one-step-ahead forecast error is\n",
"\n",
"$$\n",
"x_{t+1} - E(x_{t+1} \\mid J_t) = Cw_{t+1}\n",
"$$\n",
"\n",
"The covariance matrix of $ x_{t+1} $ conditioned on $ J_t $ is\n",
"\n",
"$$\n",
"E (x_{t+1} - E ( x_{t+1} \\mid J_t) ) (x_{t+1} - E ( x_{t+1} \\mid J_t))^\\prime = CC^\\prime\n",
"$$\n",
"\n",
"A nonrecursive expression for $ x_t $ as a function of\n",
"$ x_0, w_1, w_2, \\ldots, w_t $ is\n",
"\n",
"$$\n",
"\\begin{aligned}\n",
" x_t &= Ax_{t-1} + Cw_t \\\\\n",
"&= A^2 x_{t-2} + ACw_{t-1} + Cw_t \\\\\n",
"&= \\Bigl[\\sum_{\\tau=0}^{t-1} A^\\tau Cw_{t-\\tau} \\Bigr] + A^t x_0\n",
"\\end{aligned}\n",
"$$\n",
"\n",
"\n",
"\n",
"Shift forward in time:\n",
"\n",
"$$\n",
"x_{t+j} = \\sum^{j-1}_{s=0} A^s C w_{t+j-s} + A^j x_t\n",
"$$\n",
"\n",
"Projecting on the information set $ \\{ x_0, w_t, w_{t-1},\n",
"\\ldots, w_1\\} $ gives\n",
"\n",
"$$\n",
"E_t x_{t+j} = A^j x_t\n",
"$$\n",
"\n",
"where $ E_t (\\cdot) \\equiv E [ (\\cdot) \\mid x_0, w_t, w_{t-1}, \\ldots, w_1]\n",
"= E (\\cdot) \\mid J_t $, and $ x_t $ is in $ J_t $.\n",
"\n",
"\n",
"\n",
"It is useful to obtain the covariance matrix of the $ j $-step-ahead\n",
"prediction error $ x_{t+j} - E_t x_{t+j} = \\sum^{j-1}_{s=0} A^s C w_{t-s+j} $.\n",
"\n",
"Evidently,\n",
"\n",
"$$\n",
"E_t (x_{t+j} - E_t x_{t+j}) (x_{t+j} - E_t x_{t+j})^\\prime =\n",
"\\sum^{j-1}_{k=0} A^k C C^\\prime A^{k^\\prime} \\equiv v_j\n",
"$$\n",
"\n",
"$ v_j $ can be calculated recursively via\n",
"\n",
"$$\n",
"\\begin{aligned}\n",
" v_1 &= CC^\\prime \\\\\n",
" v_j &= CC^\\prime + A v_{j-1} A^\\prime, \\quad j \\geq 2\n",
"\\end{aligned}\n",
"$$"
]
},
{
"cell_type": "markdown",
"id": "b414b7c9",
"metadata": {},
"source": [
"### Orthogonal Decomposition\n",
"\n",
"To decompose these covariances into parts attributable to the individual\n",
"components of $ w_t $, we let $ i_\\tau $ be an\n",
"$ N $-dimensional column vector of zeroes except in position\n",
"$ \\tau $, where there is a one. Define a matrix\n",
"$ \\upsilon_{j,\\tau} $\n",
"\n",
"$$\n",
"\\upsilon_{j,\\tau} = \\sum_{k=0}^{j-1} A^k C i_\\tau i_\\tau^\\prime C^\\prime\n",
"A^{^\\prime k} .\n",
"$$\n",
"\n",
"Note that $ \\sum_{\\tau=1}^N i_\\tau i_\\tau^\\prime = I $, so that we\n",
"have\n",
"\n",
"$$\n",
"\\sum_{\\tau=1}^N \\upsilon_{j, \\tau} = \\upsilon_j\n",
"$$\n",
"\n",
"Evidently, the matrices\n",
"$ \\{ \\upsilon_{j, \\tau} , \\tau = 1, \\ldots, N \\} $ give an\n",
"orthogonal decomposition of the covariance matrix of\n",
"$ j $-step-ahead prediction errors into the parts attributable to\n",
"each of the components $ \\tau =\n",
"1, \\ldots, N $."
]
},
{
"cell_type": "markdown",
"id": "11f861ee",
"metadata": {},
"source": [
"### Taste and Technology Shocks\n",
"\n",
"$ E(w_t \\mid J_{t-1}) = 0 $ and $ E(w_t\n",
"w_t^\\prime \\mid J_{t-1}) = I $ for $ t=1,2, \\ldots $\n",
"\n",
"$$\n",
"b_t = U_b z_t \\hbox{ and } d_t = U_dz_t,\n",
"$$\n",
"\n",
"$ U_b $ and $ U_d $ are matrices that select entries of\n",
"$ z_t $. The law of motion for $ \\{z_t : t=0, 1, \\ldots\\} $ is\n",
"\n",
"$$\n",
"z_{t+1} = A_{22} z_t + C_2 w_{t+1} \\ \\hbox { for } t = 0, 1, \\ldots\n",
"$$\n",
"\n",
"where $ z_0 $ is a given initial condition. The eigenvalues of the\n",
"matrix $ A_{22} $ have absolute values that are less than or equal\n",
"to one.\n",
"\n",
"Thus, in summary, our model of **information and shocks** is\n",
"\n",
"$$\n",
"\\begin{aligned}\n",
"z_{t+1} &=A_{22} z_t + C_2 w_{t+1}\n",
"\\\\ b_t &= U_b z_t \\\\ d_t &= U_d z_t .\n",
"\\end{aligned}\n",
"$$\n",
"\n",
"We can now briefly summarize other components of our economies, in particular\n",
"\n",
"- Production technologies \n",
"- Household technologies \n",
"- Household preferences "
]
},
{
"cell_type": "markdown",
"id": "fe430641",
"metadata": {},
"source": [
"### Production Technology\n",
"\n",
"Where $ c_t $ is a vector of consumption rates, $ k_t $ is a vector of physical capital goods, $ g_t $ is\n",
"a vector intermediate productions goods, $ d_t $ is a vector of technology shocks, the production technology is\n",
"\n",
"$$\n",
"\\begin{aligned}\n",
"\\Phi_c c_t + \\Phi_g g_t + \\Phi_i i_t &=\\Gamma k_{t-1} + d_t \\\\\n",
"k_t &=\\Delta_k k_{t-1} + \\Theta_k i_t \\\\ g_t \\cdot g_t &=\\ell_t^2\n",
"\\end{aligned}\n",
"$$\n",
"\n",
"Here $ \\Phi_c, \\Phi_g, \\Phi_i, \\Gamma, \\Delta_k, \\Theta_k $ are all matrices conformable to the vectors they multiply and\n",
"$ \\ell_t $ is a disutility generating resource supplied by the household.\n",
"\n",
"For technical reasons that facilitate computations, we make the following.\n",
"\n",
"**Assumption:** $ [\\Phi_c\\ \\Phi_g] $ is nonsingular."
]
},
{
"cell_type": "markdown",
"id": "fa925959",
"metadata": {},
"source": [
"### Household Technology\n",
"\n",
"Households confront a technology that allows them to devote consumption goods to construct a vector $ h_t $ of household capital goods\n",
"and a vector $ s_t $ of utility generating house services\n",
"\n",
"$$\n",
"\\begin{aligned}\n",
"s_t &= \\Lambda h_{t-1} + \\Pi c_t \\\\\n",
"h_t &= \\Delta_h h_{t-1} + \\Theta_h c_t\n",
"\\end{aligned}\n",
"$$\n",
"\n",
"where $ \\Lambda, \\Pi, \\Delta_h, \\Theta_h $ are matrices that pin down the household technology.\n",
"\n",
"We make the following\n",
"\n",
"**Assumption:** The absolute values of the eigenvalues of $ \\Delta_h $\n",
"are less than or equal to one.\n",
"\n",
"Below, we’ll outline further assumptions that we shall occasionally impose."
]
},
{
"cell_type": "markdown",
"id": "74db147b",
"metadata": {},
"source": [
"### Preferences\n",
"\n",
"Where $ b_t $ is a stochastic process of preference shocks that will play the role of demand shifters, the representative household orders\n",
"stochastic processes of consumption services $ s_t $ according to\n",
"\n",
"$$\n",
"\\Bigl( {1 \\over 2}\\Bigr) E \\sum_{t=0}^\\infty \\beta^t [ (s_t -\n",
"b_t) \\cdot ( s_t - b_t) + \\ell_t^2 ] \\bigl| J_0 , \\ 0 < \\beta < 1\n",
"$$\n",
"\n",
"We now proceed to give examples of production and household technologies that appear in various models that appear in the literature.\n",
"\n",
"First, we give examples of production Technologies\n",
"\n",
"$$\n",
"\\Phi_c c_t + \\Phi_g g_t + \\Phi_i i_t = \\Gamma k_{t-1} + d_t\n",
"$$\n",
"\n",
"$$\n",
"\\mid g_t \\mid \\leq \\ell_t\n",
"$$\n",
"\n",
"so we’ll be looking for specifications of the matrices $ \\Phi_c, \\Phi_g, \\Phi_i, \\Gamma, \\Delta_k, \\Theta_k $ that define them."
]
},
{
"cell_type": "markdown",
"id": "cddcd1a8",
"metadata": {},
"source": [
"### Endowment Economy\n",
"\n",
"There is a single consumption good that cannot be stored over time.\n",
"\n",
"In time period $ t $, there is an endowment $ d_t $ of this single\n",
"good.\n",
"\n",
"There is neither a capital stock, nor an intermediate good, nor a\n",
"rate of investment.\n",
"\n",
"So $ c_t = d_t $.\n",
"\n",
"To implement this specification, we can choose $ A_{22}, C_2 $, and\n",
"$ U_d $ to make $ d_t $ follow any of a variety of stochastic\n",
"processes.\n",
"\n",
"To satisfy our earlier rank assumption, we set:\n",
"\n",
"$$\n",
"c_t + i_t = d_{1t}\n",
"$$\n",
"\n",
"$$\n",
"g_t = \\phi_1 i_t\n",
"$$\n",
"\n",
"where $ \\phi_1 $ is a small positive number.\n",
"\n",
"To implement this\n",
"version, we set $ \\Delta_k = \\Theta_k = 0 $ and\n",
"\n",
"$$\n",
"\\Phi_c = \\begin{bmatrix} 1 \\\\ 0 \\\\ \\end{bmatrix},\n",
"\\Phi_i = \\begin{bmatrix} 1 \\\\ \\phi_1 \\\\ \\end{bmatrix} , \\ \\ \\Phi_g =\n",
"\\begin{bmatrix} 0 \\\\ -1 \\\\ \\end{bmatrix}, \\ \\ \\Gamma = \\begin{bmatrix}\n",
" 0 \\\\ 0 \\end{bmatrix}, \\ \\ d_t = \\begin{bmatrix} d_{1t}\n",
"\\\\ 0 \\end{bmatrix}\n",
"$$\n",
"\n",
"We can use this specification to create a linear-quadratic version of\n",
"Lucas’s (1978) asset pricing model."
]
},
{
"cell_type": "markdown",
"id": "703cd35f",
"metadata": {},
"source": [
"### Single-Period Adjustment Costs\n",
"\n",
"There is a single consumption good, a single intermediate good, and a\n",
"single investment good.\n",
"\n",
"The technology is described by\n",
"\n",
"$$\n",
"\\begin{aligned}\n",
"c_t &=\\gamma k_{t-1} + d_{1t} ,\\ \\ \\gamma > 0 \\\\\n",
"\\phi_1 i_t &= g_t + d_{2t}, \\ \\ \\phi_1 > 0 \\\\\n",
"\\ell^2_t &= g^2_t \\\\\n",
"k_t &= \\delta_k k_{t-1} + i_t ,\\ 0< \\delta_k < 1\n",
"\\end{aligned}\n",
"$$\n",
"\n",
"Set\n",
"\n",
"$$\n",
"\\Phi_c = \\begin{bmatrix}1 \\\\ 0 \\end{bmatrix} ,\\ \\Phi_g = \\begin{bmatrix}0 \\\\\n",
"-1 \\end{bmatrix}, \\ \\Phi_i = \\begin{bmatrix} 0 \\\\ \\phi_1 \\end{bmatrix}\n",
"$$\n",
"\n",
"$$\n",
"\\Gamma = \\begin{bmatrix} \\gamma \\\\ 0 \\end{bmatrix}, \\ \\Delta_k = \\delta_k,\n",
"\\ \\Theta_k = 1\n",
"$$\n",
"\n",
"We set $ A_{22}, C_2 $ and $ U_d $ to make\n",
"$ (d_{1t}, d_{2t})^\\prime = d_t $ follow a desired stochastic\n",
"process.\n",
"\n",
"Now we describe some examples of preferences, which as we have seen are ordered by\n",
"\n",
"$$\n",
"-\\left({1 \\over 2}\\right) E \\sum^\\infty_{t=0} \\beta^t \\left[ (s_t - b_t) \\cdot (s_t -\n",
"b_t) + (\\ell_t)^2 \\right] \\mid J_0 \\quad ,\\ 0 < \\beta < 1\n",
"$$\n",
"\n",
"where household services are produced via the household technology\n",
"\n",
"$$\n",
"h_t = \\Delta_h h_{t-1} + \\Theta_h c_t\n",
"$$\n",
"\n",
"$$\n",
"s_t = \\Lambda h_{t-1} + \\Pi c_t\n",
"$$\n",
"\n",
"and we make\n",
"\n",
"**Assumption:** The absolute values of the eigenvalues of $ \\Delta_h $\n",
"are less than or equal to one.\n",
"\n",
"Later we shall introduce **canonical** household technologies that satisfy an ‘invertibility’\n",
"requirement relating sequences $ \\{s_t\\} $ of services and\n",
"$ \\{c_t\\} $ of consumption flows.\n",
"\n",
"And we’ll describe how to obtain a canonical representation\n",
"of a household technology from one that is not canonical.\n",
"\n",
"Here are some examples of household preferences.\n",
"\n",
"**Time Separable preferences**\n",
"\n",
"$$\n",
"-{1\\over 2} E \\sum^\\infty_{t=0} \\beta^t \\left[ (c_t - b_t)^2 + \\ell_t^2\n",
"\\right] \\mid J_0 \\quad ,\\ 0 < \\beta < 1\n",
"$$\n",
"\n",
"**Consumer Durables**\n",
"\n",
"$$\n",
"h_t = \\delta_h h_{t-1} + c_t \\quad ,\\ 0 < \\delta_h < 1\n",
"$$\n",
"\n",
"Services at $ t $ are related to the stock of durables at the\n",
"beginning of the period:\n",
"\n",
"$$\n",
"s_t = \\lambda h_{t-1} \\ , \\ \\lambda > 0\n",
"$$\n",
"\n",
"Preferences are ordered by\n",
"\n",
"$$\n",
"-{1 \\over 2} E \\sum^\\infty_{t=0} \\beta^t \\left[(\\lambda h_{t-1} -\n",
"b_t)^2 + \\ell_t^2\\right] \\mid J_0\n",
"$$\n",
"\n",
"Set $ \\Delta_h = \\delta_h,\n",
"\\Theta_h =1, \\Lambda = \\lambda, \\Pi = 0 $.\n",
"\n",
"**Habit Persistence**\n",
"\n",
"$$\n",
"-\\Bigl({1\\over 2}\\Bigr)\\, E \\sum^\\infty_{t=0} \\beta^t \\Bigl[\\bigl(c_t - \\lambda\n",
" (1-\\delta_h) \\sum^\\infty_{j=0}\\, \\delta^j_h\\, c_{t-j-1}-b_t\\bigr)^2+\\ell^2_t\\Bigl] \\bigl| J_0\n",
"$$\n",
"\n",
"$$\n",
"0<\\beta < 1\\ ,\\ 0 < \\delta_h < 1\\ ,\\ \\lambda > 0\n",
"$$\n",
"\n",
"Here the effective bliss point $ b_t + \\lambda (1 - \\delta_h)\n",
"\\sum^\\infty_{j=0} \\delta^j_h\\, c_{t-j-1} $ shifts in response to a moving\n",
"average of past consumption.\n",
"\n",
"**Initial Conditions**\n",
"\n",
"Preferences of this form require an initial condition for the geometric\n",
"sum $ \\sum^\\infty_{j=0} \\delta_h^j c_{t - j-1} $ that we specify as\n",
"an initial condition for the ‘stock of household durables,’\n",
"$ h_{-1} $.\n",
"\n",
"\n",
"\n",
"Set\n",
"\n",
"$$\n",
"h_t = \\delta_h h_{t-1} + (1-\\delta_h) c_t \\quad ,\\ 0 < \\delta_h < 1\n",
"$$\n",
"\n",
"$$\n",
"h_t = (1 - \\delta_h) \\sum^t_{j=0} \\delta_h^j\\, c_{t-j} + \\delta^{t+1}_h\\,\n",
"h_{-1}\n",
"$$\n",
"\n",
"$$\n",
"s_t = - \\lambda h_{t-1} + c_t, \\ \\lambda > 0\n",
"$$\n",
"\n",
"To implement, set\n",
"$ \\Lambda = -\\lambda,\\ \\Pi = 1,\\ \\Delta_h = \\delta_h,\\ \\Theta_h=1-\\delta_h $.\n",
"\n",
"**Seasonal Habit Persistence**\n",
"\n",
"$$\n",
"-\\Bigl({1\\over 2}\\Bigr) \\, E \\sum^\\infty_{t=0} \\beta^t \\Bigl[\\bigl(c_t - \\lambda\n",
" (1-\\delta_h) \\sum^\\infty_{j=0}\\, \\delta^{j}_h\\, c_{t-4j-4}-b_t\\bigr)^2+\\ell^2_t\\Bigr]\n",
"$$\n",
"\n",
"$$\n",
"0<\\beta < 1\\ ,\\ 0 < \\delta_h < 1\\ ,\\ \\lambda > 0\n",
"$$\n",
"\n",
"Here the effective bliss point $ b_t + \\lambda (1 - \\delta_h) \\sum^\\infty_{j=0} \\delta^j_h\\, c_{t-4j-4} $ shifts in response to a\n",
"moving average of past consumptions of the same quarter.\n",
"\n",
"To implement, set\n",
"\n",
"$$\n",
"\\tilde h_t = \\delta_h \\tilde h_{t-4} + (1-\\delta_h) c_t \\quad ,\\ 0 < \\delta_h < 1\n",
"$$\n",
"\n",
"This implies that\n",
"\n",
"$$\n",
"h_t = \\begin{bmatrix}\\tilde h_t \\\\\n",
" \\tilde h_{t-1}\\\\\n",
" \\tilde h_{t-2}\\\\\n",
" \\tilde h_{t-3}\\end{bmatrix} =\n",
" \\begin{bmatrix} 0 & 0 & 0 & \\delta_h \\\\\n",
" 1 & 0 & 0 & 0 \\\\\n",
" 0 & 1 & 0 & 0 \\\\\n",
" 0 & 0 & 1 & 0 \\end{bmatrix}\n",
" \\begin{bmatrix} \\tilde h_{t-1} \\\\ \\tilde h_{t-2} \\\\ \\tilde h_{t-3} \\\\ \\tilde h_{t-4} \\end{bmatrix}\n",
" + \\begin{bmatrix}(1 - \\delta_h) \\\\ 0 \\\\ 0 \\\\ 0 \\end{bmatrix} c_t\n",
"$$\n",
"\n",
"with consumption services\n",
"\n",
"$$\n",
"s_t = - \\begin{bmatrix}0 & 0 & 0 & -\\lambda\\end{bmatrix} h_{t-1} + c_t \\quad , \\ \\lambda > 0\n",
"$$\n",
"\n",
"**Adjustment Costs**.\n",
"\n",
"Recall\n",
"\n",
"$$\n",
"-\\Bigl({1 \\over 2}\\Bigr) E \\sum^\\infty_{t=0} \\beta^t [(c_t - b_{1t})^2 +\n",
"\\lambda^2 (c_t - c_{t-1})^2 + \\ell^2_t ] \\mid J_0\n",
"$$\n",
"\n",
"$$\n",
"0 < \\beta < 1 \\quad, \\ \\lambda > 0\n",
"$$\n",
"\n",
"To capture adjustment costs, set\n",
"\n",
"$$\n",
"h_t = c_t\n",
"$$\n",
"\n",
"$$\n",
"s_t = \\begin{bmatrix} 0 \\\\ - \\lambda \\end{bmatrix} h_{t-1} +\n",
"\\begin{bmatrix} 1 \\\\ \\lambda \\end{bmatrix} c_t\n",
"$$\n",
"\n",
"so that\n",
"\n",
"$$\n",
"s_{1t} = c_t\n",
"$$\n",
"\n",
"$$\n",
"s_{2t} = \\lambda (c_t - c_{t-1} )\n",
"$$\n",
"\n",
"We set the first component $ b_{1t} $ of $ b_t $ to capture the\n",
"stochastic bliss process and set the second component identically equal\n",
"to zero.\n",
"\n",
"Thus, we set $ \\Delta_h = 0, \\Theta_h = 1 $\n",
"\n",
"$$\n",
"\\Lambda = \\begin{bmatrix} 0 \\\\ -\\lambda \\end{bmatrix}\\ ,\\ \\Pi =\n",
"\\begin{bmatrix} 1 \\\\ \\lambda \\end{bmatrix}\n",
"$$\n",
"\n",
"**Multiple Consumption Goods**\n",
"\n",
"$$\n",
"\\Lambda = \\begin{bmatrix} 0\\\\0\\end{bmatrix} \\ \\hbox { and } \\ \\Pi =\n",
"\\begin{bmatrix}\\pi_1 & 0 \\\\ \\pi_2 & \\pi_3 \\end{bmatrix}\n",
"$$\n",
"\n",
"$$\n",
"-{1 \\over 2} \\beta^t (\\Pi c_t - b_t)^\\prime (\\Pi c_t - b_t)\n",
"$$\n",
"\n",
"$$\n",
"\\mu_t= - \\beta^t [\\Pi^\\prime \\Pi\\, c_t - \\Pi^\\prime\\, b_t]\n",
"$$\n",
"\n",
"$$\n",
"c_t = - (\\Pi^\\prime \\Pi)^{-1} \\beta^{-t} \\mu_t + (\\Pi^\\prime \\Pi)^{-1}\n",
"\\Pi^\\prime b_t\n",
"$$\n",
"\n",
"This is called the **Frisch demand function** for consumption.\n",
"\n",
"We can think of the vector $ \\mu_t $ as playing the role of prices,\n",
"up to a common factor, for all dates and states.\n",
"\n",
"The scale factor is\n",
"determined by the choice of numeraire.\n",
"\n",
"Notions of **substitutes and complements** can be defined in terms of these\n",
"Frisch demand functions.\n",
"\n",
"Two goods can be said to be **substitutes** if the\n",
"cross-price effect is positive and to be **complements** if this effect is\n",
"negative.\n",
"\n",
"Hence this classification is determined by the off-diagonal\n",
"element of $ -(\\Pi^\\prime \\Pi)^{-1} $, which is equal to\n",
"$ \\pi_2 \\pi_3 /\\det\n",
"(\\Pi^\\prime \\Pi) $.\n",
"\n",
"If $ \\pi_2 $ and $ \\pi_3 $ have the same\n",
"sign, the goods are substitutes.\n",
"\n",
"If they have opposite signs, the goods\n",
"are complements.\n",
"\n",
"To summarize, our economic structure consists of the matrices that define the following components:\n",
"\n",
"**Information and shocks**\n",
"\n",
"$$\n",
"\\begin{aligned}\n",
"z_{t+1} &=A_{22} z_t + C_2 w_{t+1}\n",
"\\\\ b_t &= U_b z_t \\\\ d_t &= U_d z_t\n",
"\\end{aligned}\n",
"$$\n",
"\n",
"**Production Technology**\n",
"\n",
"$$\n",
"\\begin{aligned}\n",
"\\Phi_c c_t &+ \\Phi_g g_t + \\Phi_i i_t = \\Gamma k_{t-1} + d_t \\\\\n",
"k_t &=\\Delta_k k_{t-1} + \\Theta_k i_t \\\\ g_t \\cdot g_t &=\\ell_t^2\n",
"\\end{aligned}\n",
"$$\n",
"\n",
"**Household Technology**\n",
"\n",
"$$\n",
"\\begin{aligned}\n",
"s_t &=\n",
"\\Lambda h_{t-1} + \\Pi c_t \\\\ h_t &= \\Delta_h h_{t-1} + \\Theta_h c_t\n",
"\\end{aligned}\n",
"$$\n",
"\n",
"**Preferences**\n",
"\n",
"$$\n",
"\\Bigl( {1 \\over 2}\\Bigr) E \\sum_{t=0}^\\infty \\beta^t [ (s_t -\n",
"b_t) \\cdot ( s_t - b_t) + \\ell_t^2 ] \\bigl| J_0 , \\ 0 < \\beta < 1\n",
"$$\n",
"\n",
"**Next steps:** we move on to discuss two closely connected concepts\n",
"\n",
"- A Planning Problem or Optimal Resource Allocation Problem \n",
"- Competitive Equilibrium "
]
},
{
"cell_type": "markdown",
"id": "0dbfe289",
"metadata": {},
"source": [
"### Optimal Resource Allocation\n",
"\n",
"Imagine a planner who chooses sequences $ \\{c_t, i_t, g_t\\}_{t=0}^\\infty $ to maximize\n",
"\n",
"$$\n",
"-(1/2)E \\sum_{t=0}^\\infty \\beta^t [ (s_t - b_t) \\cdot (s_t - b_t) + g_t \\cdot g_t ] \\bigl| J_0\n",
"$$\n",
"\n",
"subject to the constraints\n",
"\n",
"$$\n",
"\\begin{aligned}\n",
"\\Phi_c c_t &+ \\Phi_g \\, g_t + \\Phi_i i_t = \\Gamma k_{t-1} + d_t,\n",
"\\\\\n",
"k_t &= \\Delta_k k_{t-1} + \\Theta_k i_t , \\\\\n",
"h_t &= \\Delta_h h_{t-1} + \\Theta_h c_t , \\\\\n",
"s_t &=\\Lambda h_{t-1} + \\Pi c_t , \\\\\n",
" z _{t+1} &= A_{22} z_t + C_2 w_{t+1} , \\ b_t = U_b z_t, \\ \\hbox{ and } \\\n",
"d_t = U_d z_t\n",
"\\end{aligned}\n",
"$$\n",
"\n",
"and initial conditions for $ h_{-1}, k_{-1} $, and $ z_0 $.\n",
"\n",
"Throughout, we shall impose the following **square summability** conditions\n",
"\n",
"$$\n",
"E \\sum^\\infty_{t=0} \\beta^t h_t \\cdot h_t \\mid J_0 < \\infty\\ \\hbox { and }\\\n",
"E \\sum^\\infty_{t=0} \\beta^t k_t \\cdot k_t \\mid J_0 < \\infty\n",
"$$\n",
"\n",
"Define:\n",
"\n",
"$$\n",
"L_0^2 = [ \\{ y_t \\} : y_t \\ \\hbox{is a random\n",
"variable in } \\ J_t \\ \\hbox{ and } \\ E \\sum_{t=0}^\\infty \\beta^t\n",
"y_t^2 \\mid J_0 < + \\infty]\n",
"$$\n",
"\n",
"Thus, we require that each component of $ h_t $ and each component of\n",
"$ k_t $ belong to $ L_0^2 $.\n",
"\n",
"We shall compare and utilize two approaches to solving the planning problem\n",
"\n",
"- Lagrangian formulation \n",
"- Dynamic programming "
]
},
{
"cell_type": "markdown",
"id": "ad44ab76",
"metadata": {},
"source": [
"### Lagrangian Formulation\n",
"\n",
"Form the Lagrangian\n",
"\n",
"$$\n",
"\\begin{aligned}\n",
"{\\mathcal L} &= - E \\sum_{t=0}^\\infty \\beta^t \\biggl[\n",
"\\Bigl( {1 \\over 2} \\Bigr) [ (s_t - b_t) \\cdot (s_t - b_t) + g_t\n",
"\\cdot g_t] \\\\ &+ {\\cal M}_t^{d \\prime} \\cdot ( \\Phi _cc_t +\n",
"\\Phi_gg_t + \\Phi_ii_t - \\Gamma k_{t-1} - d_t ) \\\\ &+{\\cal M}_t^{k\n",
"\\prime} \\cdot (k_t - \\Delta_k k_{t-1} - \\Theta_k i_t ) \\\\ &+ {\\cal\n",
"M}_t^{h \\prime} \\cdot (h_t - \\Delta_h h_{t-1} - \\Theta_h c_t) \\\\ &+\n",
"{\\cal M}_t^{s \\prime} \\cdot (s_t - \\Lambda h_{t-1} - \\Pi c_t )\n",
"\\biggr] \\Bigl| J_0\n",
"\\end{aligned}\n",
"$$\n",
"\n",
"The planner maximizes $ {\\mathcal L} $ with respect to the quantities $ \\{c_t, i_t, g_t\\}_{t=0}^\\infty $\n",
"and minimizes with respect to the Lagrange multipliers $ {\\cal M}_t^d, {\\cal M}_t^k, {\\cal M}_t^h, {\\cal M}_t^s $.\n",
"\n",
"First-order necessary conditions for maximization with respect to\n",
"$ c_t, g_t,\n",
"h_t, i_t, k_t $, and $ s_t $, respectively, are:\n",
"\n",
"$$\n",
"\\begin{aligned}\n",
"-\\Phi_c^\\prime {\\cal M}_t^d &+\\Theta_h^\\prime {\\cal\n",
"M}_t^h + \\Pi^\\prime {\\cal M}_t^s = 0 , \\\\\n",
"&- g_t - \\Phi_g^\\prime {\\cal M}_t^d = 0 , \\\\\n",
"-{\\cal M}_t^h &+ \\beta E ( \\Delta_h^\\prime {\\cal M}^h_{t+1} +\n",
"\\Lambda^\\prime {\\cal M}_{t+1}^s ) \\mid J_t = 0 , \\\\\n",
"&- \\Phi_i^\\prime {\\cal M}_t^d + \\Theta_k^\\prime {\\cal M}_t^k = 0 , \\\\\n",
"-{\\cal M}_t^k &+ \\beta E ( \\Delta_k^\\prime {\\cal M}^k_{t+1} + \\Gamma^\\prime\n",
"{\\cal M}_{t+1}^d) \\mid J_t = 0 , \\\\\n",
"&- s_t + b_t - {\\cal M}_t^s = 0\n",
"\\end{aligned}\n",
"$$\n",
"\n",
"for $ t=0,1, \\ldots $.\n",
"\n",
"In addition, we have the complementary\n",
"slackness conditions (these recover the original transition equations)\n",
"and also transversality conditions\n",
"\n",
"$$\n",
"\\begin{aligned}\n",
"\\lim_{t \\to \\infty}& \\beta^t E [ {\\cal M}_t^{k \\prime} k_t ]\n",
"\\mid J_0 = 0 \\\\\n",
"\\lim_{t \\to \\infty}& \\beta^t E [ {\\cal M}_t^{h \\prime} h_t ]\n",
"\\mid J_0 = 0\n",
"\\end{aligned}\n",
"$$\n",
"\n",
"The system formed by the FONCs and the transition equations can be handed over to Python.\n",
"\n",
"Python will solve the planning problem for fixed parameter values.\n",
"\n",
"Here are the **Python Ready Equations**\n",
"\n",
"$$\n",
"\\begin{aligned}\n",
"-\\Phi_c^\\prime {\\cal M}_t^d &+\\Theta_h^\\prime {\\cal\n",
"M}_t^h + \\Pi^\\prime {\\cal M}_t^s = 0 , \\\\\n",
"&- g_t - \\Phi_g^\\prime {\\cal M}_t^d = 0 , \\\\\n",
"- {\\cal M}_t^h &+ \\beta E ( \\Delta_h^\\prime {\\cal M}^h_{t+1} +\n",
"\\Lambda^\\prime {\\cal M}_{t+1}^s ) \\mid J_t = 0 , \\\\\n",
"&- \\Phi_i^\\prime {\\cal M}_t^d + \\Theta_k^\\prime {\\cal M}_t^k = 0 , \\\\\n",
"-{\\cal M}_t^k &+ \\beta E ( \\Delta_k^\\prime {\\cal M}^k_{t+1} + \\Gamma^\\prime\n",
"{\\cal M}_{t+1}^d) \\mid J_t = 0 , \\\\\n",
"&- s_t + b_t - {\\cal M}_t^s = 0 \\\\\n",
"\\Phi_c c_t &+ \\Phi_g \\, g_t + \\Phi_i i_t = \\Gamma k_{t-1} + d_t,\n",
"\\\\\n",
"k_t &= \\Delta_k k_{t-1} + \\Theta_k i_t , \\\\\n",
"h_t &= \\Delta_h h_{t-1} + \\Theta_h c_t , \\\\\n",
"s_t &=\\Lambda h_{t-1} + \\Pi c_t , \\\\\n",
"z _{t+1} &= A_{22} z_t + C_2 w_{t+1} , \\ b_t = U_b z_t, \\ \\hbox{ and } \\\n",
"d_t = U_d z_t\n",
"\\end{aligned}\n",
"$$\n",
"\n",
"The Lagrange multipliers or **shadow prices** satisfy\n",
"\n",
"$$\n",
"{\\cal M}_t^s = b_t - s_t\n",
"$$\n",
"\n",
"$$\n",
"{\\cal M}_t^h = E \\biggl[ \\sum_{\\tau =1}^\\infty \\beta^\\tau\n",
"(\\Delta_h^\\prime)^{\\tau - 1} \\Lambda^\\prime {\\cal M}_{t+ \\tau}^s\n",
"\\mid J_t\\biggr]\n",
"$$\n",
"\n",
"$$\n",
"{\\cal M}_t^d = \\begin{bmatrix}\\Phi_c^\\prime\\\\ \\Phi_g^\\prime\\\\\\end{bmatrix}^{-1}\\\n",
"\\begin{bmatrix} \\Theta_h^\\prime {\\cal M}_t^h + \\Pi^\\prime {\\cal M}_t^s \\\\\n",
"-g_t \\end{bmatrix}\n",
"$$\n",
"\n",
"$$\n",
"{\\cal M}_t^k = E \\biggl[\\sum _{\\tau=1}^\\infty \\beta^\\tau (\\Delta_k^\\prime)^{\\tau-1}\n",
"\\Gamma^\\prime {\\cal M}_{t+ \\tau}^d \\mid J_t\\biggr]\n",
"$$\n",
"\n",
"$$\n",
"{\\cal M}_t^i =\n",
"\\Theta _k^\\prime {\\cal M}_t^k\n",
"$$\n",
"\n",
"Although it is possible to use matrix operator methods to solve the above **Python ready equations**, that is not\n",
"the approach we’ll use.\n",
"\n",
"Instead, we’ll use dynamic programming to get recursive representations for both quantities and shadow prices."
]
},
{
"cell_type": "markdown",
"id": "16f35975",
"metadata": {},
"source": [
"### Dynamic Programming\n",
"\n",
"Dynamic Programming always starts with the word **let**.\n",
"\n",
"Thus, let $ V(x_0) $ be the optimal value function for the planning problem as a function of the initial state vector $ x_0 $.\n",
"\n",
"(Thus, in essence, dynamic programming amounts to an application of a **guess and verify** method in which we begin with a guess about the answer\n",
"to the problem we want to solve. That’s why we start with **let** $ V(x_0) $ be the (value of the) answer to the problem, then establish and\n",
"verify a bunch of conditions $ V(x_0) $ has to satisfy if indeed it is the answer)\n",
"\n",
"The optimal value function $ V(x) $ satisfies the **Bellman equation**\n",
"\n",
"$$\n",
"V(x_0) = \\max_{c_0, i_0, g_0} [ - .5 [ (s_0 - b_0) \\cdot (s_0 - b_0) + g_0 \\cdot g_0 ] + \\beta E V\n",
"(x_1) ]\n",
"$$\n",
"\n",
"subject to the linear constraints\n",
"\n",
"$$\n",
"\\begin{aligned}\n",
"\\Phi _cc_0 &+ \\Phi_g g_0 + \\Phi_ii_0 = \\Gamma k_{-1} + d_0 ,\\\\\n",
"k_0 &= \\Delta_k k_{-1} + \\Theta_k i_0 , \\\\\n",
"h_0 &= \\Delta_h h_{-1} + \\Theta_h c_0 , \\\\\n",
"s_0 &= \\Lambda h_{-1} + \\Pi c_0 , \\\\\n",
"z_1 &= A_{22} z_0 + C_2 w_1,\\ b_0 = U_b z_0 \\ \\hbox{ and }\\ d_0 =\n",
"U_d z_0\n",
"\\end{aligned}\n",
"$$\n",
"\n",
"Because this is a linear-quadratic dynamic programming problem, it turns out that the value function has the form\n",
"\n",
"$$\n",
"V(x) = x' P x + \\rho\n",
"$$\n",
"\n",
"\n",
"\n",
"Thus, we want to solve an instance of the following linear-quadratic dynamic programming problem:\n",
"\n",
"Choose a contingency plan for $ \\{x_{t+1}, u_t \\}_{t=0}^\\infty $ to\n",
"maximize\n",
"\n",
"$$\n",
"- E \\sum_{t=0}^\\infty \\beta^t [ x_t^\\prime R x_t + u_t^\\prime Q\n",
"u_t + 2 u_t^\\prime W' x_t ], \\ 0 < \\beta < 1\n",
"$$\n",
"\n",
"subject to\n",
"\n",
"$$\n",
"x_{t+1} = A x_t + B u_t + C w_{t+1}, \\ t \\geq 0\n",
"$$\n",
"\n",
"where $ x_0 $ is given; $ x_t $ is an $ n \\times 1 $ vector\n",
"of state variables, and $ u_t $ is a $ k \\times 1 $ vector of\n",
"control variables.\n",
"\n",
"We assume $ w_{t+1} $ is a martingale difference\n",
"sequence with $ E w_t w_t^\\prime = I $, and that $ C $ is a\n",
"matrix conformable to $ x $ and $ w $.\n",
"\n",
"The optimal value function $ V(x) $ satisfies the Bellman equation\n",
"\n",
"$$\n",
"V (x_t) = \\max_{u_t} \\Bigl\\{-( x_t^\\prime R x_t + u_t^\\prime Q u_t + 2\n",
"u_t^\\prime W x_t) + \\beta E_t V (x_{t+1}) \\Bigr\\}\n",
"$$\n",
"\n",
"where maximization is subject to\n",
"\n",
"$$\n",
"x_{t+1} = A x_t + B u_t + C w_{t+1}, \\ t \\geq 0\n",
"$$\n",
"\n",
"$$\n",
"V(x_t) = - x_t^\\prime P x_t - \\rho\n",
"$$\n",
"\n",
"$ P $ satisfies\n",
"\n",
"$$\n",
"P = R + \\beta A^\\prime P A - (\\beta A^\\prime P\n",
"B + W) (Q + \\beta B^\\prime P B)^{-1} (\\beta B^\\prime P\n",
"A + W')\n",
"$$\n",
"\n",
"This equation in $ P $ is called the **algebraic matrix Riccati\n",
"equation**.\n",
"\n",
"The optimal decision rule is $ u_t = - F x_t $, where\n",
"\n",
"$$\n",
"F = (Q + \\beta B^\\prime P B)^{-1} (\\beta B^\\prime P A +\n",
"W')\n",
"$$\n",
"\n",
"The optimum decision rule for $ u_t $ is independent of the\n",
"parameters $ C $, and so of the noise statistics.\n",
"\n",
"Iterating on the Bellman operator leads to\n",
"\n",
"$$\n",
"V_{j+1} (x_t) = \\max_{u_t} \\Bigl\\{-( x_t^\\prime R x_t + u_t^\\prime Q\n",
"u_t + 2 u_t^\\prime W x_t) + \\beta E_t V_j (x_{t+1}) \\Bigr\\}\n",
"$$\n",
"\n",
"$$\n",
"V_j (x_t) =- x_t^\\prime P_{j} x_t - \\rho_{j}\n",
"$$\n",
"\n",
"where $ P_{j} $ and $ \\rho_{j} $ satisfy the equations\n",
"\n",
"$$\n",
"\\begin{aligned}\n",
"P_{j+1} &= R + \\beta A^\\prime P_{j} A - (\\beta\n",
"A^\\prime P_{j} B + W) (Q + \\beta B^\\prime P_{j} B)^{-1} (\\beta B^\\prime P_{j}\n",
"A + W')\\\\ \\rho_{j+1} &=\\beta \\rho_{j} + \\beta \\ {\\rm trace} \\ P_{j} C C^\\prime\n",
"\\end{aligned}\n",
"$$\n",
"\n",
"We can now state the planning problem as a dynamic programming problem\n",
"\n",
"$$\n",
"\\max_{ \\{u_t, x_{t+1}\\} }\\ - E \\sum_{t=0}^\\infty \\beta^t [x_t^\\prime\n",
"Rx_t + u_t^\\prime Q u_t + 2u_t^\\prime W 'x_t ] , \\quad 0 < \\beta < 1\n",
"$$\n",
"\n",
"where maximization is subject to\n",
"\n",
"$$\n",
"x_{t+1} = Ax_t + B u_t + Cw_{t+1} , \\ t \\geq 0\n",
"$$\n",
"\n",
"$$\n",
"x_t = \\begin{bmatrix} h_{t-1} \\\\ k_{t-1} \\\\ z_t \\end{bmatrix} , \\qquad\n",
"u_t = i_t\n",
"$$\n",
"\n",
"where\n",
"\n",
"$$\n",
"\\begin{aligned}\n",
"A &=\\begin{bmatrix} \\Delta_h & \\Theta_h U_c [ \\Phi_c \\ \\\n",
"\\Phi_g]^{-1} \\Gamma & \\Theta_h U_c [ \\Phi_c \\ \\ \\Phi_g]^{-1} U_d \\\\ 0\n",
"& \\Delta_k & 0 \\\\ 0 & 0 & A_{22} \\\\ \\end{bmatrix} \\\\\n",
"B &= \\begin{bmatrix} - \\Theta_h U_c [ \\Phi_c \\ \\ \\Phi_g]^{-1} \\Phi_i\n",
"\\\\ \\Theta_k \\\\ 0 \\end{bmatrix} \\ ,\\ C = \\begin{bmatrix} 0 \\\\ 0 \\\\\n",
"C_2 \\end{bmatrix}\n",
"\\end{aligned}\n",
"$$\n",
"\n",
"$$\n",
"\\begin{bmatrix} x_t \\\\ u_t \\end{bmatrix}^\\prime S \\begin{bmatrix} x_t\n",
"\\\\ u_t \\end{bmatrix} = \\begin{bmatrix} x_t \\\\ u_t \\end{bmatrix}^\\prime\\ \\\n",
"\\begin{bmatrix} R & W \\\\ W' & Q \\end{bmatrix}\\ \\ \\begin{bmatrix} x_t\n",
"\\\\ u_t \\end{bmatrix}\n",
"$$\n",
"\n",
"$$\n",
"S = (G^\\prime G + H^\\prime H) / 2\n",
"$$\n",
"\n",
"$$\n",
"H = [\\Lambda \\ \\vdots \\ \\Pi U_c [ \\Phi_c \\ \\ \\Phi_g]^{-1} \\Gamma \\\n",
"\\vdots \\ \\Pi U_c [ \\Phi_c \\ \\ \\Phi_g]^{-1} U_d - U_b \\ \\vdots \\\n",
" - \\Pi U_c [\\Phi_c \\ \\ \\Phi_g]^{-1} \\Phi_i]\n",
"$$\n",
"\n",
"$$\n",
"G =\n",
"U_g [ \\Phi_c \\ \\ \\Phi_g]^{-1} [0 \\ \\vdots \\ \\Gamma \\ \\vdots \\ U_d \\\n",
"\\vdots \\ - \\Phi_i] .\n",
"$$\n",
"\n",
"**Lagrange multipliers as gradient of value function**\n",
"\n",
"A useful fact is that Lagrange multipliers equal gradients of the planner’s value function\n",
"\n",
"$$\n",
"\\begin{aligned}\n",
"{\\mathcal M}_t^k &= M_k x_t\\ \\hbox{ and }\\ {\\cal M}_t^h = M_h\n",
"x_t \\ \\hbox{ where } \\\\\n",
"M_k &= 2 \\beta [ 0 \\ I \\ 0 ] P A^o \\\\\n",
"M_h &= 2 \\beta [ I \\ 0 \\ 0 ] P A^o\n",
"\\end{aligned}\n",
"$$\n",
"\n",
"$$\n",
"{\\mathcal M}_t^s = M_s x_t \\ \\hbox{ where }\\ M_s = (S_b -\n",
"S_s)\\ \\hbox{ and } \\ S_b = [ 0 \\ 0 \\ U_b ]\n",
"$$\n",
"\n",
"$$\n",
"{\\mathcal M}_t^d = M_d x_t\\ \\hbox{ where }\\ M_d = \\begin{bmatrix}\n",
"\\Phi_c^\\prime \\\\ \\Phi_g^\\prime \\\\ \\end{bmatrix} ^{-1}\n",
"\\begin{bmatrix}\\Theta_h^\\prime M_h + \\Pi^\\prime M_s \\\\ -S_g \\end{bmatrix}\n",
"$$\n",
"\n",
"$$\n",
"{\\mathcal M}_t^c = M_c x_t\\ \\hbox{ where }\\ M_c = \\Theta_h^\\prime\n",
"M_h + \\Pi^\\prime M_s\n",
"$$\n",
"\n",
"$$\n",
"{\\mathcal M}_t^i = M_i x_t\\ \\hbox{ where } \\ M_i = \\Theta_k^\\prime M_k\n",
"$$\n",
"\n",
"We will use this fact and these equations to compute competitive equilibrium prices."
]
},
{
"cell_type": "markdown",
"id": "b304e32e",
"metadata": {},
"source": [
"### Other mathematical infrastructure\n",
"\n",
"Let’s start with describing the **commodity space** and **pricing functional** for our competitive equilibrium.\n",
"\n",
"For the **commodity space**, we use\n",
"\n",
"$$\n",
"L_0^2 = [ \\{ y_t \\} : y_t \\ \\hbox{is a random\n",
"variable in } \\ J_t \\ \\hbox{ and } \\ E \\sum_{t=0}^\\infty \\beta^t\n",
"y_t^2 \\mid J_0 < + \\infty]\n",
"$$\n",
"\n",
"For **pricing functionals**, we express values as inner products\n",
"\n",
"$$\n",
"\\pi (c) = E \\sum_{t=0}^\\infty \\beta^t p_t^0 \\cdot c_t \\mid J_0\n",
"$$\n",
"\n",
"where $ p_t^0 $ belongs to $ L_0^2 $.\n",
"\n",
"With these objects in our toolkit, we move on to state the\n",
"problem of a **Representative Household in a competitive equilibrium**."
]
},
{
"cell_type": "markdown",
"id": "2f7bc8ee",
"metadata": {},
"source": [
"### Representative Household\n",
"\n",
"The representative household owns endowment process and initial stocks of $ h $ and $ k $ and\n",
"chooses stochastic processes for $ \\{c_t,\\, s_t,\\, h_t,\\,\n",
"\\ell_t\\}^\\infty_{t=0} $, each element of which is in $ L^2_0 $, to\n",
"maximize\n",
"\n",
"$$\n",
"-\\ {1 \\over 2}\\ E_0 \\sum^\\infty_{t=0} \\beta^t\\, \\Bigl[(s_t-b_t) \\cdot (s_t -\n",
"b_t) + \\ell_t^2\\Bigr]\n",
"$$\n",
"\n",
"subject to\n",
"\n",
"$$\n",
"E\\sum^\\infty_{t=0} \\beta^t\\, p^0_t \\cdot c_t \\mid J_0 = E \\sum^\\infty_{t=0}\n",
"\\beta^t\\, (w^0_t \\ell_t + \\alpha^0_t \\cdot d_t) \\mid J_0 +\n",
"v_0 \\cdot k_{-1}\n",
"$$\n",
"\n",
"$$\n",
"s_t = \\Lambda h_{t-1} + \\Pi c_t\n",
"$$\n",
"\n",
"$$\n",
"h_t = \\Delta_h h_{t-1} + \\Theta_h c_t, \\quad h_{-1}, k_{-1}\\\n",
"\\hbox{ given}\n",
"$$\n",
"\n",
"We now describe the problems faced by two types of firms called type I and type II."
]
},
{
"cell_type": "markdown",
"id": "8ce951b1",
"metadata": {},
"source": [
"### Type I Firm\n",
"\n",
"A type I firm rents capital and labor and endowments and produces\n",
"$ c_t, i_t $.\n",
"\n",
"It chooses stochastic processes for\n",
"$ \\{c_t, i_t, k_t, \\ell_t,\n",
"g_t, d_t\\} $, each element of which is in $ L^2_0 $, to maximize\n",
"\n",
"$$\n",
"E_0\\, \\sum^\\infty_{t=0} \\beta^t\\, (p^0_t \\cdot c_t + q^0_t \\cdot i_t - r^0_t\n",
"\\cdot k_{t-1} - w^0_t \\ell_t - \\alpha^0_t \\cdot d_t)\n",
"$$\n",
"\n",
"subject to\n",
"\n",
"$$\n",
"\\Phi_c\\, c_t + \\Phi_g\\, g_t + \\Phi_i\\, i_t = \\Gamma k_{t-1} + d_t\n",
"$$\n",
"\n",
"$$\n",
"-\\, \\ell_t^2 + g_t \\cdot g_t = 0\n",
"$$"
]
},
{
"cell_type": "markdown",
"id": "b8774d27",
"metadata": {},
"source": [
"### Type II Firm\n",
"\n",
"A firm of type II acquires capital via investment and then rents\n",
"stocks of capital to the $ c,i $-producing type I firm.\n",
"\n",
"A type II firm is a price taker facing the vector $ v_0 $ and the stochastic\n",
"processes $ \\{r^0_t, q^0_t\\} $.\n",
"\n",
"The firm chooses $ k_{-1} $ and\n",
"stochastic processes for $ \\{k_t, i_t\\}^\\infty_{t=0} $ to maximize\n",
"\n",
"$$\n",
"E \\sum^\\infty_{t=0} \\beta^t (r_t^0 \\cdot k_{t-1} - q^0_t \\cdot i_t) \\mid\n",
"J_0 - v_0 \\cdot k_{-1}\n",
"$$\n",
"\n",
"subject to\n",
"\n",
"$$\n",
"k_t = \\Delta_k k_{t-1} + \\Theta_k i_t\n",
"$$"
]
},
{
"cell_type": "markdown",
"id": "111498e0",
"metadata": {},
"source": [
"### Competitive Equilibrium: Definition\n",
"\n",
"We can now state the following.\n",
"\n",
"**Definition:** A competitive equilibrium is a price system\n",
"$ [v_0, \\{p^0_t, w^0_t, \\alpha^0_t, q^0_t, r^0_t\\}^\\infty_{t=0}] $\n",
"and an allocation $ \\{c_t, i_t, k_t, h_t, g_t, d_t\\}^\\infty_{t=0} $\n",
"that satisfy the following conditions:\n",
"\n",
"- Each component of the price system and the allocation resides in the space $ L^2_0 $. \n",
"- Given the price system and given $ h_{-1},\\, k_{-1} $, the allocation solves the representative household’s problem and\n",
" the problems of the two types of firms. \n",
"\n",
"\n",
"Versions of the two classical welfare theorems prevail under our assumptions.\n",
"\n",
"We exploit that fact in our algorithm for computing a competitive equilibrium.\n",
"\n",
"**Step 1:** Solve the planning problem by using dynamic programming.\n",
"\n",
"The allocation (i.e., **quantities**) that solve the planning problem **are** the\n",
"competitive equilibrium quantities.\n",
"\n",
"**Step 2:** use the following formulas to compute the **equilibrium price system**\n",
"\n",
"$$\n",
"p^0_t = \\bigl[\\Pi^\\prime {\\cal M}^s_t + \\Theta^\\prime_h {\\cal M}^h_t\\bigr]/\n",
"\\mu^w_0 = {\\cal M}^c_t / \\mu^w_0\n",
"$$\n",
"\n",
"$$\n",
"w^0_t = \\mid S_g x_t \\mid / \\mu^w_0\n",
"$$\n",
"\n",
"$$\n",
"r^0_t = \\Gamma^\\prime {\\cal M}^d_t / \\mu^w_0\n",
"$$\n",
"\n",
"$$\n",
"q^0_t = \\Theta^\\prime_k {\\cal M}^k_t / \\mu^w_0 = {\\cal M}^i_t /\n",
"\\mu^w_0\n",
"$$\n",
"\n",
"$$\n",
"\\alpha^0_t = {\\cal M}^d_t / \\mu^w_0\n",
"$$\n",
"\n",
"$$\n",
"v_0 = \\Gamma^\\prime {\\cal M}^d_0 / \\mu^w_0 + \\Delta^\\prime_k\n",
"{\\cal M}^k_0 / \\mu^w_0\n",
"$$\n",
"\n",
"**Verification:** With this price system, values can be assigned to the Lagrange\n",
"multipliers for each of our three classes of agents that cause all\n",
"first-order necessary conditions to be satisfied at these prices and at\n",
"the quantities associated with the optimum of the planning problem."
]
},
{
"cell_type": "markdown",
"id": "64977e10",
"metadata": {},
"source": [
"### Asset pricing\n",
"\n",
"An important use of an equilibrium pricing system is to do asset pricing.\n",
"\n",
"Thus, imagine that we are presented a dividend stream: $ \\{y_t\\} \\in L^2_0 $\n",
"and want to compute the value of a perpetual claim to this stream.\n",
"\n",
"To value this asset we simply take **price times quantity** and add to get\n",
"an asset value: $ a_0 = E\\, \\sum_{t=0}^\\infty\\, \\beta^t\\ p_t^0 \\cdot y_t \\mid J_0 $.\n",
"\n",
"To compute $ ao $ we proceed as follows.\n",
"\n",
"We let\n",
"\n",
"$$\n",
"y_t = U_a\\, x_t\n",
"$$\n",
"\n",
"$$\n",
"a_0 = E \\sum^\\infty_{t=0}\\, \\beta^t\\, x^\\prime_t\\, Z_a x_t \\mid J_0\n",
"$$\n",
"\n",
"$$\n",
"Z_a = U^\\prime_a M_c / \\mu^w_0\n",
"$$\n",
"\n",
"We have the following convenient formulas:\n",
"\n",
"$$\n",
"a_0 = x^\\prime_0\\, \\mu_a\\, x_0 + \\sigma_a\n",
"$$\n",
"\n",
"$$\n",
"\\mu_a = \\sum^\\infty_{\\tau=0}\\, \\beta^\\tau\\, (A^{o \\prime})^\\tau\\ Z_a\\,\n",
"A^{o \\tau}\n",
"$$\n",
"\n",
"$$\n",
"\\sigma_a = {\\beta \\over 1 - \\beta}\\ {\\rm trace } \\left( Z_a \\sum^\\infty_{\\tau = 0}\n",
"\\,\\beta^\\tau\\, (A^o)^\\tau\\, C C^\\prime (A^{o \\prime})^\\tau \\right)\n",
"$$"
]
},
{
"cell_type": "markdown",
"id": "209a66ed",
"metadata": {},
"source": [
"### Re-Opening Markets\n",
"\n",
"We have assumed that all trading occurs once-and-for-all at time $ t=0 $.\n",
"\n",
"If we were to **re-open markets** at some time $ t >0 $ at time $ t $ wealth levels implicitly defined by\n",
"time $ 0 $ trades, we would obtain the same equilibrium allocation (i.e., quantities) and the following time $ t $\n",
"price system\n",
"\n",
"$$\n",
"\\begin{aligned}\n",
"L^2_t &= [\\{y_s\\}^\\infty_{s=t} : \\ y_s \\ \\hbox{ is a random variable\n",
"in }\\ J_s\\ \\hbox{ for }\\ s \\geq t \\\\\n",
"&\\hbox {and } E\\, \\sum^\\infty_{s=t}\\, \\beta^{s-t}\\ y^2_s \\mid J_t < + \\infty] .\n",
"\\end{aligned}\n",
"$$\n",
"\n",
"$$\n",
"p^t_s = M_c x_s / [\\bar e_j M_c x_t ], \\qquad s \\geq t\n",
"$$\n",
"\n",
"$$\n",
"w^t_s = \\mid S_g x_s \\vert / [\\bar e_j M_c x_t], \\ \\ s \\geq t\n",
"$$\n",
"\n",
"$$\n",
"r^t_s = \\Gamma^\\prime M_d x_s / [\\bar e_j M_c x_t],\\ \\ s \\geq t\n",
"$$\n",
"\n",
"$$\n",
"q^t_s = M_i x_s / [\\bar e_j \\, M_c x_t], \\qquad s \\geq t\n",
"$$\n",
"\n",
"$$\n",
"\\alpha^t_s = M_d x_s / [\\bar e_j \\, M_c x_t] , \\ \\ s \\geq t\n",
"$$\n",
"\n",
"$$\n",
"v_t = [\\Gamma^\\prime M_d + \\Delta^\\prime_k M_k] x_t / \\, [\\bar e_j \\, M_c x_t]\n",
"$$"
]
},
{
"cell_type": "markdown",
"id": "9bbe8af9",
"metadata": {},
"source": [
"## Econometrics\n",
"\n",
"Up to now, we have described how to solve the **direct problem** that maps model parameters into an (equilibrium) stochastic process\n",
"of prices and quantities.\n",
"\n",
"Recall the **inverse problem** of inferring model parameters from a single realization of a time series of some of the prices and quantities.\n",
"\n",
"Another name for the inverse problem is **econometrics**.\n",
"\n",
"An advantage of the [[HS13](https://python-advanced.quantecon.org/zreferences.html#id67)] structure is that it comes with a self-contained theory of econometrics.\n",
"\n",
"It is really just a tale of two state-space representations.\n",
"\n",
"Here they are:\n",
"\n",
"**Original State-Space Representation:**\n",
"\n",
"$$\n",
"\\begin{aligned}\n",
"x_{t+1} &= A^o x_t + Cw_{t+1} \\\\\n",
"y_t & = Gx_t + v_t\n",
"\\end{aligned}\n",
"$$\n",
"\n",
"where $ v_t $ is a martingale difference sequence of measurement\n",
"errors that satisfies $ Ev_t\n",
"v_t' = R, E w_{t+1} v_s' = 0 $ for all $ t+1 \\geq s $ and\n",
"\n",
"$$\n",
"x_0 \\sim {\\mathcal N}(\\hat x_0,\\Sigma_0)\n",
"$$\n",
"\n",
"**Innovations Representation:**\n",
"\n",
"$$\n",
"\\begin{aligned}\n",
"\\hat x_{t+1} &=A^o \\hat x_t + K_t a_t \\\\\n",
"y_t &= G \\hat x_t + a_t,\n",
"\\end{aligned}\n",
"$$\n",
"\n",
"where $ a_t = y_t - E[y_t | y^{t-1}], E a_t a_t^\\prime \\equiv \\Omega_t = G \\Sigma_t G^\\prime + R $.\n",
"\n",
"\n",
"\n",
"Compare numbers of shocks in the two representations:\n",
"\n",
"- $ n_w + n_y $ versus $ n_y $ \n",
"\n",
"\n",
"Compare spaces spanned\n",
"\n",
"- $ H(y^t) \\subset H(w^t,v^t) $ \n",
"- $ H(y^t) = H(a^t) $ \n",
"\n",
"\n",
"**Kalman Filter:**.\n",
"\n",
"Kalman gain:\n",
"\n",
"$$\n",
"K_t = A^o \\Sigma_t G^\\prime (G \\Sigma_t G^\\prime + R)^{-1}\n",
"$$\n",
"\n",
"Riccati Difference Equation:\n",
"\n",
"$$\n",
"\\begin{aligned}\n",
"\\Sigma_{t+1} &= A^o \\Sigma_t A^{o \\prime} + CC^\\prime \\\\\n",
"&- A^o \\Sigma_t G^\\prime (G \\Sigma_t G^\\prime + R)^{-1} G \\Sigma_t A^{o \\prime}\n",
"\\end{aligned}\n",
"$$\n",
"\n",
"**Innovations Representation as Whitener**\n",
"\n",
"Whitening Filter:\n",
"\n",
"$$\n",
"\\begin{aligned}\n",
"a_t &=y_t - G \\hat x_t \\\\\n",
"\\hat x_{t+1} &= A^o \\hat x_t + K_t a_t\n",
"\\end{aligned}\n",
"$$\n",
"\n",
"can be used recursively to construct a record of innovations\n",
"$ \\{ a_t \\}^T_{t=0} $ from an $ (\\hat x_0, \\Sigma_0) $ and a\n",
"record of observations $ \\{ y_t \\}^T_{t=0} $.\n",
"\n",
"**Limiting Time-Invariant Innovations Representation**\n",
"\n",
"$$\n",
"\\begin{aligned}\n",
"\\Sigma &= A^o \\Sigma A^{o \\prime} + CC^\\prime \\\\\n",
"&- A^o \\Sigma G^\\prime (G \\Sigma G^\\prime + R)^{-1} G \\Sigma A^{o \\prime} \\\\\n",
"K &= A^o \\Sigma_t G^\\prime (G \\Sigma G^\\prime + R)^{-1}\n",
"\\end{aligned}\n",
"$$\n",
"\n",
"$$\n",
"\\begin{aligned}\n",
"\\hat x_{t+1} &= A^o \\hat x_t + K a_t \\\\\n",
"y_t &= G \\hat x_t + a_t\n",
"\\end{aligned}\n",
"$$\n",
"\n",
"where $ E a_t a_t^\\prime \\equiv \\Omega = G \\Sigma G^\\prime + R $."
]
},
{
"cell_type": "markdown",
"id": "d88a8123",
"metadata": {},
"source": [
"### Factorization of Likelihood Function\n",
"\n",
"Sample of observations $ \\{y_s\\}_{s=0}^T $ on a\n",
"$ (n_y \\times 1) $ vector.\n",
"\n",
"$$\n",
"\\begin{aligned}\n",
"f(y_T, y_{T-1}, \\ldots, y_0 )&=\n",
" f_T(y_T \\vert y_{T-1}, \\ldots, y_0) f_{T-1}(y_{T-1} \\vert\n",
" y_{T-2}, \\ldots, y_0) \\cdots f_1(y_1 \\vert y_0) f_0(y_0 ) \\\\\n",
"&= g_T(a_T) g_{T-1} (a_{T-1}) \\ldots g_1(a_1) f_0(y_0).\n",
"\\end{aligned}\n",
"$$\n",
"\n",
"Gaussian Log-Likelihood:\n",
"\n",
"$$\n",
"-.5 \\sum_{t=0}^T \\biggl\\{ n_y \\ln (2 \\pi ) + \\ln \\vert \\Omega _t \\vert\n",
" + a_t' \\Omega_t^{-1} a_t \\biggr\\}\n",
"$$"
]
},
{
"cell_type": "markdown",
"id": "5063acb5",
"metadata": {},
"source": [
"### Covariance Generating Functions\n",
"\n",
"Autocovariance: $ C_x(\\tau) = E x_t x_{t-\\tau}' $.\n",
"\n",
"Generating Function:\n",
"$ S_x(z) = \\sum_{\\tau = -\\infty}^\\infty C_x(\\tau) z^\\tau, z \\in C $."
]
},
{
"cell_type": "markdown",
"id": "c1ac9380",
"metadata": {},
"source": [
"### Spectral Factorization Identity\n",
"\n",
"Original state-space representation has too many shocks and implies:\n",
"\n",
"$$\n",
"S_y(z) = G (zI - A^o)^{-1} C C^\\prime (z^{-1} I - (A^o)^\\prime)^{-1}\n",
"G^\\prime + R\n",
"$$\n",
"\n",
"Innovations representation has as many shocks as dimension of\n",
"$ y_t $ and implies\n",
"\n",
"$$\n",
"S_y(z) = [G(zI-A^o)^{-1}K +I] [G \\Sigma G^\\prime + R]\n",
"[K^\\prime (z^{-1} I -A^{o\\prime})^{-1} G^\\prime + I]\n",
"$$\n",
"\n",
"Equating these two leads to:\n",
"\n",
"$$\n",
"\\begin{aligned}\n",
" & G (zI - A^o)^{-1} C C^\\prime (z^{-1} I - A^{o\\prime})^{-1} G^\\prime + R = \\\\\n",
"& [G(zI-A^o)^{-1}K +I] [G \\Sigma G^\\prime + R] [K'(z^{-1} I -A^{o\\prime})^{-1}\n",
"G^\\prime + I] .\n",
"\\end{aligned}\n",
"$$\n",
"\n",
"**Key Insight:** The zeros of the polynomial\n",
"$ \\det [G(zI-A^o)^{-1}K +I] $ all lie inside the unit circle, which\n",
"means that $ a_t $ lies in the space spanned by square summable\n",
"linear combinations of $ y^t $.\n",
"\n",
"$$\n",
"H(a^t) = H(y^t)\n",
"$$\n",
"\n",
"**Key Property:** Invertibility"
]
},
{
"cell_type": "markdown",
"id": "28612fcc",
"metadata": {},
"source": [
"### Wold and Vector Autoregressive Representations\n",
"\n",
"Let’s start with some lag operator arithmetic.\n",
"\n",
"The lag operator $ L $ and the inverse lag operator $ L^{-1} $ each map an infinite sequence into an infinite sequence according to the\n",
"transformation rules\n",
"\n",
"$$\n",
"L x_t \\equiv x_{t-1}\n",
"$$\n",
"\n",
"$$\n",
"L^{-1} x_t \\equiv x_{t+1}\n",
"$$\n",
"\n",
"A **Wold moving average representation** for $ \\{y_t\\} $ is\n",
"\n",
"$$\n",
"y_t = [ G(I-A^oL)^{-1}KL + I] a_t\n",
"$$\n",
"\n",
"Applying the inverse of the operator on the right side and using\n",
"\n",
"$$\n",
"[G(I-A^oL)^{-1}KL+I]^{-1} = I - G[I - (A^o-KG)L]^{-1}KL\n",
"$$\n",
"\n",
"gives the **vector autoregressive representation**\n",
"\n",
"$$\n",
"y_t = \\sum_{j=1}^\\infty G (A^o -KG)^{j-1} K y_{t-j} + a_t\n",
"$$\n",
"\n",
"\n",
""
]
},
{
"cell_type": "markdown",
"id": "0533fddb",
"metadata": {},
"source": [
"## Dynamic Demand Curves and Canonical Household Technologies"
]
},
{
"cell_type": "markdown",
"id": "ce43a209",
"metadata": {},
"source": [
"### Canonical Household Technologies\n",
"\n",
"$$\n",
"\\begin{aligned}\n",
"h_t &=\\Delta_h h_{t-1} + \\Theta_h c_t \\\\\n",
" s_t &= \\Lambda h_{t-1} + \\Pi c_t \\\\\n",
" b_t &=U_b z_t\n",
"\\end{aligned}\n",
"$$\n",
"\n",
"**Definition:** A household service technology\n",
"$ (\\Delta_h, \\Theta_h, \\Pi,\\Lambda, U_b) $ is said to be **canonical**\n",
"if\n",
"\n",
"- $ \\color{blue}{\\Pi} $ is nonsingular, and \n",
"- the absolute values of the eigenvalues of $ \\color{blue}{(\\Delta_h - \\Theta_h \\Pi^{-1}\\Lambda)} $ are strictly less than $ 1/\\sqrt\\beta $. \n",
"\n",
"\n",
"**Key invertibility property:** A canonical household service\n",
"technology maps a service process $ \\{s_t\\} $ in $ L_0^2 $\n",
"into a corresponding consumption process $ \\{c_t\\} $ for which the\n",
"implied household capital stock process $ \\{h_t\\} $ is also in\n",
"$ L^2_0 $.\n",
"\n",
"An inverse household technology:\n",
"\n",
"$$\n",
"\\begin{aligned}\n",
"c_t &= - \\Pi^{-1} \\Lambda h_{t-1} + \\Pi^{-1} s_t\\\\\n",
"h_t &= (\\Delta_h - \\Theta_h\\Pi^{-1} \\Lambda) h_{t-1} + \\Theta_h \\Pi^{-1}\n",
"s_t\n",
"\\end{aligned}\n",
"$$\n",
"\n",
"The restriction on the eigenvalues of the matrix\n",
"$ (\\Delta_h - \\Theta_h \\Pi^{-1}\n",
"\\Lambda) $ keeps the household capital stock $ \\{h_t\\} $ in\n",
"$ L_0^2 $.\n",
"\n",
"\n",
""
]
},
{
"cell_type": "markdown",
"id": "6ab702fd",
"metadata": {},
"source": [
"### Dynamic Demand Functions\n",
"\n",
"$$\n",
"\\rho^0_t \\equiv \\Pi^{-1 \\prime} \\Bigl[p^0_t - \\Theta _h^\\prime E_t\n",
"\\sum^\\infty_{\\tau=1} \\beta^\\tau (\\Delta_h^\\prime - \\Lambda^\\prime \\Pi^{-1 \\prime}\n",
"\\Theta_h^\\prime )^{\\tau-1}\\Lambda^\\prime \\Pi^{-1 \\prime} p^0_{t+\\tau} \\Bigr]\n",
"$$\n",
"\n",
"$$\n",
"\\begin{aligned}\n",
"s_{i,t}&= \\Lambda h_{i,t-1} \\\\\n",
"h_{i,t}&= \\Delta _h h_{i,t-1}\n",
"\\end{aligned}\n",
"$$\n",
"\n",
"where $ h_{i,-1} = h_{-1} $.\n",
"\n",
"\n",
"\n",
"$$\n",
"W_0 = E_0\\sum^\\infty_{t=0}\\beta ^t(w^0_t\\ell _t + \\alpha ^0_t\\cdot d_t) + v_0\\cdot k_{-1}\n",
"$$\n",
"\n",
"$$\n",
"\\mu^w_0 = {E_0 \\sum^\\infty_{t=0} \\beta^t \\rho^0_t\\cdot\n",
" (b_t -s_{i,t}) - W_0 \\over E_0 \\sum^\\infty_{t=0}\n",
"\\beta^t \\rho^0_t \\cdot \\rho^0_t}\n",
"$$\n",
"\n",
"$$\n",
"\\begin{aligned}\n",
"c_t &= -\\Pi^{-1} \\Lambda h_{t-1} + \\Pi ^{-1} b_t\n",
"-\\Pi^{-1} \\mu_0^w E_t \\{ \\Pi^{\\prime\\, -1} - \\Pi^{\\prime\\, -1}\\Theta_h ' \\\\\n",
"& \\qquad [I - (\\Delta_h ' - \\Lambda ' \\Pi^{\\prime \\, -1} \\Theta_h ')\\beta L^{-1}]\n",
"^{-1} \\Lambda ' \\Pi^{\\prime -1} \\beta L^{-1} \\} p_t^0 \\\\\n",
"h_t &= \\Delta_h h_{t-1} + \\Theta_h c_t\n",
"\\end{aligned}\n",
"$$\n",
"\n",
"This system expresses consumption demands at date $ t $ as\n",
"functions of: (i) time-$ t $ conditional expectations of future\n",
"scaled Arrow-Debreu prices $ \\{p_{t+s}^0\\}_{s=0}^\\infty $; (ii) the\n",
"stochastic process for the household’s endowment $ \\{d_t\\} $ and\n",
"preference shock $ \\{b_t\\} $, as mediated through the multiplier\n",
"$ \\mu_0^w $ and wealth $ W_0 $; and (iii) past values of\n",
"consumption, as mediated through the state variable $ h_{t-1} $."
]
},
{
"cell_type": "markdown",
"id": "0de2c761",
"metadata": {},
"source": [
"## Gorman Aggregation and Engel Curves\n",
"\n",
"We shall explore how the dynamic demand schedule for consumption goods\n",
"opens up the possibility of satisfying Gorman’s (1953) conditions for\n",
"aggregation in a heterogeneous consumer model.\n",
"\n",
"The first equation of our demand system is an Engel curve for consumption that is linear in the\n",
"marginal utility $ \\mu_0^2 $ of individual wealth with a coefficient\n",
"on $ \\mu_0^w $ that depends only on prices.\n",
"\n",
"The multiplier $ \\mu_0^w $ depends on wealth in an affine relationship, so that\n",
"consumption is linear in wealth.\n",
"\n",
"In a model with multiple consumers who have the same household technologies\n",
"($ \\Delta_h, \\Theta_h, \\Lambda, \\Pi $) but possibly different\n",
"preference shock processes and initial values of household capital\n",
"stocks, the coefficient on the marginal utility of wealth is the same\n",
"for all consumers.\n",
"\n",
"Gorman showed that when Engel curves satisfy this\n",
"property, there exists a unique community or aggregate preference\n",
"ordering over aggregate consumption that is independent of the\n",
"distribution of wealth."
]
},
{
"cell_type": "markdown",
"id": "996793b6",
"metadata": {},
"source": [
"### Re-Opened Markets\n",
"\n",
"$$\n",
"\\rho^t_{t} \\equiv \\Pi^{-1 \\prime} \\Bigl[p^t_{t} - \\Theta _h^\\prime E_t\n",
"\\sum^\\infty_{\\tau=1} \\beta^\\tau (\\Delta_h^\\prime - \\Lambda^\\prime \\Pi^{-1 \\prime}\n",
"\\Theta_h^\\prime )^{\\tau-1}\\Lambda^\\prime \\Pi^{-1 \\prime} p^t_{t+\\tau} \\Bigr]\n",
"$$\n",
"\n",
"$$\n",
"\\begin{aligned}\n",
"s_{i,t}&= \\Lambda h_{i,t-1} \\\\\n",
"h_{i,t}&= \\Delta _h h_{i,t-1},\n",
"\\end{aligned}\n",
"$$\n",
"\n",
"where now $ h_{i,t-1} = h_{t-1} $. Define time $ t $ wealth\n",
"$ W_t $\n",
"\n",
"$$\n",
"W_t = E_t\\sum^\\infty_{j=0}\\beta ^j(w^t_{t+j}\\ell_{t+j} + \\alpha ^t_{t+j}\\cdot d_{t+j}) + v_t\\cdot k_{t-1}\n",
"$$\n",
"\n",
"$$\n",
"\\mu^w_t = {E_t \\sum^\\infty_{j=0} \\beta^j \\rho^t_{t+j}\\cdot\n",
"(b_{t+j} -s_{i,t+j}) - W_t \\over E_t \\sum^\\infty_{t=0}\n",
"\\beta^j \\rho^t_{t+j} \\cdot \\rho^t_{t+j}}\n",
"$$\n",
"\n",
"$$\n",
"\\begin{aligned}\n",
"c_t &= -\\Pi^{-1} \\Lambda h_{t-1} + \\Pi ^{-1} b_t\n",
"-\\Pi^{-1} \\mu_t^w E_t \\{ \\Pi^{\\prime\\, -1} - \\Pi^{\\prime\\, -1}\\Theta_h ' \\\\\n",
"& \\qquad [I - (\\Delta_h ' - \\Lambda ' \\Pi^{\\prime \\, -1} \\Theta_h ')\\beta L^{-1}]\n",
"^{-1} \\Lambda ' \\Pi^{\\prime -1} \\beta L^{-1} \\} p_t^t \\\\\n",
"h_t &= \\Delta_h h_{t-1} + \\Theta_h c_t\n",
"\\end{aligned}\n",
"$$"
]
},
{
"cell_type": "markdown",
"id": "9ae8a278",
"metadata": {},
"source": [
"### Dynamic Demand\n",
"\n",
"Define a time $ t $ continuation of a sequence\n",
"$ \\{z_t\\}_{t=0}^\\infty $ as the sequence\n",
"$ \\{z_\\tau\\}_{\\tau=t}^\\infty $. The demand system indicates that the\n",
"time $ t $ vector of demands for $ c_t $ is influenced by:\n",
"\n",
"Through the multiplier $ \\mu^w_t $, the time $ t $ continuation\n",
"of the preference shock process $ \\{b_t\\} $ and the time $ t $\n",
"continuation of $ \\{s_{i,t}\\} $.\n",
"\n",
"The time $ t-1 $ level of household durables $ h_{t-1} $.\n",
"\n",
"Everything that affects the household’s time $ t $ wealth, including\n",
"its stock of physical capital $ k_{t-1} $ and its value $ v_t $,\n",
"the time $ t $ continuation of the factor prices\n",
"$ \\{w_t, \\alpha_t\\} $, the household’s continuation endowment\n",
"process, and the household’s continuation plan for $ \\{\\ell_t\\} $.\n",
"\n",
"The time $ t $ continuation of the vector of prices\n",
"$ \\{p_t^t\\} $."
]
},
{
"cell_type": "markdown",
"id": "85c48500",
"metadata": {},
"source": [
"### Attaining a Canonical Household Technology\n",
"\n",
"Apply the following version of a factorization identity:\n",
"\n",
"$$\n",
"\\begin{aligned}\n",
"&[\\Pi + \\beta^{1/2} L^{-1} \\Lambda (I - \\beta^{1/2} L^{-1}\n",
"\\Delta_h)^{-1} \\Theta_h]^\\prime [\\Pi + \\beta^{1/2} L\n",
"\\Lambda (I - \\beta^{1/2} L \\Delta_h)^{-1} \\Theta_h] \\\\\n",
"&\\quad = [\\hat\\Pi + \\beta^{1/2} L^{-1} \\hat\\Lambda\n",
"(I - \\beta^{1/2} L^{-1} \\Delta_h)^{-1} \\Theta_h]^\\prime\n",
"[\\hat\\Pi + \\beta^{1/2} L \\hat\\Lambda\n",
"(I - \\beta^{1/2} L \\Delta_h)^{-1} \\Theta_h]\n",
"\\end{aligned}\n",
"$$\n",
"\n",
"The factorization identity guarantees that the\n",
"$ [\\hat \\Lambda, \\hat \\Pi] $ representation satisfies both\n",
"requirements for a canonical representation."
]
},
{
"cell_type": "markdown",
"id": "0007d17e",
"metadata": {},
"source": [
"## Partial Equilibrium\n",
"\n",
"Now we’ll provide quick overviews of examples of economies that fit within our framework\n",
"\n",
"We provide details for a number of these examples in subsequent lectures\n",
"\n",
"1. [Growth in Dynamic Linear Economies](https://python-advanced.quantecon.org/growth_in_dles.html) \n",
"1. [Lucas Asset Pricing using DLE](https://python-advanced.quantecon.org/lucas_asset_pricing_dles.html) \n",
"1. [IRFs in Hall Model](https://python-advanced.quantecon.org/irfs_in_hall_model.html) \n",
"1. [Permanent Income Using the DLE class](https://python-advanced.quantecon.org/permanent_income_dles.html) \n",
"1. [Rosen schooling model](https://python-advanced.quantecon.org/rosen_schooling_model.html) \n",
"1. [Cattle cycles](https://python-advanced.quantecon.org/cattle_cycles.html) \n",
"1. [Shock Non Invertibility](https://python-advanced.quantecon.org/hs_invertibility_example.html) \n",
"\n",
"\n",
"We’ll start with an example of a **partial equilibrium** in which we posit demand and supply curves\n",
"\n",
"Suppose that we want to capture the dynamic demand curve:\n",
"\n",
"$$\n",
"\\begin{aligned}\n",
" c_t &= -\\Pi^{-1} \\Lambda h_{t-1} + \\Pi ^{-1} b_t - \\Pi^{-1}\n",
" \\mu_0^w E_t \\{ \\Pi^{\\prime\\, -1} - \\Pi^{\\prime\\, -1}\\Theta_h' \\\\\n",
" & \\qquad[I - (\\Delta_h' - \\Lambda' \\Pi^{\\prime\\, -1} \\Theta_h')\\beta\n",
" L^{-1}]^{-1} \\Lambda' \\Pi^{\\prime -1} \\beta L^{-1} \\} p_t \\\\\n",
" h_t &= \\Delta_h h_{t-1} + \\Theta_h c_t\n",
"\\end{aligned}\n",
"$$\n",
"\n",
"From material described earlier in this lecture, we know how to reverse engineer preferences that generate this demand system\n",
"\n",
"- note how the demand equations are cast in terms of the matrices in our standard preference representation \n",
"\n",
"\n",
"Now let’s turn to supply.\n",
"\n",
"A representative firm takes as given and beyond its control the\n",
"stochastic process $ \\{p_t\\}_{t=0}^\\infty $.\n",
"\n",
"The firm sells its\n",
"output $ c_t $ in a competitive market each period.\n",
"\n",
"Only spot markets convene at each date $ t\\geq 0 $.\n",
"\n",
"The firm also faces an exogenous process of cost disturbances $ d_t $.\n",
"\n",
"The firm chooses stochastic processes $ \\{c_t, g_t, i_t, k_t\\}_{t=0}^\\infty $ to maximize\n",
"\n",
"$$\n",
"E_0 \\sum_{t=0}^\\infty \\beta^t \\{ p_t \\cdot c_t - g_t \\cdot g_t/2 \\}\n",
"$$\n",
"\n",
"subject to given $ k_{-1} $ and\n",
"\n",
"$$\n",
"\\begin{aligned}\n",
"\\Phi_c c_t + \\Phi_i i_t + \\Phi_g g_t &=\\Gamma k_{t-1} + d_t \\\\\n",
" k_t& = \\Delta_k k_{t-1} + \\Theta_k i_t . \\\\\n",
" % x_{t+1}& = A^o x_t + C w_{t+1} \\\\\n",
" % d_t& = S_d x_t \\\\\n",
" % p_t& = M_c x_t\n",
"\\end{aligned}\n",
"$$"
]
},
{
"cell_type": "markdown",
"id": "339f855f",
"metadata": {},
"source": [
"## Equilibrium Investment Under Uncertainty\n",
"\n",
"A representative firm maximizes\n",
"\n",
"$$\n",
"E \\sum_{t=0}^\\infty \\beta^t \\{ p_t c_t - g_t^2/2 \\}\n",
"$$\n",
"\n",
"subject to the technology\n",
"\n",
"$$\n",
"\\begin{aligned}\n",
" c_t &= \\gamma k_{t-1} \\\\\n",
" k_t &= \\delta_k k_{t-1} + i_t \\\\\n",
" g_t &= f_1 i_t + f_2 d_t\n",
"\\end{aligned}\n",
"$$\n",
"\n",
"where $ d_t $ is a cost shifter, $ \\gamma> 0 $, and\n",
"$ f_1 >0 $ is a cost parameter and $ f_2 =1 $. Demand is\n",
"governed by\n",
"\n",
"$$\n",
"p_t = \\alpha_0 - \\alpha_1 c_t + u_t\n",
"$$\n",
"\n",
"where $ u_t $ is a demand shifter with mean zero and\n",
"$ \\alpha_0, \\alpha_1 $ are positive parameters.\n",
"\n",
"Assume that $ u_t, d_t $ are uncorrelated first-order autoregressive processes."
]
},
{
"cell_type": "markdown",
"id": "6f05303b",
"metadata": {},
"source": [
"## A Rosen-Topel Housing Model\n",
"\n",
"$$\n",
"\\begin{aligned}\n",
" R_t &= b_t + \\alpha h_t \\\\\n",
" p_t &= E_t \\sum_{\\tau =0}^\\infty (\\beta \\delta_h)^\\tau\n",
" R_{t+\\tau}\n",
"\\end{aligned}\n",
"$$\n",
"\n",
"where $ h_t $ is the stock of housing at time $ t $\n",
"$ R_t $ is the rental rate for housing, $ p_t $ is the price of\n",
"new houses, and $ b_t $ is a demand shifter; $ \\alpha < 0 $ is a\n",
"demand parameter, and $ \\delta_h $ is a depreciation factor for\n",
"houses.\n",
"\n",
"We cast this demand specification within our class of models by letting\n",
"the stock of houses $ h_t $ evolve according to\n",
"\n",
"$$\n",
"h_t = \\delta_h h_{t-1} + c_t, \\quad \\delta_h \\in (0,1)\n",
"$$\n",
"\n",
"where $ c_t $ is the rate of production of new houses.\n",
"\n",
"Houses produce services $ s_t $ according to\n",
"$ s_t = \\bar \\lambda h_t $ or\n",
"$ s_t = \\lambda h_{t-1} + \\pi c_t, $ where\n",
"$ \\lambda= \\bar \\lambda \\delta_h, \\pi = \\bar \\lambda $.\n",
"\n",
"We can take $ \\bar \\lambda \\rho_t^0 = R_t $ as the rental rate on housing at\n",
"time $ t $, measured in units of time $ t $ consumption (housing).\n",
"\n",
"Demand for housing services is\n",
"\n",
"$$\n",
"s_t = b_t - \\mu_0 \\rho_t^0\n",
"$$\n",
"\n",
"where the price of new houses $ p_t $ is related to\n",
"$ \\rho_t^0 $ by\n",
"$ \\rho_t^0 = \\pi^{-1} [ p_t - \\beta \\delta_h E_t p_{t+1}] $."
]
},
{
"cell_type": "markdown",
"id": "4ead5e03",
"metadata": {},
"source": [
"## Cattle Cycles\n",
"\n",
"Rosen, Murphy, and Scheinkman (1994). Let $ p_t $ be the price of\n",
"freshly slaughtered beef, $ m_t $ the feeding cost of preparing an\n",
"animal for slaughter, $ \\tilde h_t $ the one-period holding cost for\n",
"a mature animal, $ \\gamma_1 \\tilde h_t $ the one-period holding cost\n",
"for a yearling, and $ \\gamma_0 \\tilde\n",
"h_t $ the one-period holding cost for a calf.\n",
"\n",
"The cost processes\n",
"$ \\{\\tilde h_t, m_t\\}_{t=0}^\\infty $ are exogenous, while the\n",
"stochastic process $ \\{p_t\\}_{t=0}^\\infty $ is determined by a\n",
"rational expectations equilibrium. Let $ \\tilde x_t $ be the\n",
"breeding stock, and $ \\tilde y_t $ be the total stock of animals.\n",
"\n",
"The law of motion for cattle stocks is\n",
"\n",
"$$\n",
"\\tilde x_t = (1-\\delta) \\tilde x_{t-1} + g \\tilde x_{t-3} - c_t\n",
"$$\n",
"\n",
"where $ c_t $ is a rate of slaughtering. The total head-count of\n",
"cattle\n",
"\n",
"$$\n",
"\\tilde y_t = \\tilde x_t + g \\tilde x_{t-1} + g \\tilde x_{t-2}\n",
"$$\n",
"\n",
"is the sum of adults, calves, and yearlings, respectively.\n",
"\n",
"\n",
"\n",
"A representative farmer chooses $ \\{c_t, \\tilde x_t\\} $ to maximize\n",
"\n",
"$$\n",
"\\begin{aligned}\n",
" E_0 \\sum_{t=0}^\\infty \\beta^t \\{ p_t c_t &-\n",
" \\tilde h_t \\tilde x_t\n",
" -(\\gamma_0 \\tilde h_t) (g \\tilde x_{t-1}) - (\\gamma_1 \\tilde h_t)\n",
" (g \\tilde x_{t-2}) - m_t c_t \\\\\n",
" &- \\Psi(\\tilde x_t, \\tilde x_{t-1},\n",
" \\tilde x_{t-2}, c_t) \\}\n",
"\\end{aligned}\n",
"$$\n",
"\n",
"where\n",
"\n",
"$$\n",
"\\Psi = {\\psi_1 \\over 2} \\tilde x_t^2 + {\\psi_2 \\over 2} \\tilde x_{t-1}^2\n",
" + {\\psi_3 \\over 2} \\tilde x_{t-2}^2 + {\\psi_4 \\over 2} c_t^2\n",
"$$\n",
"\n",
"Demand is governed by\n",
"\n",
"$$\n",
"c_t = \\alpha_0 - \\alpha_1 p_t + \\tilde d_t\n",
"$$\n",
"\n",
"where $ \\alpha_0 > 0 $, $ \\alpha_1 > 0 $, and\n",
"$ \\{\\tilde d_t\\}_{t=0}^\\infty $ is a stochastic process with mean\n",
"zero representing a demand shifter.\n",
"\n",
"For more details see [Cattle cycles](https://python-advanced.quantecon.org/cattle_cycles.html)"
]
},
{
"cell_type": "markdown",
"id": "33a2f5cd",
"metadata": {},
"source": [
"## Models of Occupational Choice and Pay\n",
"\n",
"We’ll describe the following pair of schooling models that view education as a time-to-build process:\n",
"\n",
"- Rosen schooling model for engineers \n",
"- Two-occupation model "
]
},
{
"cell_type": "markdown",
"id": "b78fad7b",
"metadata": {},
"source": [
"### Market for Engineers\n",
"\n",
"Ryoo and Rosen’s (2004) [[RR04](https://python-advanced.quantecon.org/zreferences.html#id65)] model consists of the following equations:\n",
"\n",
"first, a demand curve for engineers\n",
"\n",
"$$\n",
"w_t = - \\alpha_d N_t + \\epsilon_{1t}\\ ,\\ \\alpha_d > 0\n",
"$$\n",
"\n",
"second, a time-to-build structure of the education process\n",
"\n",
"$$\n",
"N_{t+k} = \\delta_N N_{t+k-1} + n_t\\ ,\\ 0<\\delta_N<1\n",
"$$\n",
"\n",
"third, a definition of the discounted present value of each new\n",
"engineering student\n",
"\n",
"$$\n",
"v_t = \\beta^k E_t \\sum^\\infty_{j=0} (\\beta \\delta_N)^j\n",
" w_{t+k+j};\n",
"$$\n",
"\n",
"and fourth, a supply curve of new students driven by $ v_t $\n",
"\n",
"$$\n",
"n_t = \\alpha_s v_t + \\epsilon_{2t}\\ ,\\ \\alpha_s > 0\n",
"$$\n",
"\n",
"Here $ \\{\\epsilon_{1t}, \\epsilon_{2t}\\} $ are stochastic processes\n",
"of labor demand and supply shocks.\n",
"\n",
"\n",
"\n",
"**Definition:** A partial equilibrium is a stochastic process\n",
"$ \\{w_t, N_t, v_t, n_t\\}^\\infty_{t=0} $ satisfying these four\n",
"equations, and initial conditions\n",
"$ N_{-1}, n_{-s}, s=1, \\ldots, -k $.\n",
"\n",
"We sweep the time-to-build structure and the demand for engineers into\n",
"the household technology and putting the supply of new engineers into\n",
"the technology for producing goods.\n",
"\n",
"$$\n",
"\\begin{aligned}\n",
" s_t &= [\\lambda_1 \\ 0 \\ \\ldots \\ 0]\\ \\begin{bmatrix}\n",
"h_{1t-1}\\\\ h_{2t-1}\\\\ \\vdots \\\\ h_{k+1,t-1}\\end{bmatrix} + 0 \\cdot c_t \\\\\n",
"\\begin{bmatrix} h_{1t}\\\\ h_{2t}\\\\ \\vdots\\\\ h_{k,t} \\\\\n",
" h_{k+1,t}\\end{bmatrix} &=\n",
"\\begin{bmatrix} \\delta_N & 1 & 0 & \\cdots & 0\\\\ 0 & 0 & 1 & \\cdots & 0\\\\\n",
"\\vdots & \\vdots & \\vdots & \\ddots & \\vdots\\\\ 0 & \\cdots & \\cdots & 0 & 1\\\\\n",
"0 & 0 & 0 & \\cdots & 0 \\end{bmatrix} \\begin{bmatrix}h_{1t-1}\\\\ h_{2t-1}\\\\ \\vdots\\\\ h_{k,t-1} \\\\\n",
" h_{k+1,t-1}\\end{bmatrix} + \\begin{bmatrix}0\\\\ 0\\\\ \\vdots\\\\ 0\\\\ 1\\\\\\end{bmatrix} c_t \\\\\n",
"%b_t &= \\epsilon_{1t}\n",
"\\end{aligned}\n",
"$$\n",
"\n",
"This specification sets Rosen’s $ N_t = h_{1t-1}, n_t = c_t,\n",
"h_{\\tau+1,t-1} = n_{t-\\tau}, \\tau=1, \\ldots, k $, and uses the\n",
"home-produced service to capture the demand for labor. Here\n",
"$ \\lambda_1 $ embodies Rosen’s demand parameter $ \\alpha_d $.\n",
"\n",
"- The supply of new workers becomes our consumption. \n",
"- The dynamic demand curve becomes Rosen’s dynamic supply curve for new workers. \n",
"\n",
"\n",
"**Remark:** This has an Imai-Keane flavor.\n",
"\n",
"For more details and Python code see [Rosen schooling model](https://python-advanced.quantecon.org/rosen_schooling_model.html)."
]
},
{
"cell_type": "markdown",
"id": "f54e023a",
"metadata": {},
"source": [
"### Skilled and Unskilled Workers\n",
"\n",
"First, a demand curve for labor\n",
"\n",
"$$\n",
"\\begin{bmatrix} w_{ut} \\\\ w_{st} \\end{bmatrix}\n",
" = \\alpha_d \\begin{bmatrix} N_{ut} \\\\ N_{st} \\end{bmatrix}\n",
" + \\epsilon_{1t}\n",
"$$\n",
"\n",
"where $ \\alpha_d $ is a $ (2 \\times 2) $ matrix of demand\n",
"parameters and $ \\epsilon_{1t} $ is a vector of demand shifters\n",
"second, time-to-train specifications for skilled and unskilled labor,\n",
"respectively:\n",
"\n",
"$$\n",
"\\begin{aligned}\n",
" N_{st+k} &=\\delta_N N_{st+k-1} + n_{st} \\\\\n",
" N_{ut} &=\\delta_N N_{ut-1} + n_{ut} ;\n",
"\\end{aligned}\n",
"$$\n",
"\n",
"where $ N_{st}, N_{ut} $ are stocks of the two types of labor, and\n",
"$ n_{st}, n_{ut} $ are entry rates into the two occupations.\n",
"\n",
"\n",
"\n",
"third, definitions of discounted present values of new entrants to the\n",
"skilled and unskilled occupations, respectively:\n",
"\n",
"$$\n",
"\\begin{aligned}\n",
" v_{st} &= E_t \\beta^k \\sum_{j=0}^\\infty (\\beta \\delta_N)^j\n",
" w_{st+k+j} \\\\\n",
" v_{ut} &=E_t \\sum_{j=0}^\\infty (\\beta \\delta_N)^j\n",
" w_{ut+j}\n",
"\\end{aligned}\n",
"$$\n",
"\n",
"where $ w_{ut}, w_{st} $ are wage rates for the two occupations;\n",
"and fourth, supply curves for new entrants:\n",
"\n",
"$$\n",
"\\begin{bmatrix}n_{st} \\\\ n_{ut}\\end{bmatrix}\n",
" = \\alpha_s \\begin{bmatrix} v_{ut} \\\\ v_{st} \\end{bmatrix} +\n",
" \\epsilon_{2t}\n",
"$$\n",
"\n",
"**Short Cut**\n",
"\n",
"As an alternative, Siow simply used the **equalizing differences**\n",
"condition\n",
"\n",
"$$\n",
"v_{ut} = v_{st}\n",
"$$"
]
},
{
"cell_type": "markdown",
"id": "4b19592e",
"metadata": {},
"source": [
"## Permanent Income Models\n",
"\n",
"We’ll describe a class of permanent income models that feature\n",
"\n",
"- Many consumption goods and services \n",
"- A single capital good with $ R \\beta =1 $ \n",
"- The physical production technology \n",
"\n",
"\n",
"$$\n",
"\\begin{aligned}\n",
"\\phi_c \\cdot c_t+i_t&=\\gamma k_{t-1}+e_t \\\\\n",
" k_t&= k_{t-1} + i_t\n",
"\\end{aligned}\n",
"$$\n",
"\n",
"$$\n",
"\\phi_ii_t-g_t=0\n",
"$$\n",
"\n",
"**Implication One:**\n",
"\n",
"Equality of Present Values of Moving Average Coefficients of $ c $ and $ e $\n",
"\n",
"$$\n",
"k_{t-1} = \\beta \\sum_{j=0}^\\infty \\beta^j (\\phi_c \\cdot c_{t+j} - e_{t+j}) \\quad \\Rightarrow\n",
"$$\n",
"\n",
"$$\n",
"k_{t-1} = \\beta \\sum_{j=0}^\\infty \\beta^j E (\\phi_c\n",
" \\cdot c_{t+j} - e_{t+j})|J_t \\quad \\Rightarrow\n",
"$$\n",
"\n",
"$$\n",
"\\sum_{j=0}^\\infty \\beta^j (\\phi_c)^\\prime \\chi_j =\n",
" \\sum_{j=0}^\\infty \\beta^j \\epsilon_j\n",
"$$\n",
"\n",
"where $ \\chi_j w_t $ is the response of $ c_{t+j} $ to\n",
"$ w_t $ and $ \\epsilon_j w_t $ is the response of endowment\n",
"$ e_{t+j} $ to $ w_t $:\n",
"\n",
"**Implication Two:**\n",
"\n",
"Martingales\n",
"\n",
"$$\n",
"\\begin{aligned}\n",
"{\\mathcal M}_t^k &= E ({\\mathcal M}_{t+1}^k | J_t) \\\\\n",
"{\\mathcal M}_t^e &= E ({\\mathcal M}_{t+1}^e | J_t)\n",
"\\end{aligned}\n",
"$$\n",
"\n",
"and\n",
"\n",
"$$\n",
"{\\mathcal M}_t^c = (\\Phi_c)^\\prime {\\mathcal M}_t^d = \\phi_c {\\cal M}_t^e\n",
"$$\n",
"\n",
"For more details see [Permanent Income Using the DLE class](https://python-advanced.quantecon.org/permanent_income_dles.html)\n",
"\n",
"**Testing Permanent Income Models:**\n",
"\n",
"We have two types of implications of permanent income models:\n",
"\n",
"- Equality of present values of moving average coefficients. \n",
"- Martingale $ {\\mathcal M}_t^k $. \n",
"\n",
"\n",
"These have been tested in work by Hansen, Sargent, and Roberts (1991) [[SHR91](https://python-advanced.quantecon.org/zreferences.html#id54)]\n",
"and by Attanasio and Pavoni (2011) [[AP11](https://python-advanced.quantecon.org/zreferences.html#id53)]."
]
},
{
"cell_type": "markdown",
"id": "a143f42e",
"metadata": {},
"source": [
"## Gorman Heterogeneous Households\n",
"\n",
"We now assume that there is a finite number of households, each with its own household technology and\n",
"preferences over consumption services.\n",
"\n",
"Household $ j $ orders preferences over consumption processes according to\n",
"\n",
"$$\n",
"-\\ \\left({1 \\over 2}\\right)\\ E \\sum_{t=0}^\\infty\\, \\beta^t\\, \\bigl[(s_{jt} -\n",
"b_{jt}) \\cdot (s_{jt} - b_{jt}) + \\ell_{jt}^{2}\\bigr] \\mid J_0\n",
"$$\n",
"\n",
"$$\n",
"s_{jt} = \\Lambda\\, h_{j,t-1} + \\Pi\\, c_{jt}\n",
"$$\n",
"\n",
"$$\n",
"h_{jt} = \\Delta_h\\, h_{j,t-1} + \\Theta_h\\, c_{jt}\n",
"$$\n",
"\n",
"and $ h_{j,-1} $ is given\n",
"\n",
"$$\n",
"b_{jt} = U_{bj} z_t\n",
"$$\n",
"\n",
"$$\n",
"E\\, \\sum_{t=0}^\\infty\\, \\beta^t\\, p_t^0\\, \\cdot c_{jt} \\mid J_0 = E\\,\n",
"\\sum_{t=0}^\\infty\\, \\beta^t\\, (w_t^0\\, \\ell_{jt} + \\alpha_t^0\\, \\cdot\n",
" d_{jt}) \\mid\n",
"J_0 + v_0\\, \\cdot k_{j,-1},\n",
"$$\n",
"\n",
"where $ k_{j,-1} $ is given. The $ j^{\\rm th} $ consumer owns\n",
"an endowment process $ d_{jt} $, governed by the stochastic process\n",
"$ d_{jt} = U_{dj}\\, z_t $.\n",
"\n",
"\n",
"\n",
"We refer to this as a setting with Gorman heterogeneous households.\n",
"\n",
"This specification confines heterogeneity among consumers to:\n",
"\n",
"- differences in the preference processes $ \\{b_{jt}\\} $, represented by different selections of $ U_{bj} $ \n",
"- differences in the endowment processes $ \\{d_{jt}\\} $, represented by different selections of $ U_{dj} $ \n",
"- differences in $ h_{j,-1} $ and \n",
"- differences in $ k_{j,-1} $ \n",
"\n",
"\n",
"The matrices $ \\Lambda,\\,\\Pi,\\,\\Delta_h,\\,\\Theta_h $ do not depend on $ j $.\n",
"\n",
"This makes everybody’s demand system have the form described earlier,\n",
"with different $ \\mu_{j0}^w $’s (reflecting different wealth\n",
"levels) and different $ b_{jt} $ preference shock processes and\n",
"initial conditions for household capital stocks.\n",
"\n",
"**Punchline:** there exists a representative consumer.\n",
"\n",
"We can use the representative consumer to compute a competitive equilibrium **aggregate** allocation and price system.\n",
"\n",
"With the equilibrium aggregate allocation and price system in hand, we can then compute allocations to each household.\n",
"\n",
"**Computing Allocations to Individuals:**\n",
"\n",
"Set\n",
"\n",
"$$\n",
"\\ell_{jt} = (\\mu_{0j}^w/\\mu_{0a}^w) \\ell_{at}\n",
"$$\n",
"\n",
"Then solve the following equation for $ \\mu_{0j}^{w} $:\n",
"\n",
"$$\n",
"\\mu_{0j}^{w} E_0 \\sum_{t=0}^\\infty \\beta^t \\{\\rho_t^0 \\cdot \\rho_t^0\n",
" + (w_t^0/ \\mu_{0a}^{w}) \\ell_{at} \\}\n",
" = E_0 \\sum_{t=0}^\\infty \\beta^t \\{ \\rho_t^0 \\cdot (b_{jt} - s_{jt}^i)\n",
" - \\alpha_t^0 \\cdot d_{jt} \\}\n",
" - v_0 k_{j,-1}\n",
"$$\n",
"\n",
"$$\n",
"s_{jt} - b_{jt} = \\mu_{0j}^w\\rho^0_t\n",
"$$\n",
"\n",
"$$\n",
"\\begin{aligned}\n",
"c_{jt} &= - \\Pi^{-1} \\Lambda h_{j,t-1} + \\Pi^{-1}s_{jt} \\\\\n",
"h_{jt} &= (\\Delta_h - \\Theta_h \\Pi^{-1}\\Lambda) h_{j,t-1} + \\Pi^{-1}\n",
" \\Theta_h s_{jt}\n",
"\\end{aligned}\n",
"$$\n",
"\n",
"Here $ h_{j,-1} $ given."
]
},
{
"cell_type": "markdown",
"id": "b2d852bb",
"metadata": {},
"source": [
"## Non-Gorman Heterogeneous Households\n",
"\n",
"We now describe a less tractable type of heterogeneity across households that we dub **Non-Gorman heterogeneity**.\n",
"\n",
"Here is the specification:\n",
"\n",
"Preferences and Household Technologies:\n",
"\n",
"$$\n",
"- {1\\over 2} E\\, \\sum^\\infty_{t=0}\\, \\beta^t\\, [ (s_{it} - b_{it}) \\cdot\n",
"(s_{it} - b_{it}) + \\ell^2_{it}]\\mid J_0\n",
"$$\n",
"\n",
"$$\n",
"\\begin{aligned}\n",
"s_{it} &= \\Lambda_i h_{i t-1} + \\Pi_i\\, c_{it} \\\\\n",
"h_{it} &=\\Delta_{h_i}\\, h_{i t-1} + \\Theta_{h_i} c_{it}\\ ,\\ i=1,2 .\n",
"\\end{aligned}\n",
"$$\n",
"\n",
"$$\n",
"b_{it} = U_{bi} z_t\n",
"$$\n",
"\n",
"$$\n",
"z_{t+1} = A_{22} z_t + C_2 w_{t+1}\n",
"$$\n",
"\n",
"**Production Technology**\n",
"\n",
"$$\n",
"\\Phi_c (c_{1t} + c_{2t}) + \\Phi_g g_t + \\Phi_i i_t = \\Gamma\n",
"k_{t-1} + d_{1t} + d_{2t}\n",
"$$\n",
"\n",
"$$\n",
"k_t = \\Delta_k k_{t-1} + \\Theta_k i_t\n",
"$$\n",
"\n",
"$$\n",
"g_t \\cdot g_t = \\ell^2_t,\\qquad\n",
" \\ \\ell_t = \\ell_{1t} + \\ell_{2t}\n",
"$$\n",
"\n",
"$$\n",
"d_{it} = U_{d_i} z_t, \\quad \\ i=1,2\n",
"$$\n",
"\n",
"**Pareto Problem:**\n",
"\n",
"$$\n",
"\\begin{aligned}\n",
"& - {1\\over 2}\\, \\lambda E_0 \\sum^\\infty_{t=0}\\, \\beta^t [ (s_{1t}\n",
"-b_{1t})\\cdot (s_{1t} - b_{1t}) + \\ell^2_{1t}]\\\\\n",
"&\n",
"-{1\\over 2}\\, (1-\\lambda) E_0 \\sum^\\infty_{t=0}\\, \\beta^t [ (s_{2t} -\n",
"b_{2t}) \\cdot (s_{2t} - b_{2t}) + \\ell^2_{2t}]\n",
"\\end{aligned}\n",
"$$\n",
"\n",
"**Mongrel Aggregation: Static**\n",
"\n",
"There is what we call a kind of **mongrel aggregation** in this setting.\n",
"\n",
"We first describe the idea within a simple static setting in which there is a single consumer static inverse demand with\n",
"implied preferences:\n",
"\n",
"$$\n",
"c_t = \\Pi^{-1} b_t - \\mu_0 \\Pi^{-1} \\Pi^{-1 \\prime} p_t\n",
"$$\n",
"\n",
"An inverse demand curve is\n",
"\n",
"$$\n",
"p_t = \\mu_0^{-1} \\Pi' b_t - \\mu_0^{-1} \\Pi' \\Pi c_t\n",
"$$\n",
"\n",
"Integrating the marginal utility vector shows that preferences can be\n",
"taken to be\n",
"\n",
"$$\n",
"( - 2 \\mu_0)^{-1} (\\Pi c_t - b_t) \\cdot (\\Pi c_t - b_t )\n",
"$$\n",
"\n",
"\n",
"\n",
"**Key Insight:** Factor the inverse of a ‘covariance matrix’.\n",
"\n",
"Now assume that there are two consumers, $ i=1,2 $, with demand curves\n",
"\n",
"$$\n",
"c_{it} = \\Pi_i^{-1} b_{it} - \\mu_{0i} \\Pi_i^{-1} \\Pi_i^{-1 \\prime} p_t\n",
"$$\n",
"\n",
"$$\n",
"c_{1t} + c_{2t} = (\\Pi_1^{-1} b_{1t} + \\Pi_2^{-1} b_{2t})\n",
" - (\\mu_{01} \\Pi_1^{-1} \\Pi_1^{-1 \\prime} + \\mu_{02} \\Pi_2\n",
" \\Pi_2^{-1 \\prime}) p_t\n",
"$$\n",
"\n",
"Setting $ c_{1t} + c_{2t} = c_t $ and solving for $ p_t $ gives\n",
"\n",
"$$\n",
"\\begin{aligned}\n",
"p_t &= (\\mu_{01} \\Pi_1^{-1} \\Pi_1^{-1 \\prime} + \\mu_{02}\n",
" \\Pi_2^{-1} \\Pi_2^{-1 \\prime})^{-1}\n",
" (\\Pi_1^{-1} b_{1t} + \\Pi_2^{-1} b_{2t}) \\\\\n",
"&- (\\mu_{01} \\Pi_1^{-1} \\Pi_1^{-1 \\prime} +\n",
" \\mu_{02} \\Pi_2^{-1} \\Pi_2^{-1 \\prime}\n",
" )^{-1} c_t\n",
"\\end{aligned}\n",
"$$\n",
"\n",
"**Punchline:** choose $ \\Pi $ associated with the aggregate ordering to\n",
"satisfy\n",
"\n",
"$$\n",
"\\mu_0^{-1} \\Pi' \\Pi = (\\mu_{01} \\Pi_1^{-1} \\Pi_2^{-1 \\prime}\n",
" + \\mu_{02} \\Pi_2^{-1} \\Pi_2^{-1 \\prime})^{-1}\n",
"$$\n",
"\n",
"**Dynamic Analogue:**\n",
"\n",
"We now describe how to extend mongrel aggregation to a dynamic setting.\n",
"\n",
"The key comparison is\n",
"\n",
"- Static: factor a covariance matrix-like object \n",
"- Dynamic: factor a spectral-density matrix-like object \n",
"\n",
"\n",
"Programming Problem for Dynamic Mongrel Aggregation:\n",
"\n",
"Our strategy for deducing the mongrel preference ordering over\n",
"$ c_t = c_{1t} + c_{2t} $ is to solve the programming problem:\n",
"choose $ \\{c_{1t},c_{2t}\\} $ to maximize the criterion\n",
"\n",
"$$\n",
"\\sum^\\infty_{t=0} \\beta^t [\\lambda (s_{1t} - b_{1t}) \\cdot (s_{1t} - b_{1t})\n",
" + (1-\\lambda) (s_{2t} - b_{2t}) \\cdot (s_{2t} - b_{2t})]\n",
"$$\n",
"\n",
"subject to\n",
"\n",
"$$\n",
"\\begin{aligned}\n",
"h_{jt} &= \\Delta_{hj}\\, h_{jt-1} + \\Theta_{hj}\\, c_{jt}, j=1,2\\\\\n",
"s_{jt} &=\\Delta_j h_{jt-1} + \\Pi_j c_{jt}\\ , j=1,2\\\\\n",
"c_{1t} + c_{2t} &=c_t\n",
"\\end{aligned}\n",
"$$\n",
"\n",
"subject to $ (h_{1, -1},\\, h_{2, -1}) $ given and\n",
"$ \\{b_{1t}\\},\\, \\{b_{2t}\\},\\, \\{c_t\\} $ being known and fixed\n",
"sequences.\n",
"\n",
"Substituting the $ \\{c_{1t},\\, c_{2t}\\} $ sequences that\n",
"solve this problem as functions of $ \\{b_{1t},\\, b_{2t},\\, c_t\\} $\n",
"into the objective determines a mongrel preference ordering over\n",
"$ \\{c_t\\} = \\{c_{1t} + c_{2t}\\} $.\n",
"\n",
"In solving this problem, it is convenient to proceed by using Fourier\n",
"transforms. For details, please see [[HS13](https://python-advanced.quantecon.org/zreferences.html#id67)] where they deploy a\n",
"\n",
"**Secret Weapon:** Another application of the spectral factorization\n",
"identity.\n",
"\n",
"**Concluding remark:** The [[HS13](https://python-advanced.quantecon.org/zreferences.html#id67)] class of models described in this lecture are all complete markets models. We have exploited\n",
"the fact that complete market models **are all alike** to allow us to define a class that **gives the same name to different things** in the\n",
"spirit of Henri Poincare.\n",
"\n",
"Could we create such a class for **incomplete markets** models?\n",
"\n",
"That would be nice, but before trying it would be wise to contemplate\n",
"the remainder of a statement by Robert E. Lucas, Jr., with which we began this lecture.\n",
"\n",
"> “Complete market economies are all alike but each incomplete market economy is incomplete in its own individual way.” Robert E. Lucas, Jr., (1989)"
]
}
],
"metadata": {
"date": 1637718165.0534933,
"filename": "hs_recursive_models.md",
"kernelspec": {
"display_name": "Python",
"language": "python3",
"name": "python3"
},
"title": "Recursive Models of Dynamic Linear Economies"
},
"nbformat": 4,
"nbformat_minor": 5
}