Skip to main content

13  Discrete Time Dynamic Problems

This section introduces discrete-time dynamic programming problems, Bellman equations, value functions, and policy rules in finite and infinite horizon settings.

13.1 Dynamic consideration of job offer acceptance

13.1.1 Taking a job offer or not, two job offers

You are looking for job, without the outside option of not participating in the labor force. Suppose you know that you will have two job offers that will arrive in sequence. If you accept the first job offer, you stop job search. If, however, you reject the first job offer, you will receive a second job offer, which you will accept for sure. Ignore the issue of “waiting” for now, meaning that both jobs would start at the same date.

Let the wage offer from the first job be a random variable \(W_1\) with cumulative distribution function \(F_1(w_1)\), and let the wage offer from the second job be a random variable \(W_2\) with cumulative distribution function \(F_2(w_2)\).

The only choice her is whether you will take the first job offer, given the realization of \(w_1\). Since \(w_1\) is the only piece of information available at the time of making the first job decision, that is a “state variable”, and the “choice variable” is the binary decision to accept the offer or not. Let \(a_1=1\) be accept the first job, and \(a_1=0\) be reject the first job. The second job is accepted for sure, so \(a_2=1\).

Suppose utility is linear in wages \(U=w\), which means \(E(U(w)) = U(E(w))\). Hence maximizing expected wage is equivalent to maximizing expected utility.

The “value function” for this problem can be written as:

\[ V_1\left(w_1\right) = \max \left( w_1, E(w_2 \mid w_1) \right) = \max_{a_1 \in \{0,1\}} a_1 w_1 + (1-a_1) E(w_2 \mid w_1) \]

The solution to this problem is to accept the first job offer if \(w_1 \geq E(w_2)\), and reject it otherwise. The optimal decision rule, what we call the “policy function”, can be summarized as:

\[ a_1^*(w_1) = \begin{cases} 1 & \text{if } w_1 \geq w^{\ast}_1 = E_{W_2}(w_2 \mid w_1) \\ 0 & \text{if otherwise}\\ \end{cases} \]

Note that the policy and value functions are both functions of the state variable. Note that we have \(E(w_2 \mid w_1)\) because we did not say the two wages are independent. And we defined \(w^{\ast}_1\), which is the reservation wage for accepting the first job.

13.1.2 Taking a job offer or not, three offers

Now, what if we have three job offers that will arrive in sequence?

Let the wage offer from the first job be a random variable \(w_1\) with cumulative distribution function \(F_1(x)\), the wage offer from the second job be a random variable \(w_2\) with cumulative distribution function \(F_2(x)\), and the wage offer from the third job be a random variable \(w_3\) with cumulative distribution function \(F_3(x)\).

Suppose you have already rejected the first job offer, and now you are considering the second job offer. The value function for this problem can be written as:

\[ V_2(w_1, w_2) = \max \left( w_2, E_{W_3}(w_3 \mid w_1, w_2) \right) = \max_{a_2 \in \{0,1\}} a_2 w_2 + (1-a_2) E_{W_3}(w_3 \mid w_1, w_2) \]

Note that, we have two alternative information structures here:

  • if \(E(w_3 \mid w_2, w_1) = E(w_3 \mid w_2)\), then \(V_2(w_2) = \max \left( w_2, E_{W_3}(w_3 \mid w_2) \right)\)
  • if \(E(w_3 \mid w_2, w_1) = E(w_3)\), then \(V_2(w_2) = \max \left( w_2, E_{W_3}(w_3) \right)\)

And stepping back to period 1, the value function for this problem can be written as:

\[ V_1(w_1) = \max \left( w_1, E_{W_2}\left(V_2(w_1, w_2)\right) \right) = \max_{a_1 \in \{0,1\}} w_1 a_1 + (1-a_1) E_{W_2}\left(V_2(w_1, w_2)\right) \]

Note that:

  • \(V_1(w_1)\) is the value of receiving \(w_1\) wage offer from the first job/wage draw. This is not the value of accepting the wage. The value of accepting the wage offer \(w_1\) is \(w_1\), which is compared against the expected value of continuing to wait \(E_{W_2}\left(V_2(w_1, w_2)\right)\).

We can write out more fully the Expectation expression in \(V_1\):

\[ V_1(w_1) = \max_{a_1 \in \{0,1\}}\left( w_1 a_1 + (1-a_1) \int \left( \max_{a_2 \in \{0,1\}} a_2 w_2 + (1-a_2) \int w_3 f(w_3 \mid w_1, w_2) dw_3 \right) f(w_2 \mid w_1) dw_2 \right) \]

This shows that we are choosing \(a_1\), taking into consideration all the optimal \(a_2\) choices given different \(w_2\) realizations. But the above expression takes too much time to write, and we don’t have enough space if there are 10 forthcoming offers. That’s why we prefer the earlier expression for \(V_1\) where we just have \(V_2\) on the right-hand-side.

13.2 Harold Zurcher’s dynamic considerations of engine replacement

13.2.1 Relative costs of replacement and continuing operations

In “Optimal Replacement of GMC Bus Engines: An Empirical Model of Harold Zurcher” (Rust 1987), Rust develops a dynamic programming framework to analyze the decision-making process of bus engine replacement, which can be adapted to various binary choice scenarios in economics.

We present a simplified version of the model here.

State variable:

  • \(x_t\) be the state variable at time \(t\) (e.g., mileage of the bus engine). There will be some \(V(x_t)\), representing the value of arriving in a period with state \(x_t\).
  • HZ, importantly, does not know what \(x_{t+1}\) will be for sure, but just the distribution of random variable \(x_{t+1}\), which has the cumulative distribution function \(F(x_{t+1})\).

Choice variable:

  • The decision problem at each time time \(t\) is \(i_t=0\) or \(i_t=1\), for keeping engine or replacing it. There will be a policy function \(i_t^*(x_t)\), which is the optimal decision rule for the state variable \(x_t\).
  • Imagine this decision takes place at the very start of period \(t\), and maintenance cost is paid over the mileage accumulated from prior periods up to this point, \(x_t\). After maintenance or engine replacement, the bus will operate for the period either with a new engine or the old engine and incur new mileage, which will become \(x_{t+1}\) by the end of period \(t\) or the beginning of period \(t+1\).
  • Normal maintenance (\(i_t =0\)):\(c(x_{t})\) period-specific cost of operation, a function of mileage \(x_t\).
  • Replacement (\(i_t = 1\)): Sell the engine for \(\underline{P}\), buy new engine for \(\overline{P}\), which happen instantaneously, and begin maintenance operation under \(c(0)\), the cost of maintaining a new engine.
  • Plausibly, replacement leads to higher costs in the current period, but lower costs going forward. It could also be that replacement cost is so low that HZ replaces the engine every period, or that replacement cost is so high that HZ never replaces the engine.

The engine maintenance cost facing HZ, given decision \(i_t\) and state \(x_t\), is:

\[ \text{cost}(x_t, i_t) = \text{MaintainCost}((1-i_t) x_t \mathrel{;} \theta) + i_t (\overline{P} - \underline{P}) \]

where \(\theta\) is a vector of parameters that govern the maintenance cost function. When \(i_t=1\), selling the old engine for \(\underline{P}\) and buying a new one for \(\overline{P}\) is a net cash outflow of \((\overline{P}-\underline{P})\).

Assume that the process for \(x_{t+1}\) is governed by the law of motion:

\[ x_{t+1} = \left(1-i_t\right) x_t + \epsilon_{t+1} \]

where \(\epsilon_{t+1}\) is the positive random mileage accumulated during period \(t\). Assume these shocks are independent and identically distributed across periods and independent of the current state and choice.

13.2.2 The decision problem to replace and value function

Suppose HZ aims to minimize the (present-value) expected cost of bus operations. Note that there are many other decisions related to running the bus company, but conditional on the routes, fleet of busses, and other factors, we are only focused on the engine replacement decision.

You can think about this from the perspective of minimizing the cost of running one bus forever, with engine replacement. We can replace the engine every 10 miles, every 100 miles, etc. What is the optimal threshold, given the uncertainty in mileage realization, and also given the cost function?

In reality, there might be an end of lifecycle for each bus, and we could solve this as a finite horizon problem, starting from the required date when the bus must be scraped. This is actually how we will solve the problem. But we will arrive at a “stationary” solution for an infinite horizon problem, not because a bus lasts forever, but because for much of a bus’s life of operation, its repair timeframe is short relative to the lifespan of the bus. Infinite horizon has one value function that applies to all periods (rather than period-specific value function in finite horizon problems).

The value function is:

\[ V(x) = \max \left( \begin{array}{c} - \text{cost}(x, 1) + \frac{1}{1+r} E_{\epsilon}V(\epsilon)\thinspace\thinspace ,\\ - \text{cost}(x, 0) + \frac{1}{1+r} E_{\epsilon_{t}} (V(x + \epsilon))\thinspace\\ \end{array} \right) \]

Alternatively, we can write this as

\[ V(x) = \max_{i \in \{0,1\}} - \text{cost}(x, i) + \frac{1}{1+r} E_{\epsilon} (V((1 - i)x + \epsilon)) \]

Now we can solve for \(i^*(x)\), the optimal decision rule for the state variable \(x\), and find the \(x^*\), the optimal threshold for replacing the engine.

13.2.3 Solving the infinite horizon problem backwards until convergence

How do we solve for this?

  1. As a general strategy, we start with some guess for \(V(x)\), call this \(V^0(x)\), and generally, this starting guess is that \(V(x) = 0\) for all \(x\).
  2. Then we solve the problem iterative “backwards”, find the \(V\) solution on the left-hand-side when on the right-hand-side, we have \(V^0\). Call this \(V^1(x)\). Think about the right-hand-side of the value function above as a “bellman operator”, denoted by \(T\), that takes a hypothesized value function, and spits out a new one:\(V^1(x) = T(V^0(x))\).
  3. We now put \(V^1(x)\) back into the right-hand-side, and solve for \(V^2(x)\):\(V^2(x) = T(V^1(x))\).
  4. Iterate until successive value functions are sufficiently close in the sup norm, for example, stop when \(\|V^{n+1}-V^n\|_{\infty}<\varepsilon\) for a chosen tolerance \(\varepsilon\). Under conditions that make the Bellman operator a contraction, the iterates converge to its unique fixed point \(V^*(x)=T(V^*)(x)\).

We have not discussed the integration of over the future values of \(x'\) given \(x\). This can have more or less complex structures depending on assumptions on the distribution of mileage realizations per period.

This contraction might or might not happen, for contraction to a fixed point, we want to avoid the value function from “exploding” as we iterate:

  • Bounded current payoff: Over the domain of feasible \(x\) values we consider, the \(-cost(x,i)\) function needs to be “bounded”, meaning it cannot go to infinity for any \(x\) in the domain. If this is not the case, we might not be able to find a fixed point for the value function.
  • Discounting: The discount factor \(\frac{1}{1+r}\) needs to be less than 1, which is the case if \(r > 0\). This ensures that future costs are discounted sufficiently, preventing the value function from exploding as we iterate and add subperiods up to infinity.
  • Well defined expectation: The expectation operator \(E_{\epsilon}\) needs to be well-defined, meaning that the distribution of \(\epsilon\) should not lead to infinite expected values for the future value function.

13.2.4 Value function iteration from guess fo \(V^0(w)\)

With \(V^0(x)=0\) as an initial guess, the value function simplifies to:

\[ V^1(x) = \max_{i \in \{0,1\}} - \text{cost}(x, i) \]

This is also the last-period problem in a finite-horizon version, because there is no future value after the current period. Replacement may still be optimal if its net cost plus the new engine’s current maintenance cost is below the cost of operating the old engine. This does not imply that replacement is optimal every period; the comparison can change with mileage and the value of future operation.

Given \(V^1(x)\), the value function in the second to last period can be expressed as:

\[ V^2(x) = \max_{i \in \{0,1\}} - \text{cost}(x, i) + \frac{1}{1+r} E_{\epsilon} (V^1((1-i)x + \epsilon)) \]

We continue to iterate.

13.3 Education, work experience and savings

13.3.1 Finite horizon, work vs school and earnings function

We have a finite horizon model with \(T\) periods that focuses on the evolution of education and work experience over the life cycle.

The choice space, state space, and the evolution of the state space have these features:

  • One single choice: \(a_t\in\{0,1\}\), where \(1\) represents working and \(0\) represents attending school.
  • Three elements in the state space: \(E_t\), \(X_t\), and \(\epsilon_t\), which is the shock to the wage function.
  • If the individual works, \(X_{t+1} = X_t + 1\) and \(E_{t+1} = E_t\). If the individual attends school, \(E_{t+1} = E_t + 1\) and \(X_{t+1} = X_t\).
  • \(\epsilon_t\) follows a known autoregressive stochastic process, where the realization of \(\epsilon_{t+1}\) depends on \(\epsilon_t\), \(\epsilon\) is a continuous random variable and the conditional density is known: \(f_t(\epsilon_{t+1}|\epsilon_t)\), where we allow this to be age-dependent as well.
  • The initial educational attainment is \(E_1\) and work experience is \(X_1\).

The income and resource constraint have these features:

  • The wage function is given by \(w_t = W_t(E_t, X_t, \epsilon_t)\), where \(f\) is a deterministic function of education and experience, and \(\epsilon_t\) is a stochastic shock. We allow this function to be \(t\) (age) specific.
  • The cost of schooling is \(\psi\).
  • The household has a fixed transfer each period, which is \(y\), earned regardless of schooling/working choice.
  • The budget of the household is \(c_t = y + w_t (a_t) - \psi (1-a_t)\), where \(c_t\) is consumption, \(w_t\) is the wage, and \(a_t\) is the schooling/working choice.

And utilty is:

  • Some function of consumption, \(u(c_t)\), where \(u\) is increasing and concave.
  • Time discount is \(\beta \in (0,1)\).

Given these, the value function for period \(t<T\) can be written as:

\[ V_t(E_t, X_t, \epsilon_t) = \max_{a_t \in \{0,1\}} \left\{ u(c_t) + \beta \mathbb{E}_{t+1}[V_{t+1}(E_{t} + (1-a_t), X_{t} + a_t, \epsilon_{t+1}) | \epsilon_t] \right\}, \]

where the expectation is taken with respect to the conditional distribution of \(\epsilon_{t+1}\) given \(\epsilon_t\), given period-specific transition distribution functions \(f_t(\epsilon_{t+1}|\epsilon_t)\). Consumption \(c_t\) is equal to:

\[ c_t = y + W_t(E_t, X_t, \epsilon_t) (a_t) - \psi (1-a_t), \]

and \(y>\psi\), so that education is affordable. In the terminal period, there is no future return to schooling. The terminal choice is

\[ V_T(E_T, X_T, \epsilon_T) =\max_{a_T\in\{0,1\}}u\left(y+W_T(E_T,X_T,\epsilon_T)a_T-\psi(1-a_T)\right). \]

If wages and schooling costs are nonnegative, working weakly dominates schooling in the terminal period, and this reduces to utility of working income.

The trade-off in this model is that households who choose to work now get more current income, but at a cost of future income (assuming wage function is increasing in education and experience). Whether the cost is worthwhile to pay for depends on how many periods there are left between \(t\) and \(T\).

Note that one significant assumption with this model is that agents are assumed to be hand-to-mouth—there is no dynamic asset decisions. Households consume all that is earned in each period. There is no dynamics of savings accumulation of borrowing that is a key feature of life-cycle economic decisions.

13.3.2 Finite horizon, work vs school and earnings function, and borrowing and savings

We preserve the structure of the prior set up, but now incorporate an additional state variable, \(B_t\), this is the asset level, if this is positive, the household has savings, if this is negative the household is borrowing.

We impose a \(B \ge \widehat{B}\). If \(\widehat{B} =0\), that means the household can only save. If \(\widehat{B} < 0\), the household can borrow up to a certain limit (which might or might not be binding). If \(\widehat{B} > 0\), then the bank does not let the household borrow and has a minimum balance requirement for savings. Futhermore, let’s assume that borrowing and savings rates are the same—\(r\).

Additionally, we do not need \(y\) anymore, because now we could use \(B_t\) to pay for education when the household is not working. Importantly, \(B_1 \ge 0\), and richer households could have higher values of \(B_1\).

Our value function setup will be very similar before, with the addition of one state and one choice variable, and an adjustment in the resource constraint. The value function for period \(t < T\) can be written as:

\[ V_t(E_t, X_t, B_t, \epsilon_t) = \max_{a_t \in \{0,1\}, B_{t+1} \ge \widehat{B}} \left\{ u(c_t) + \beta \mathbb{E}_{t+1}[V_{t+1}(E_{t} + (1-a_t), X_{t} + a_t, B_{t+1}, \epsilon_{t+1}) | \epsilon_t] \right\}, \]

where the expectation works in the same way as before. Consumption \(c_t\) is now given by:

\[ B_{t+1} + c_t = B_t \cdot (1+r) + W_t(E_t, X_t, \epsilon_t) (a_t) - \psi (1-a_t). \]

The trade-off in the problem is now both about whether to work or go to school, and whether to borrow or save given current work decision and current asset position. If borrowing is allowed, a household with low initial assets \(B_1\) might borrow to finance education in earlier ages, then repay student debt and save during peak earning years, and eventually rely more on savings when earnings capacity decreases later in life.

To complete this finite-horizon asset problem, specify a terminal asset payoff or condition. With no bequest and no value for assets after period \(T\), one can impose \(B_{T+1}=0\) and maximize terminal-period utility over the work-school choice subject to the budget constraint.

13.3.3 Infinite Horizon

We can also state the infinite horizon problem for a dynastic household (consider a village household persisting across generations). It does not make as much sense to think about education and work experience, so we will just focus on the asset variable \(B\) and the stochastic income term \(y\). We will have these two elements of the state-space, and use the prime symbol “’” to denote the state variable for the next period.

Our infinite horizon value function is:

\[ V(B, y) = \max_{B' \ge \widehat{B}} \left\{ u(c) + \beta \mathbb{E}[V(B', y') | y] \right\}, \]

where the expectation is taken with respect to the conditional distribution of \(y'\) given \(y\), and consumption \(c\) is given by:

\[ B' + c = B \cdot (1+r) + y. \]`

The idea here is that a household draws from a stochastic income process \(y\), and decides how much to consume and save in each period, taking into account the future utility from savings and the stochastic nature of income.

In quantitative economic analysis without aggregate uncertainty we often work through a five-step process to analyze the impact of policies on an economy:

  1. Solve the optimization problem, given some current guess for the value function (if infinite horizon) or given previously solved next period value function (if finite horizon).
  2. Solve for the value function until convergence of value function along all points in the domain of the state-space (if infinite horizon) or until the initial period (if finite horizon). At convergence, we have one policy function (if infinite horizon) or a sequence of policy functions (if finite horizon).
  3. Find the stationary distribution of endogenous state-variables and consequently the distribution of choice variables induced the policy function and the value function.
    • This is done by iteratively until convergence for infinite horizon models, with some exogenously imposed initial distribution and subsequent redistribution of mass of the last state-space distribution by the policy function.
    • For finite horizon model, this is done by simulating the distribution forward from the initial period using the sequence of policy functions and given some exogenous initial distribution of the state-space.
    • In overlapping generation models, the initial distribution of finite horizon state-space for new cohorts is endogenous to the distributions of assets from disappearing cohorts.
  4. Find the equilibrium object of interest, such as the interest rate or wage rate. This is done by resolving the three steps above many times, each time given different prices, to recover the demand and supply of assets and labor, and to find the equilibrium prices where the credit, labor, and other markets clear.
  5. Find parameters that match data to model. Now do 1 through 4 many many times, until our equilibrium model generates the same distribution of outcomes of interest as what we observed in the data of interest. This is the calibration/estimation step that pins down the parameters of the model that governs preerence, technology, budget, exogenous distributions and transitions, and constraints.

Quantitative economics is generally computationally intensive because the four steps above are nested and takes potentially a long time to iterative through just to solve the model once. Doing all five steps, especially if the 5th step involves the exploration of complex parameter-space can be very computationally intensive, especially when the researcher does not have clear guideposts on how different model parameters impact the different outcomes of interest.

13.4 Envelope Theorem, and Euler Condition

13.4.1 Envelope Theorem

Let \(a\in R\) and \(b\in R\), consider the solutions the the maximization problem below along with the function evaluated at the optimal choice function:

\[\begin{align} b^{\ast}(a) &= \argmax_{b} f(a, b)\\ f^{\ast}(a) = f(a, b^{\ast}(a)) &= \max_{b} f(a, b)\\ \end{align}\]

The function \(f\) is continuously differentiable over its domain. The optimal choice function, \(b^{\ast}(a)\) is continuously differentiable over \(a\).

It seems obvious that a shift in \(a\) could impact the optimal \(b^{\ast}(a)\) choice. Equally obvious is that a shift in \(a\) should also impact the objective function evaluated at the optimal choice, \(f^{\ast}(a)\). What turns out to be very interesting and perhaps surprising is that even though \(f^{\ast}(a)=f\left(a, b^{\ast}(a)\right)\) is a function of \(b^{\ast}(a)\), \(\frac{d b^{\ast}(a)}{d a}\) will not impact \(\frac{d f^{\ast}(a)}{d a}\). This idea is encapsulated in the “envelope theorem”. Specifically:

\[\begin{align} \frac{d f^{\ast}(a)}{d a} &= \frac{d f(a, b^{\ast}(a))}{d a}\\ &= \frac{\partial f(a, b^{\ast}(a))}{\partial a} + \frac{\partial f(a, b^{\ast}(a))}{\partial b}\cdot \frac{d b^{\ast}(a)}{d a}\\ &= \frac{\partial f(a, b^{\ast}(a))}{\partial a} + 0 \cdot \frac{d b^{\ast}(a)}{d a}\\ &= \frac{\partial f(a, b^{\ast}(a))}{\partial a}\\ \end{align}\]

The above derivation relies on \(\frac{\partial f(a, b^{\ast}(a))}{\partial b}=0\), which is true by the definition of optimality: given \(a\), \(b^{\ast}\) is already the optimal choice, and the slope at optimal choice is \(0\). In general, when we use the “envelope theorem”, we remind ourselves of the optimality conditions (first-order-conditions) used to derive optimal choices, and plug them in as needed to help with eliminating terms in an otherwise seemingly more complex problem with many derivative terms.

A few points to note:

  • While \(\frac{\partial f(a, b^{\ast}(a))}{\partial b} = 0\), \(\frac{\partial f(a, \widehat{b})}{\partial b} \neq 0\) if \(\widehat{b} \neq b^{\ast}(a)\).
  • While \(\frac{d f^{\ast}(a)}{d a}\) is not a function of \(\frac{d b^{\ast}(a)}{d a}\), it is a function of \(b^{\ast}(a)\). We take the partial of \(f\) with respect to \(a\), and evaluate the partial at \(b = b^{\ast}(a)\).
  • The Envelope Theorem is a “local” limiting result. The above equal does not apply if we have larger step increases in \(a\), and evaluate a change in the optimal objective function given a large step shift.

13.4.2 Envelope Theorem and discount factor

As an application of the envelop theorem result, consider the two period consumption and savings problem, where \(e_1\) and \(e_2\) are endowments, \(s\) is savings if it is positive and borrowing if it is negative, and \(\beta\) is the discount factor. The value function is equal to:

\[ \begin{gathered} v\left(\beta\right) = \max_{s} U(s, \beta) \end{gathered} \]

where:

\[\begin{align} U(s, \beta) = u\left( e_1 - s \right) + \beta \cdot u\left( e_2 + s\cdot\left(1+r\right) \right) \end{align}\]

The first order condition of the problem is that the marginal utility of additional savings today is equal to the marginal utility to having additional savings tomorrow, at the optimal savings choice \(s^{\ast}(\beta)\):

\[\begin{align} \frac{d U(\beta, s^{\ast}(\beta))}{d s} =0 \end{align}\]

We are interested in the marginal effect of \(\beta\) on the value function. Using first order optimality conditions, we arrive at:

\[\begin{align} \frac{d v\left(\beta\right)}{d\beta} &= \frac{d U\left(\beta, s^{\ast}\left(\beta\right)\right)}{d\beta}\\ &= \frac{\partial U\left(\beta, s^{\ast}\left(\beta\right)\right)}{\partial \beta} + \frac{\partial U\left(\beta, s^{\ast}\left(\beta\right)\right)}{\partial s}\cdot \frac{d s^{\ast}\left(\beta\right)}{d \beta} \\ &= \frac{\partial U\left(\beta, s^{\ast}\left(\beta\right)\right)}{\partial \beta} + 0\cdot \frac{d s^{\ast}\left(\beta\right)}{d \beta} \\ &= u\left( e_2 + s^{\ast}\left(\beta\right)\cdot\left(1+r\right) \right)\\ \end{align}\]

By invoking optimality condition, we have a significantly simpler derivative result than might have otherwise seemed initially. Note again we still have to solve for the optimal savings choice and plug that into the equation above.

Section correction thanks to:

  • Eden Yang, 2025-10-14 15:46:39
  • Chad Stevenson, 2025-12-03 13:20:28

13.4.3 Envelope theorem euler equation dynamic

Now consider a dynamic consumption-savings problem. Let \(a_t\) denote assets brought into period \(t\), let \(a_{t+1}\) denote the savings choice for the next period, and let \(y_t\) denote current income. The consumer solves:

\[\begin{align} V\left(a_t\right) = \max_{a_{t+1}}\ & u\left(c_t\right) + \beta V\left(a_{t+1}\right)\\ \mathrm{s.t.}\quad c_t &= \left(1+r\right)a_t + y_t - a_{t+1}. \end{align}\]

Substituting the budget constraint into the objective, the Bellman equation can be written as:

\[\begin{align} V\left(a_t\right) = \max_{a_{t+1}}\ & u\left( \left(1+r\right)a_t + y_t - a_{t+1} \right) + \beta V\left(a_{t+1}\right). \end{align}\]

Assume for now that the optimal choice \(a_{t+1}^{\ast}\left(a_t\right)\) is interior and that the relevant functions are differentiable. The first order condition with respect to \(a_{t+1}\) is:

\[\begin{align} 0 &= -u'\left(c_t\right) + \beta V'\left(a_{t+1}^{\ast}\right)\\ u'\left(c_t\right) &= \beta V'\left(a_{t+1}^{\ast}\right). \end{align}\]

The economic meaning is direct: saving one additional unit lowers current consumption by one unit, which costs \(u'\left(c_t\right)\) utility today. The benefit is that next period begins with one more unit of assets, which raises continuation value by \(V'\left(a_{t+1}^{\ast}\right)\), discounted by \(\beta\). At an interior optimum, these marginal cost and marginal benefit terms are equal.

The envelope theorem gives a simple expression for \(V'\left(a_t\right)\). Start from the value function evaluated at the optimal policy:

\[\begin{align} V\left(a_t\right) = u\left( \left(1+r\right)a_t + y_t - a_{t+1}^{\ast}\left(a_t\right) \right) + \beta V\left(a_{t+1}^{\ast}\left(a_t\right)\right). \end{align}\]

Taking the total derivative with respect to \(a_t\) would appear to require differentiating the policy function \(a_{t+1}^{\ast}\left(a_t\right)\). The envelope theorem says that the terms involving the derivative of the optimal policy disappear because the policy is already chosen optimally. Therefore:

\[\begin{align} V'\left(a_t\right) &= \frac{\partial}{\partial a_t} \left[ u\left( \left(1+r\right)a_t + y_t - a_{t+1}^{\ast} \right) + \beta V\left(a_{t+1}^{\ast}\right) \right]\\ &= u'\left(c_t\right)\left(1+r\right). \end{align}\]

Apply the same envelope condition one period ahead:

\[\begin{align} V'\left(a_{t+1}^{\ast}\right) = u'\left(c_{t+1}\right)\left(1+r\right). \end{align}\]

Substituting this expression into the first order condition gives the Euler equation:

\[\begin{align} u'\left(c_t\right) &= \beta V'\left(a_{t+1}^{\ast}\right)\\ &= \beta\left(1+r\right)u'\left(c_{t+1}\right). \end{align}\]

This is the intertemporal optimality condition. At the optimum, the household is indifferent at the margin between consuming one more unit today and saving that unit for next period. Consuming today gives marginal utility \(u'\left(c_t\right)\). Saving instead produces \(1+r\) units of next-period consumption, worth \(u'\left(c_{t+1}\right)\) per unit next period and discounted by \(\beta\).

If returns or income are uncertain, the same logic gives the stochastic Euler equation:

\[\begin{align} u'\left(c_t\right) = \beta E_t\left[\left(1+r_{t+1}\right)u'\left(c_{t+1}\right)\right]. \end{align}\]

The deterministic equation above is the special case where \(r_{t+1}=r\) and next-period consumption is known at time \(t\).

13.5 Bellman Equation for General Discrete Dynamic Programming Problems

13.5.1 Ingredients of value function

There are six ingredients to a value function.

First, states. Call the state variable vector \(\mathbb{s}\) (s for states). State variables are the pieces of information that summarize the current situation and are necessary to make optimal decisions. They capture all relevant information from the past that affects future decisions. State variables from a data point of view might be:

  • Endogenous to prior choices (often observed)
  • Random realization of shocks (usually unobserved)
  • Permanent characteristics of the individual (in a model with multiple individuals) that might be observed or unobserved

Second, choices. Call the choice variable vector \(\mathbb{a}\) (a for actions). Choice variables are the decisions that the decision-maker can make at each point in time. They represent the actions that can be taken given the current state.

Third, constraints on choices.\(a\in \mathcal{A}(\mathbb{s})\), where \(\mathcal{A}(\mathbb{s})\) is the choice set available when the state variable is \(\mathbb{s}\). This captures the idea that not all choices are available in all states. For example, if the state variable represents wealth, then the choice set might be constrained by the amount of wealth available. Furthermore, choices are constrained due to whether they are discrete or continuous. These choices are contained in choice sets, which can vary depending on the state variable. For example, perhaps \(a_1 \in \left\{0, 1\right\}\), it’s a discrete choice of two options, or \(a_2 \in \left[0, 1\right]\), it’s a continuous choice between 0 and 1.

Fourth, then there are current period rewards. This is a function of \(\mathbb{s}\) and \(\mathbb{a}\), which are inputs to some contemporaneous reward function \(r(\mathbb{s}, \mathbb{a})\).

Fifth, there are future rewards, which depend on the next state \(\mathbb{s}'\). Its transition distribution is conditional on the current state and action, \(F_{\mathbb{s}'}(\cdot\mid\mathbb{s},\mathbb{a})\), and can include both deterministic and stochastic components.

Sixth, we weight future rewards by a discount factor \(\beta \in (0, 1)\), which captures the idea that the future rewards are worth potentially less than current rewards.

13.5.2 Bellman equation

The Bellman equation captures the idea that the value of being in a particular state \(\mathbb{s}\), \(V(\mathbb{s})\), is the maximum expected reward that can be obtained by choosing an action \(\mathbb{a}\) from the choice set \(\mathcal{A}(\mathbb{s})\), receiving the immediate reward \(r(\mathbb{s}, \mathbb{a})\), and then transitioning to a distribution of new state \(\mathbb{s}'\) where future rewards can be obtained with different probabilities, where the future rewards are evaluated by the same value function \(V(\mathbb{s}')\).

The Bellman equation can be written as:

\[\begin{align} V(\mathbb{s}) = \max_{\mathbb{a} \in \mathcal{A}(\mathbb{s})} \left\{ r(\mathbb{s}, \mathbb{a}) + \beta E_{\mathbb{S}'} \left( V(\mathbb{s}') \mid \mathbb{s}, \mathbb{a} \right) \right\} \end{align}\]

Writing a maximum assumes that an optimal action exists. For example, existence follows under standard conditions such as a nonempty compact choice set and a continuous objective; otherwise the supremum may not be attained.

The fixed point, in the context of the Bellman Equation, refers to getting the same \(V\) back after plugging \(V\) into the “Bellman Equation Operator”. While we have been analyzing the value function as a function given values along the state-space, we can also think of the right-hand side of the Bellman equation as taking a value function \(V\) as input and produces a new value function as output. When we have \(V = T(V)\), that is a fixed point of the Bellman operator \(T\).

Contraction mapping refers to the property that the Bellman operator \(T\) brings value functions closer together in terms of some metric. This means that if we start with some initial value function, \(V^0\), by applying the Bellman operator on it, we return \(V^1 = T(V^0)\), and then \(V^2 = T(V^1)\), and then \(V^3 = T(V^2)\), and each of these value functions get closer and closer together as we iterate. Closer meaning the distance between the values of these functions over all points along the state-space get closer. This closeness can be the max/sup norm distance between the consecutive iterations of the value functions across the domain of the state space.

Under what conditions will the value function have contraction mapping? (See Blackwell sufficiency conditions). Basically:

  1. the per period return (\(r(s,a)\)) needs to be bounded over its domain and not go to infinity,
  2. the discount factor (\(\beta\)) needs to be less than 1, and
  3. the stochastic process needs to be well-defined, with finite conditional expectation.

These conditions jointly ensure that the problem does not explode as we iterate. As we sum over and over again via value function iteration guesses for future values, we want the total discounted (\(\beta\)) expected (conditional expectation) sum of current payoffs (\(r(s,a)\)) to be bounded and not go to infinity.