The EGM^n in Higher Dimensions
The problem in Section 2 demonstrates the simplicity of solving problems sequentially. However, as constructed, the problem has only one state variable and one post-decision state variable per stage. Can EGMn be used to solve higher dimensional problems? In short, yes, but it requires additional thought on interpolation.
1A more complex problem¶
For a demonstration, we now turn to the problem of a worker saving up for retirement. This worker must consume, save, and deposit resources into a tax-advantaged account that can not be liquidated until retirement. In the recursive problem, the worker begins a new period with a liquid account of market resources and an illiquid account of retirement savings . The worker maximizes their utility by choosing consumption and pension deposit . The pension deposit is set aside on a retirement account that is exposed to a risky return, while their post-consumption liquid assets accrue risk-free interest every period. The worker additionally receives an income that faces a permanent () and a transitory () shock every period. At the age of 65, the worker is retired and their assets are liquidated, at which point the state reduces to one liquid account of market resources. The worker’s recursive problem is:
where
This problem can subsequently be broken down into 3 stages: a pension deposit stage, a consumption stage, and an income shock stage.
2Breaking down the problem¶
In the deposit stage, the worker begins with market resources and a retirement savings account. The worker must maximize their value of liquid wealth and retirement balance by choosing a pension deposit , which must be positive. The retirement balance is the cash value of their retirement account plus their pension deposit and an additional amount that provides an incentive to save for retirement. As we’ll see, this additional term will allow us to use the Endogenous Grid Method to solve this subproblem.
After making their pension decision, the worker begins their consumption stage with liquid wealth and retirement balance . From their liquid wealth, the worker must choose a level of consumption to maximize utility and continuation value . After consumption, the worker is left with post-decision states that represent liquid assets and retirement balance , which passes through this problem unaffected because it can’t be liquidated until retirement.
Finally, the post-decision value function represents the value of both liquid and illiquid account balances before the realization of uncertainty regarding the risky return and income shocks. Since we are dealing with a normalized problem, this stage handles the normalization of state variables and value functions into the next period.
The advantage of conceptualizing this subproblem as a separate stage is that we can construct a function and use it in the prior optimization problems without having to worry about stochastic optimization and taking expectations repeatedly.
3The consumption-saving problem¶
As seen in the consumption stage above, the retirement balance passes through the problem unaffected because it can’t be liquidated until retirement. In this sense, it is already a post-decision state variable. To solve this problem, we can use a fixed grid of and for each obtain endogenous consumption and ex-ante market resources using the simple Endogenous Grid Method for the consumption problem.
4The pension deposit problem¶
In the deposit stage, both the state variables and post-decision variables are different since both are affected by the pension deposit decision.
First, we can rewrite the pension deposit problem more compactly:
The first-order condition is
Rearranging this equation gives
where
Given that exists and is invertible, we can find
Using this, we can back out as
and as
In sum, given an exogenous grid we obtain the triple , which we can use to create an interpolator for the decision rule .
To close the solution method, the envelope conditions are
5Unstructured Grid Interpolation¶
As in Section 2, the resulting endogenous grid is not rectilinear, and in this more complex problem it is not even a regular grid. We can see in Figure 5 that starting from a regular and rectilinear exogenous grid of liquid assets post-consumption and pension balances post-deposit , we obtain Figure 6 which shows an irregular and unstructured endogenous grid of market resources and pension balances pre-deposit .
To interpolate a function defined on an unstructured grid, we use Gaussian Process Regression as in Scheidegger & Bilionis (2019).
- Scheidegger, S., & Bilionis, I. (2019). Machine learning for high-dimensional dynamic stochastic economies. Journal of Computational Science, 33, 68–82. 10.1016/j.jocs.2019.03.004