In Chapters Chapter 2--Chapter 3 all agents were infinitely lived. We now extend the DEQN framework to overlapping generations (OLG) models Diamond, 1965, where finitely-lived cohorts coexist in every period. OLG models introduce lifecycle savings, intergenerational transfers, age-dependent heterogeneity, and inequality constraints on portfolio choices, phenomena that are central to fiscal policy analysis, pension reform, and demographic modeling. We proceed in two stages. We first solve a deliberately small 6-agent OLG that admits a closed-form solution Krueger & Kubler, 2004, which gives a clean ground truth against which to validate the neural-network solver. We then scale up to the 56-agent research benchmark of Azinovic et al. (2022), where the no-short-sale-of-capital constraint binds on a non-trivial slice of the ergodic set; that constraint introduces a kink, the main new computational challenge of the benchmark, and we handle it by combining softplus output activations (for non-negativity) with squared product residuals for the orthogonality conditions in the loss. The model also carries a collateral constraint that the current notebook parameterization of keeps slack on the learned ergodic set; we develop both constraints below so that the architecture is in place when a future calibration makes the collateral side bind.
5.1Why Overlapping Generations?¶
In the Brock--Mirman and IRBC models of Chapters Chapter 2--Chapter 3, all agents are infinitely lived. Picture instead a photograph of the economy taken at a single instant: it contains a twenty-something just entering the workforce with no savings, a forty-something at peak earnings putting money aside, and a retiree drawing down a lifetime of accumulated wealth, all making decisions in the same period and all linked through the prices that their collective saving determines. The infinitely-lived-agent assumption collapses this picture and rules out several economically important phenomena:
Lifecycle savings. Agents accumulate wealth when young, draw it down in old age.
Intergenerational transfers. Pensions, social security, and bequests cannot be studied without age structure.
Age-dependent heterogeneity. Labor endowments, risk preferences, and portfolio composition vary systematically over the lifecycle.
An OLG economy consists of cohorts that coexist in each period: a new cohort of age 1 is born, the oldest cohort of age dies, and everyone else ages by one period. Crucially, the number of agent types is finite, so the cross-sectional distribution has only entries and the state space remains finite-dimensional, in contrast to the continuum-of-agents models treated in Chapter Chapter 6. The mechanism that ties the three phenomena above together is consumption smoothing over a hump-shaped earnings path (Figure Figure 5.1): because labor income rises and then falls over the lifecycle while agents prefer a steady consumption stream, they accumulate assets in their high-earning years and run them down afterwards, and the equilibrium interest rate is whatever clears the resulting demand for savings against the economy’s capital stock.
Figure 5.1:Stylized lifecycle profiles in an OLG economy (schematic, not a solution of the model). Labor income (blue) is hump-shaped, peaking in mid-career, while agents prefer a roughly flat consumption path (green); so they accumulate assets out of income during their high-earning years and run them down near the end of life. The asset profile (red, dashed) is therefore a hump that starts near zero for the newborn cohort, peaks toward the end of working life, and returns to zero for the oldest cohort, which consumes everything. The 6-agent analytic model of Section 5.2 is a stripped-down version of this picture (only the youngest cohort earns labor income); the 56-agent benchmark of Section 5.5 reproduces the full hump.
We develop the OLG framework in two stages. Section Section 5.2 works through the 6-agent model with a closed-form solution, maps it to a DEQN (Section 5.3), and validates the trained network against the analytical savings rates; Section 5.4 then explains how binding borrowing and collateral constraints are encoded, and Section 5.5 solves the 56-agent research benchmark with exactly the same training loop.
5.2The 6-Agent Analytic OLG Model¶
Krueger & Kubler (2004) proposed a deliberately simple OLG model with a closed-form solution, making it an ideal validation benchmark for the DEQN approach. We develop it here as the first of the two OLG instances of this chapter; Section 5.3 maps it to a DEQN and validates the trained network against the closed form derived below.
We instantiate the OLG environment with overlapping cohorts, indexed by age . Time is discrete and infinite. The model equations below are written for general and specialized to in the calibration that follows.
5.2.1Household problem.¶
An agent of age at time maximizes expected lifetime utility:
subject to the period budget constraint
where denotes capital holdings, is the gross return on capital, is the wage, is an age-dependent labor endowment, and is total income.
5.2.2Boundary conditions.¶
Newborns have no initial wealth: .
The oldest cohort consumes everything: .
Borrowing is not permitted: for all .
5.2.3Euler equations.¶
The first-order conditions yield Euler equations (for ages ):
5.2.4Firm problem and market clearing.¶
A representative firm operates a Cobb--Douglas technology with value added , where is a TFP shock and ; the gross resource available to households is (it is , not , that the notebook passes as an engineered feature). Competitive factor markets imply:
where is the depreciation rate (potentially stochastic). Market clearing requires that aggregate capital at is the sum of holdings across cohorts:
with as a newborn boundary condition (cohort 1 enters life with no assets), and where for is the savings of cohort at date (which becomes the date- holdings of the cohort once it has aged by one period).
5.2.5Calibration.¶
The model has agents with log utility (), Cobb--Douglas production (), and discount factor . Only agent 1 works (); this stripped-down labor profile is what gives the closed form below, not a realistic lifecycle assumption, and the 56-agent benchmark of Section 5.5 restores a hump-shaped endowment. Four exogenous shock states combine TFP and depreciation , with i.i.d. transitions ().
5.2.6Analytical solution.¶
With log utility and i.i.d. shocks, the optimal savings rate has a closed form. Define the age-dependent savings rate:
The optimal policy is then : each agent saves a fixed fraction of total income, regardless of the shock. Two features of the calibration drive this clean form. First, under log utility the income and substitution effects of a return shock exactly cancel, so the savings rate is invariant to . Second, because the shocks are i.i.d. there is nothing about the future to forecast, so the rate does not depend on the current shock either; only the horizon matters. The fraction therefore declines with age: cohort has only remaining periods over which to spread its future income, so the marginal incentive to carry resources forward weakens as grows. For , , Table Table 5.1 reports the resulting savings rates.
Table 5.1:Closed-form age-specific savings rates in the 6-agent analytic OLG with log utility and .
| Age | 1 | 2 | 3 | 4 | 5 |
|---|---|---|---|---|---|
| 0.660 | 0.639 | 0.605 | 0.543 | 0.412 |
Young agents save more (more periods ahead); old agents save less; Figure Figure 5.2 plots the same numbers across . This vector is the validation target: at convergence, the trained network’s average sigmoid output should reproduce cohort by cohort.
Figure 5.2:Closed-form savings rates from Table Table 5.1 for the 6-agent analytic OLG (, log utility). The monotone decline with age reflects the shrinking forward horizon: cohort has only remaining periods over which to consume future income, so the marginal incentive to save weakens as grows. This is the validation target the trained DEQN’s average sigmoid output should match cohort by cohort.
5.3Mapping the Analytic OLG to a DEQN¶
The mapping follows the same “states network loss” structure as Brock--Mirman (Chapter Chapter 2). We now write each block explicitly for the 6-agent analytic model just set up; this is exactly what slides II.7--II.9 of lectures/lecture_08_olg_models_deqns/slides/lecture_08_olg_models_deqns.tex render in pictures. The 56-agent benchmark of Section 5.5 extends the same template with two extra policy blocks (multipliers, bond price) and an additional market-clearing residual; we write that version out there.
5.3.1State entering the network.¶
What does the network actually need to know? The informational state of the analytic model is just the pair
the current shock index plus the cross-sectional capital distribution. This is the minimal vector that pins down the equilibrium, and it is what slide II.8 displays in the FREE signature. Everything else, the aggregate capital , the prices , output , each cohort’s income, the row of next-period transition probabilities, is a deterministic function of . The network could in principle re-derive all of it from the raw pair, but there is no reason to make it: we hand the network those quantities pre-computed, which is a pure change of input coordinates that leaves the equilibrium map untouched and frees the network’s capacity for the one genuinely hard thing it has to learn, the savings policy. Concretely the notebook feeds an extended state of dimension ,
with the 4-state one-hot of the current shock, , , from (5.4), the gross resource , and the per-agent blocks (capital income), (labor income), (total income). Since the map is deterministic, (5.7) and (5.8) carry exactly the same information. For this is inputs (the notebook constant FEATURE_DIM).
5.3.2Policies approximated by the network.¶
A single multilayer perceptron with a sigmoid savings-fraction output head approximates the equilibrium policy as a function of the state. (Throughout this OLG chapter we use for the network parameters rather than the of Chapters Chapter 2--Chapter 3; both refer to the same object, and the switch follows the convention of the public OLG reference implementation.)
where the network output is cohort ’s savings rate and its savings level (slide II.9, output column). This parameterization mirrors the closed-form solution’s structure (each cohort saves a fixed fraction of income, Eq. (5.6)). Cohort saves nothing by terminal boundary, so the network has outputs rather than . Three by-construction guarantees follow:
Non-negativity of savings holds at every iteration, so the borrowing constraint (5.12) is satisfied without an explicit Lagrange multiplier (in this calibration on the ergodic set; see Section 5.4 for the multiplier-based variant used in the 56-agent benchmark).
Non-negativity of consumption also holds by construction, so the soft penalty on in the loss (next paragraph) is a dead backstop.
Capital-market clearing also holds by construction, since aggregate next-period capital is read off as the sum of the network’s savings outputs together with the newborn boundary .
5.3.3Equilibrium residual.¶
Each cohort contributes one relative Euler-equation residual, built from three quantities. First, the implied current consumption, read off from the budget (5.2) as . Second, the next-state map , which combines the current policy with a fresh shock to produce next period’s extended state (the construction of is spelled out in the next paragraph). Third, the implied next-period consumption of the cohort that has just aged from to . The relative Euler-equation residual is then
with in the analytic model so . Equation (5.10) is the unit-free residual of the standard Euler equation (5.3): a value of 10-3 means cohort ’s implied consumption is mispriced by relative to the conditional certainty equivalent. This is the residual displayed in slide II.7.
5.3.4Sampling the conditional expectation.¶
The expectation in (5.10) is over the next-period shock . Because the analytic-model shock has only four states with i.i.d. transition , the expectation is computed exactly (no Monte Carlo) by summing over the four next-period shocks: For each candidate the next-state map ages the cross-section by one period, sets the newborn to , evaluates the firm prices (5.4) at , and produces the next-period extended state on which the network is evaluated again to obtain and hence . When the shock has more states or is continuous, the same construction is replaced by a sample of inside the mini-batch (see Section 5.5).
5.3.5The DEQN loss for the analytic OLG.¶
Given a mini-batch sampled from the ergodic set of the current policy, the loss is the mean-squared relative Euler residual averaged across cohorts and states:
(matching slide II.7). Two small barrier-style additive penalties on rescaled negative-consumption and negative-aggregate-capital hinges are summed in alongside (5.11) to keep training numerically robust away from convergence; in the notebook they carry the weight PENALTY_WEIGHT and act on terms such as rather than the raw squared hinge. With the sigmoid savings-fraction head described above these hinges are in fact identically zero (savings stay in , so and always), so the penalties are pure backstops and do not bias the solution.[1]
5.3.6DEQN architecture and training.¶
The network takes a 40-dimensional input (the extended state (5.8), ) and outputs 5 savings rates via a architecture with ReLU hidden layers and a sigmoid savings-fraction output ( parameters). Training uses the episode-based procedure from Chapter Chapter 2: the current network generates a capital path (episode), equilibrium residuals are computed and used for SGD updates, and a new episode is simulated periodically. The companion notebook exposes a RUN_MODE switch with three calibrated budgets: "smoke" (25 training segments, 30 s on CPU; a code-path sanity check, well short of convergence), "teaching" (500 segments, 5 min on CPU; savings rates match the closed form to a few parts in 104 and mean relative Euler errors are already on the simulated cloud, though larger off-trajectory), and "production" (10,000 segments with longer trajectories, several hours on CPU; mean Euler errors or below, matching Table 3 of Azinovic et al. (2022)). Adam is used throughout (learning rate in the short presets, 10-5 in the production preset); the analogous decay to 10-6 used by the 56-agent benchmark (Section 5.5) is not needed at the analytic model’s scale.
5.4Inequality Constraints and KKT Complementarity¶
The 6-agent calibration above is deliberately frictionless: the no-short-sale-of-capital constraint never binds on its ergodic set, so we could solve it with a plain sigmoid-savings head and no multipliers. Realistic OLG economies are not so kind. The 56-agent benchmark of the next section carries a no-short-sale-of-capital constraint that binds on a non-trivial slice of states and a collateral constraint that the current notebook parameterization keeps slack on the learned ergodic set; binding inequality constraints in general bring in Karush--Kuhn--Tucker (KKT) complementarity, with its characteristic non-smooth orthogonality condition. This section sets out how the DEQN framework encodes that complementarity; the next section puts it to work.
The no-short-sale-of-capital constraint introduces a complementarity condition via the Karush--Kuhn--Tucker (KKT) system:
where is the KKT multiplier on the constraint. In a generic non-linear program, the orthogonality condition is non-smooth at the origin and cannot be differentiated through naively.
The DEQN setup of Azinovic et al. (2022) sidesteps the kink by splitting enforcement across the architecture and the loss:
Hard side (architecture). The savings and the multiplier are both produced by the network through a softplus activation, so the inequalities and hold by construction at every iteration.
Soft side (loss). With non-negativity already guaranteed, the orthogonality is enforced by adding the squared product residual to the loss.
This product form is what the public reference implementation accompanying Azinovic et al. (2022) uses, and what we adopt in the 56-agent benchmark of Section 5.5 (Notebook lecture_08_10_OLG_Benchmark_DEQN_persistent.ipynb). As noted above, in the 6-agent analytic calibration of Section 5.2 the no-short-sale-of-capital constraint is non-binding everywhere on the ergodic set, so and the multipliers (and the KKT residual) drop out of both the network output and the loss; that is why the mapping there was the simpler of Section 5.3 above, with no multiplier outputs. The smoother Fischer--Burmeister (FB) reformulation, , is an alternative used in the IRBC notebook of Chapter Chapter 3 for the investment-irreversibility constraint.
5.4.1When to choose product form vs. Fischer--Burmeister.¶
The product form is simpler, gradient-cheaper, and sufficient whenever the constraint is rarely active on the ergodic set, since the optimizer just needs to verify slackness in expectation. The Fischer--Burmeister residual keeps gradient information on both sides of the active set: when the constraint is frequently binding (e.g. the IRBC irreversibility constraint on a non-trivial fraction of states), product-form gradients vanish whenever the constraint is locally inactive, which can stall training; FB does not have this pathology. As a rule of thumb: product form for occasionally-binding KKT, FB for frequently-binding KKT. In the OLG benchmark of Section 5.5 the no-short-sale-of-capital constraint binds on a thin slice of the ergodic set, so the product form was sufficient; the IRBC application of the previous chapter binds more often and benefits from FB.
5.4.2The two OLG models we solve, side by side.¶
We have now built and solved the first of the two OLG instances that anchor the rest of the manuscript: the 6-agent analytic model used to validate the DEQN against a closed form (Sections Section 5.2--Section 5.3). The second is the 56-agent benchmark of Azinovic et al. (2022), developed in the next section. Table Table 5.2 summarizes the structural and computational gap between them before we turn to it.
Table 5.2:The two OLG models solved in this chapter, side by side. The economic richness of the 56-agent benchmark adds two assets, an effectively binding no-short-sale-of-capital constraint (the collateral constraint is kept slack by the parameterization), persistent shocks, lifecycle labor, and adjustment costs, raising the network input dimension from 40 to 240 and the output dimension from 5 to 221. The DEQN training loop is structurally identical in both cases. Each variant additionally ships with a feedback-free exogenous-sampling companion notebook (lecture_08_07_OLG_Analytic_DEQN_exogenous.ipynb, lecture_08_09_OLG_Benchmark_DEQN_exogenous.ipynb) that exercises the same model under a non-co-evolving training cloud.
| 6-agent analytic (Section 5.2) | 56-agent benchmark (Section 5.5) | |
|---|---|---|
| Cohorts | 6 (childhood-style) | 56 (ages 25--80, one period = one year) |
| Utility | Log () | CRRA () |
| Shocks | i.i.d. TFP & depreciation, 4 states | Persistent Markov on |
| Labor profile | Only youngest cohort works | Hump-shaped lifecycle endowment |
| Assets | Capital only | Capital bonds |
| Constraints | None binding in calibration | No-short-sale of capital binds; collateral kept slack by the parameterization |
| Adjustment cost | None | Quadratic |
| Network input dim | 40 (extended; minimal 7) | 240 (extended; minimal 113) |
| Output dim | 5 (savings rates of cohorts 1--5) | 221 (: policies, multipliers, price) |
| Loss terms | 5 Euler market clearing by construction | 221: Euler/KKT 1 bond clearing |
| Network | Input(40) 100 50 5 | Input(240) 128 128 221 (teaching) / Input(240) 1000 1000 221 (production) |
| Validation target | Closed-form of Krueger & Kubler (2004) | Mean Euler residual on simulated trajectory |
| Notebook | lecture_08_08_OLG_Analytic_DEQN_persistent.ipynb | lecture_08_10_OLG_Benchmark_DEQN_persistent.ipynb |
5.5The 56-Agent Benchmark¶
Table Table 5.2 above previewed the gap; we now develop the second model in full. The benchmark of Azinovic et al. (2022) scales the OLG framework to agents (ages 25--80) with several realistic features:
CRRA utility with (replacing log utility).
Two assets: capital and one-period bonds , with bond price determined in equilibrium.
Hump-shaped labor endowment peaking in the early 50s.
No-short-sale of capital: (the constraint historically labelled the “borrowing constraint” in this literature; we keep the more precise name to free “borrowing” for the bond side).
Collateral constraint: , where .
Capital adjustment costs: .
Persistent shocks: a 4-state Markov chain for TFP depreciation (contrast with i.i.d. in the analytic model).
5.5.1Lifecycle labor endowments.¶
The labor endowment profile follows Brumm et al. (2017). In the implementation used here, is a quadratic in age that rises from 0.60 at age 25, peaks at around age 53, then decays linearly between ages and to a flat post-retirement floor of . Table Table 5.3 lists the values produced by the notebook formula at a few representative ages.
Table 5.3:Representative points on the lifecycle labor-endowment profile in the 56-agent benchmark.
| Age | 25 | 30 | 40 | 48 | 53 | 65 | 80 |
|---|---|---|---|---|---|---|---|
| 0.60 | 0.85 | 1.20 | 1.34 | 1.36 | 1.04 | 0.64 |
This hump-shaped profile ensures realistic savings heterogeneity: young agents with low labor income and no initial wealth are borrowing-constrained, mid-career agents with high earnings accumulate both capital and bonds, and older agents gradually decumulate toward the end of life.
5.5.2Persistent aggregate shocks.¶
The 4-state Markov chain combines TFP and depreciation into the pairs . The transition matrix is persistent (diagonal entries 0.63--0.88), in contrast to the i.i.d. shocks in the analytic model. This persistence creates richer dynamics in capital accumulation: a sequence of bad TFP draws can push young agents deep into their borrowing constraint, producing endogenous amplification that a single-period shock would not generate.
5.5.3Budget constraint.¶
Each agent of age faces:
The collateral constraint acts as a margin requirement: it limits bond borrowing () relative to capital holdings. Since , the constraint tightens when depreciation is high, precisely when agents are most likely to seek insurance through borrowing.
5.5.4State entering the network.¶
The informational state of the benchmark is the triple , where and are the cross-sectional capital and bond distributions, so the minimal state has dimension . As in the analytic case, the notebook feeds the network an extended state of the same form -- twelve aggregate scalars (shock index and its one-hot, , , , , , , and the gross resource ), four per-agent blocks (, financial income , labor income , and cash -- the bond holdings are recoverable from financial income and are not passed as a separate block, and the bond price is an output, not an input), and the row of next-period transition probabilities (used by the conditional-expectation block of the loss); concretely (the notebook constant FEATURE_DIM). This is the analogue of slide III.8.
5.5.5Policies approximated by the network.¶
A single network with softplus output produces a -dimensional vector that is sliced into five economic blocks (slide III.9):
where are capital savings, the no-short-sale-of-capital multipliers, the collateral requirement (from which bond holdings are recovered as ), the collateral-constraint multipliers, and the equilibrium bond price. Each raw output is mapped to an admissible value: softplus for the multipliers, and a bounded-exponential map around a baseline for the positive levels. Concretely, writing , , and for the raw network outputs, the heads are
so the four non-negativity inequalities , , , hold by construction, leaving the orthogonality conditions of the KKT systems to be enforced softly in the loss (next paragraph).[2] The production network uses hidden units (M parameters); the teaching version uses .
5.5.6Equilibrium residuals.¶
Each cohort contributes four residuals, one per equilibrium condition (slide III.6). To keep the displayed form compact, introduce numerator/denominator shorthands for the two Euler conditions:
Here is the marginal-adjustment-cost wedge from : the capital Euler equation in envelope form reads , so the same wedge appears next period on the marginal return to capital (this is the factor adj_factor_next in the notebook). With it collapses to the textbook Euler equation. The bond Euler reduces to the textbook stochastic-discount-factor form only when the collateral constraint is slack (); whenever , the bond price carries an additional shadow-value term that captures the value of relaxing the collateral constraint. The four per-cohort residuals are then
On top of these per-agent residuals the bond market must clear: bonds are in zero net supply, so the residual is the cross-sectional sum of bond holdings against the target ,
Capital-market clearing is once again satisfied by construction and does not appear as a residual. The conditional expectation in the two Euler equations is computed exactly as in (5.10): by summing over the four next-period shocks weighted by the persistent-Markov transition probabilities .
5.5.7The DEQN loss for the 56-agent benchmark.¶
Stack the four per-cohort residuals into one squared-cohort term then add the bond-market-clearing residual. The mini-batch loss is
(matching slide III.6). With this is squared residuals per training state. Each residual enters with weight one: no adaptive loss balancing (cf. Chapter Chapter 4) is applied because the relative-Euler convention (5.10) already homogenizes the per-cohort Euler scales, and the product-form KKT residuals are unit-free under the softplus head; ReLoBRaLo or GradNorm would be the natural next step if a future calibration broke this homogeneity. Comparison with (5.11): the analytic case is the special instance of (5.19) in which the no-short-sale-of-capital constraint never binds (so ), there are no bonds (so all - and collateral-related blocks drop out), and collapses to . The two losses are the same template instantiated at different complexity. Table Table 5.4 unpacks the residual blocks.
Table 5.4:Residual blocks entering the 56-agent benchmark loss for one training state.
| Component | Symbol | Count |
|---|---|---|
| Euler (capital) | 55 | |
| Euler (bonds) | 55 | |
| KKT (borrowing) | 55 | |
| KKT (collateral) | 55 | |
| Market clearing (bonds) | 1 | |
| Total residuals | 221 |
5.5.8Training and results.¶
Production training uses 60,000 episodes at lr followed by 140,000 episodes at lr , with runtime of several hours on GPU. The teaching version (200 segments, 128-128 hidden units) runs in a few minutes on CPU and is meant to show the mechanics and qualitative lifecycle patterns, not final accuracy. The loss trajectory typically exhibits oscillations, caused by re-simulation of the capital path at each episode, but the overall trend is steadily downward.
5.5.9Lifecycle diagnostics.¶
The trained model produces economically plausible lifecycle patterns. Capital savings follow a hump shape that mirrors the labor income profile: young agents save little (borrowing constraint binds), mid-career agents accumulate rapidly, and older agents decumulate. Bond holdings are initially negative (young agents borrow against future income) and increase with age as agents shift from illiquid capital to liquid bonds. Bond prices vary across shock states, with higher prices in high-TFP states reflecting stronger demand for savings. In the teaching run the Euler residuals are still large enough to treat the output as diagnostic; in production runs the mean Euler equation errors are of order 10-4--10-3 for both capital and bond equations (matching Table 3 of Azinovic et al. (2022)), corresponding to a 0.01%--0.1% deviation in consumption. Market clearing residuals are comparably small. Convergence is also confirmed by the policy-drift check on the fixed anchor cloud: the run is treated as time-invariant once policy_drift_rms and policy_drift_max fall below their prescribed tolerances.
5.6Further Reading¶
Azinovic et al. (2022), the IER paper that established the 56-agent benchmark.
Auerbach & Kotlikoff (1987), the classical OLG reference.
Azinovic-Yang & Žemlička (2024), market-clearing output layer in OLG with rare disasters.
5.7Exercises¶
Worked solutions and guidance for these exercises appear in Appendix Appendix F.
The 56-agent benchmark of Section 5.5 adds two genuine extras to (5.11): KKT product residuals (because the borrowing and collateral constraints actually bind) and an explicit bond-market-clearing residual (because the network outputs each agent’s bond holding independently). An orthogonal extension is to encode capital-market clearing exactly via a dedicated output layer that rescales unnormalised cohort savings so that holds by construction; Azinovic-Yang & Žemlička (2024) adopt this design in an OLG economy with rare disasters.
In the current notebook implementation is parameterized relative to , so it cannot fall to zero while ; the collateral-complementarity residual is then satisfied by , and the collateral constraint is effectively non-binding on the learned ergodic set, consistent with the chapter-opening note. Allowing it to bind exactly requires a free positive slack output (a softplus head on ); the architecture above already accommodates this swap.
- Diamond, P. A. (1965). National Debt in a Neoclassical Growth Model. American Economic Review, 55(5), 1126–1150.
- Krueger, D., & Kubler, F. (2004). Computing equilibrium in OLG models with stochastic production. Journal of Economic Dynamics and Control, 28(7), 1411–1436.
- Azinovic, M., Gaegauf, L., & Scheidegger, S. (2022). DEEP EQUILIBRIUM NETS. International Economic Review, 63(4), 1471–1525. 10.1111/iere.12575
- Brumm, J., Kubler, F., & Scheidegger, S. (2017). Computing Equilibria in Dynamic Stochastic Macro-Models with Heterogeneous Agents. In Advances in Economics and Econometrics: Eleventh World Congress (B. Honoré, A. Pakes, M. Piazzesi, and L. Samuelson, eds.) (Vol. 2, pp. 185–230). Cambridge University Press.
- Auerbach, A. J., & Kotlikoff, L. J. (1987). Dynamic Fiscal Policy. Cambridge University Press.
- Azinovic-Yang, M., & Žemlička, J. (2024). Intergenerational consequences of rare disasters. Available at SSRN 4386477. https://papers.ssrn.com/sol3/papers.cfm?abstract_id=4386477