Undergraduate Computational Macro
What if the agent does not know \(\{c_t\}_{t=0}^\infty\) because it is random or uncertain?
In that case, we can instead have the agent compare expected utility streams
\[ \mathbb{E}_t\left[\sum_{j=0}^\infty \beta^j u(c_{t+j})\right] \]
Consider a utility \(u(c)\) and a lottery which is a random variable
Note if risk-neutral then \(\mathbb{E}[C] = \frac{1}{2} c_L + \frac{1}{2}c_H = \bar{c} = u(\bar{c})\)
Then if an agent is risk-averse, \[ u(\mathbb{E}(C)) > \mathbb{E}[u(C)] \]
In the simplest version, think of there being a “tree” which produces a random stream of fruit each period.
The random sequence of consumption goods (fruit) is \(\{d_t\}_{t=0}^{\infty}\)
Let the process determining the fruit be Markov, where for some \(w_{t+1}\) iid
\[ d_{t+1} = h(d_t, w_{t+1}) \]
Assume the “fruit” is not storable
The agent is a price taker at \(p_t\) (i.e., this is a competitive equilibrium)
State: \(\pi_t\) and \(d_t\) (and information sets for \(d_{t+j}\) and \(p_{t+j}\) forecasts)
Taking prices as given, the consumer solves
\[ \begin{aligned} \max_{\{c_{t+j}, \pi_{t+j+1}\}_{j=0}^{\infty}} &\mathbb{E}_t\left[\sum_{j=0}^\infty \beta^j u(c_{t+j})\right]\\ \text{s.t. }& c_{t+j} + p_{t+j} \pi_{t+j+1} = \pi_{t+j} (d_{t+j} + p_{t+j}),\text{ for all }j\geq 0\\ \end{aligned} \]
If \(d_t\) is Markov, we can write this problem recursively as a Bellman equation
Let the Markov price be \(p(d)\), then the Bellman equation for the consumer is
\[ \begin{aligned} V(\pi, d) &= \max_{c, \pi'}\left[u(c) + \beta \mathbb{E}[V(\pi', d') | d]\right]\\ \text{s.t. }& c + \pi'p(d) = \pi (d + p(d)) \end{aligned} \]
Substituting the budget constraint into the Bellman equation
\[ V(\pi, d) = \max_{\pi'}\big[u(\underbrace{\pi(d + p(d)) - \pi'p(d)}_{c(\pi, \pi', d)}) + \beta \mathbb{E}[V(\pi', d') | d]\big] \]
Take the \(\partial_{\pi'}\) of the Bellman equation
\[ 0 = -p(d) u'(\pi(d + p(d)) - \pi'p(d)) + \beta \mathbb{E}[\partial_{\pi}V(\pi', d') | d] \]
Next the envelope theorem tells us how the value function changes with respect to the state variable \(\pi\) \[ \partial_{\pi}V(\pi, d) = u'(c)(d + p(d)) \]
Use \(c = \pi(d + p(d)) - \pi'p(d)\), and \(d' = h(d, w)\) for \(\mathbb{E}[\cdot]\)
\[ p(d) = \mathbb{E}\left[\beta \frac{u'(c')}{u'(c)}(d' + p(d')) \bigg| d\right] \]
This is the celebrated consumption-based asset pricing equation
\[ p(d) = \mathbb{E}\bigg[\underbrace{\beta \frac{u'(c')}{u'(c)}}_{m(c,c')}(d' + p(d')) \bigg| d\bigg] \]
If the consumer’s consumption is tightly connected to the fruit of this particular asset, then there may be a correlation between \(c\) and the \(d\) and hence between \(m(c,c')\) and \(d' + p(d')\)
In that case, lets directly use the \(m_{t+1}\) has a stochastic process
It could have any correlation with a particular \(d_{t+1}\) process
In that notation, the asset pricing equation is
\[ p_t = \mathbb{E}_t\left[m_{t+1} (d_{t+1} + p_{t+1})\right] \]
Note that the first payoff of the “dividend” occurs at \(t+1\). This is called ex-dividend pricing
Next, the \(d' + p(d')\) term is more mechanical in \[ p(d) = \mathbb{E}\bigg[\beta \frac{u'(d')}{u'(d)}(d' + p(d')) \bigg| d\bigg] \]
Suggests crucial to understand how \(m'\) and \(d'\) are correlated
For any random variables \(x_{t+1}\) and \(y_{t+1}\)
The definition of the conditional covariance \({\rm cov}_t (x_{t+1}, y_{t+1})\) is
\[ {\mathbb E}_t (x_{t+1} y_{t+1}) \equiv {\rm cov}_t (x_{t+1}, y_{t+1}) + {\mathbb E}_t x_{t+1} {\mathbb E}_t y_{t+1} \]
The key to understanding the price of an asset with payoff process \(d_{t+1}\) will be its covariance with the SDF
Apply this decomposition to the asset pricing equation
\[ \begin{aligned} p_t &= \mathbb{E}_t\left[m_{t+1} (d_{t+1} + p_{t+1})\right]\\ &= {\mathbb E}_t m_{t+1} {\mathbb E}_t (d_{t+1} + p_{t+1}) + {\rm cov}_t (m_{t+1}, d_{t+1}+ p_{t+1}) \end{aligned} \]
Recall: \(m_{t+1}\) measures value of consumption in different states
For example, if consumption in a state is lower relative to today means \(u'(c_{t+1})/u'(c_t)\) is higher and \(m_{t+1}\) is higher
Risk-free asset is a claim to one unit of consumption tomorrow with certainty
The SDF \(m_{t+1}\) is a random variable which says how much you value payoff tomorrow in various states of the world
Given the complete markets in the economy we see that
\[ \frac{1}{R^{RF}_t} = \mathbb{E}_t\left[\beta \frac{u'(c_{t+1})}{u'(c_t)}\right] = \mathbb{E}_t\left[m_{t+1}\right] \]
Powerful tool: given asset prices such as the interest rate, and a functional form of \(m_{t+t}\) you can infer the market expectations of \(c_{t+1}/c_t\)
Given that the growth rates of payoffs (and its correlation to the SDF) will be essential, define the growth rate of the endowments (e.g. dividends) as \[ d_{t+1} = G_{t+1} d_t \]
Since the underlying random variable is \(X_t\) we can write this as \[ G_{t+1} = G(X_{t+1}) \]
Similarly, the SDF is IID and may be correlated with \(G_t\) through \(X_t\) \[ m_{t+1} \equiv m(X_{t+1}) \]
Consider if \(X_t \in \{x_1, \ldots x_N\}\) a Markov Chain where
\[ P_{ij} \equiv \mathbb P ( X_{t+1} = x_j \,|\, X_t = x_i ),\quad \text{ for }i=1,\ldots N, j=1,\ldots N \]
Baseline growth factor: \(G(x_i) = \exp(x_i)\), with \(x_i > 0\) for all \(i=1,\ldots N\), and hence \(\log G(x_i) = x_i\)
Baseline process for \(X_t\): discretized AR(1) process using Tauchen’s Method
If risk-neutral, then \(m_{t+1} = \beta\) for all \(X_t\)
Given the finite number of states, we can find a vector \(v_t = v(X_t)\)
Define the matrix \(K\) where \(K_{ij} \equiv G(x_j) P_{ij}\) and
\[ \begin{aligned} v_i &= \beta \sum_{j = 1}^N K_{ij} (1 + v_j)\quad \text{for }i=1,\ldots N\\ v &= \beta K (\mathbb 1 + v)\\ v &= (I - \beta K)^{-1} \beta K{\mathbb 1} \end{aligned} \]
Utility: \(u(c) = \frac{c^{1-\gamma}-1}{1 - \gamma} \ {\rm with} \ \gamma > 0\)
With complete market, \(d_t = c_t\) and the SDF is
\[ m_{t+1} = \beta \frac{u'(c_{t+1})}{u'(c_t)} = \beta \left(\frac{c_{t+1}}{c_t}\right)^{-\gamma} = \beta G_{t+1}^{-\gamma} \]
Substitute this into the formula for the price-to-dividend ratio
\[ \begin{aligned} v(X_t) &= \beta {\mathbb E}_t \left[ G(X_{t+1})^{-\gamma}G(X_{t+1}) (1 + v(X_{t+1}) ) \right]\\ v_i &= \beta \sum_{j = 1}^N G(x_j)^{1-\gamma} (1 + v_j) P_{ij} \end{aligned} \]
Rearranging as a fixed point with \(J_{ij} \equiv G(x_j)^{1-\gamma} P_{ij}\) \[ \begin{aligned} v &= \beta J ({\mathbb 1} + v )\\ v &= (I - \beta J)^{-1} \beta J {\mathbb 1} \end{aligned} \]
function asset_pricing_model(; beta = 0.96, gamma = 2.0, G = exp,
mc = tauchen(25, 0.9, 0.02))
G_x = G.(mc.state_values)
return (; beta, gamma, mc, G, G_x)
end
# price/dividend ratio of the Lucas tree
function tree_price(ap)
(; beta, mc, gamma, G) = ap
P = mc.p
y = mc.state_values'
J = P .* G.(y) .^ (1 - gamma)
@assert maximum(abs, eigvals(J)) < 1 / beta # check stability
v = (I - beta * J) \ sum(beta * J, dims = 2)
return v
end
Letting \(M_{ij} \equiv P_{ij} G(X_j)^{-\gamma}\) and rewriting in vector notation yields the solution
\[ p = (I - \beta M)^{-1} \beta M \zeta {\mathbb 1} \]
Using our SDF process
\[ w(x_i, p_S) = \max \left\{ \beta \sum_{j = 1}^N P_{ij} G(X_j)^{-\gamma} w (x_j, p_S), \; p(x_i) - p_S \right\} \]
If we define \(M_{ij}\equiv P_{ij} G(X_j)^{-\gamma}\) and stack prices then
\[ w = \max \{ \beta M w, \; p - p_S {\mathbb 1} \} \]
To solve this problem, define an operator \(T\) mapping vector \(w\) into vector \(T(w)\) via
\[ T(w) = \max \{ \beta M w,\; p - p_S {\mathbb 1} \} \]
# price of perpetual call on consol bond
function call_option(ap, zeta, p_s)
(; beta, gamma, mc, G) = ap
P = mc.p
y = mc.state_values'
M = P .* G.(y) .^ (-gamma)
@assert maximum(abs, eigvals(M)) < 1 / beta
p = consol_price(ap, zeta)
# Operator for fixed point, using consol prices
T(w) = max.(beta * M * w, p .- p_s)
sol = fixedpoint(T, zeros(length(y), 1))
converged(sol) || error("Failed to converge in $(sol.iterations) iter")
return sol.zero
end