diff --git a/CHANGELOG.md b/CHANGELOG.md index bd7cfe3d6..24bd01193 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.25.2] - 2026-11-23 + +### Added +- Adds the hybrid defined benefit and funded defined contribution pension system (`pension_system` set to `'Hybrid DB-FDC'`), which has the same structure as the hybrid DB-NDC system with an FDC account in place of the notional account. Labor income up to `db_earn_cap_factor` times `avg_labor_inc_t1_model_units` earns a defined benefit (`pensions.DB_FDC_hybrid_amount`, the public pension), and labor income between that cutoff and `dc_earn_cap_factor` times `avg_labor_inc_t1_model_units` pays `fdc_tau` into an FDC account (`pensions.fdc_earn_bands` sets this band under the system, whatever `fdc_earn_floor_factor` and `pension_earn_cap`). The two hybrid systems share the cutoff check, now `pensions.hybrid_earn_cutoffs`, and `Specifications` checks the cutoffs are ordered for every cohort under both, and warns if `fdc_tau` is zero under the new system. Documents the system in the pensions chapter, and adds tests that its public pension is the capped defined benefit, that its FDC band lies between the two cutoffs, and that its steady state is the same as that of the Defined Benefits system with `pension_earn_cap` and the FDC floor at the defined benefit cap. +- Adds the parameter `pension_FOC_linkage` (default false), which sets whether the household's labor first order condition includes the value of the additional pension benefit that an extra unit of labor earns. It currently affects only the FDC pillar: when false, `household.fdc_labor_wedge` drops the accrual term (the value of the annuity bought by a marginal contribution) and keeps the contribution cost, so FDC contributions act on labor supply like a tax on earnings in the FDC band, as the pay-as-you-go systems already treat benefits. **This changes FDC results from earlier versions, which always included the accrual term;** set `pension_FOC_linkage` to true to reproduce them. The FDC tests now set it to true, and a new test checks that it removes only the accrual term. Under the hybrid DB-FDC system, contributions start at the defined benefit cutoff, which puts a discrete change in the marginal return to labor at that cutoff; the hybrid steady-state test uses `FOC_root_method` set to `lm`, since the default `hybr` does not converge there. + ## [0.25.1] - 2026-11-22 ### Changed @@ -936,6 +942,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Any earlier versions of OG-USA can be found in the [`OG-Core`](https://github.com/PSLmodels/OG-Core) repository [release history](https://github.com/PSLmodels/OG-Core/releases) from [v.0.6.4](https://github.com/PSLmodels/OG-Core/releases/tag/v0.6.4) (Jul. 20, 2021) or earlier. +[0.25.2]: https://github.com/PSLmodels/OG-Core/compare/v0.25.1...v0.25.2 [0.25.1]: https://github.com/PSLmodels/OG-Core/compare/v0.25.0...v0.25.1 [0.25.0]: https://github.com/PSLmodels/OG-Core/compare/v0.24.6...v0.25.0 [0.24.6]: https://github.com/PSLmodels/OG-Core/compare/v0.24.5...v0.24.6 diff --git a/docs/book/content/api/pensions.rst b/docs/book/content/api/pensions.rst index d2fad1522..0b4224955 100644 --- a/docs/book/content/api/pensions.rst +++ b/docs/book/content/api/pensions.rst @@ -10,7 +10,8 @@ ogcore.pensions .. automodule:: ogcore.pensions :members: replacement_rate_vals, pension_amount, SS_amount, DB_amount, - NDC_amount, DB_NDC_hybrid_amount, pension_earn_caps, earnings_band_at, + NDC_amount, hybrid_earn_cutoffs, DB_NDC_hybrid_amount, + DB_FDC_hybrid_amount, pension_earn_caps, earnings_band_at, PS_amount, deriv_theta, deriv_NDC, deriv_DB, deriv_PS, delta_point, NDCRates, growth_rate_path, ndc_rates_path, g_ndc, g_dir, diff --git a/docs/book/content/intro/parameters.md b/docs/book/content/intro/parameters.md index cfbc0062d..e977b294d 100644 --- a/docs/book/content/intro/parameters.md +++ b/docs/book/content/intro/parameters.md @@ -317,12 +317,19 @@ _Out-of-Range Action:_ error #### `pension_system` _Description:_ Pension system. _Value Type:_ str -_Valid Choices:_['US-Style Social Security', 'Defined Benefits', 'Notional Defined Contribution', 'Points System', 'Hybrid DB-NDC'] +_Valid Choices:_['US-Style Social Security', 'Defined Benefits', 'Notional Defined Contribution', 'Points System', 'Hybrid DB-NDC', 'Hybrid DB-FDC'] #### `pension_earn_cap` -_Description:_ Whether the labor income that earns a pension benefit is capped under the Defined Benefits and Notional Defined Contribution systems. When true, under the Defined Benefits system only labor income up to db_earn_cap_factor in period t times avg_labor_inc_t1_model_units (average labor income in the first model period) enters the benefit, and under the Notional Defined Contribution system only labor income up to dc_earn_cap_factor in period t times avg_labor_inc_t1_model_units is credited to the notional account. When false, all labor income enters the benefit. -_Notes:_ Only used when pension_system is 'Defined Benefits' or 'Notional Defined Contribution'; the 'Hybrid DB-NDC' system always applies its cutoffs. These are the same cutoffs, set and indexed in the same way, that bound the defined benefit and notional defined contribution bands of the hybrid system. The cutoff that applies to any labor income is the one in effect in the period in which it was earned. The cap applies to the income that earns a benefit, not to the payroll tax base: tau_payroll applies to all labor income under every system. +_Description:_ Whether the labor income that earns a pension benefit is capped under the Defined Benefits and Notional Defined Contribution systems. When true, under the Defined Benefits system only labor income up to db_earn_cap_factor in period t times avg_labor_inc_t1_model_units (average labor income in the first model period) enters the benefit, and under the Notional Defined Contribution system only labor income up to dc_earn_cap_factor in period t times avg_labor_inc_t1_model_units is credited to the notional account. When true, funded defined contribution (FDC) contributions are also paid only on labor income up to dc_earn_cap_factor in period t times avg_labor_inc_t1_model_units. When false, all labor income enters the benefit and all labor income above the FDC floor (fdc_earn_floor_factor) is subject to FDC contributions. +_Notes:_ Used when pension_system is 'Defined Benefits' or 'Notional Defined Contribution', and for the funded defined contribution pillar under any pension_system other than 'Hybrid DB-FDC'; the 'Hybrid DB-NDC' and 'Hybrid DB-FDC' systems always apply their cutoffs. These are the same cutoffs, set and indexed in the same way, that bound the defined benefit and notional defined contribution bands of the hybrid system. The cutoff that applies to any labor income is the one in effect in the period in which it was earned. The cap applies to the income that earns a benefit, not to the payroll tax base: tau_payroll applies to all labor income under every system. +_Value Type:_ bool +_Valid Choices:_[True, False] + + +#### `pension_FOC_linkage` +_Description:_ Whether the household's first order condition for labor supply includes the value of the additional pension benefit that an extra unit of labor earns. When false, households choose labor as if their pension benefits did not depend on their earnings, although benefits are still computed from actual earnings. Pension contributions that come out of household income (the funded defined contribution pillar, fdc_tau) enter the labor first order condition regardless of this setting. +_Notes:_ Currently affects only the funded defined contribution (FDC) pillar, whose accrual term (the value of the annuity bought by a marginal contribution) is included in the labor first order condition only when this is true. The pay-as-you-go systems (US Social Security, Defined Benefits, Notional Defined Contribution, Points System, and the hybrid systems) do not yet include an accrual term in the labor first order condition, so this setting does not affect them. _Value Type:_ bool _Valid Choices:_[True, False] @@ -336,24 +343,24 @@ _Out-of-Range Action:_ error #### `db_earn_cap_factor` -_Description:_ Labor income up to db_earn_cap_factor in period t times avg_labor_inc_t1_model_units (average labor income in the first model period) earns a defined benefit (computed with the Defined Benefits parameters). Under the Defined Benefits system with pension_earn_cap true, labor income above this cap earns no benefit. Under the hybrid defined benefit and notional defined contribution system, this is the upper cutoff of the defined benefit band and the lower cutoff of the notional defined contribution band, and labor income up to it is subject to the payroll tax tau_payroll. -_Notes:_ Used when pension_system is 'Hybrid DB-NDC', and when pension_earn_cap is true and pension_system is 'Defined Benefits'. Formerly factor1_db_ndc_hybrid, which is still accepted with a deprecation warning. May vary over time: set value for base year, click '+' to add value for next year. All future years not specified are set to last value entered. The cutoffs that apply to any labor income are those the earner's cohort faces in the period in which it was earned. Changes by birth cohort are entered through pension_regimes with a single number, indexed like a single value below. Under the hybrid system, must be no greater than dc_earn_cap_factor in every period. A single value is the initial factor of a path indexed to remove trend growth, value / e^(g_y t) in model period t, so the cutoff is fixed in real terms; enter two or more values to supply your own path. +_Description:_ Labor income up to db_earn_cap_factor in period t times avg_labor_inc_t1_model_units (average labor income in the first model period) earns a defined benefit (computed with the Defined Benefits parameters). Under the Defined Benefits system with pension_earn_cap true, labor income above this cap earns no benefit. Under the hybrid defined benefit and notional defined contribution system, this is the upper cutoff of the defined benefit band and the lower cutoff of the notional defined contribution band, and labor income up to it is subject to the payroll tax tau_payroll. Under the hybrid defined benefit and funded defined contribution system, it is the upper cutoff of the defined benefit band and the lower cutoff of the funded defined contribution (FDC) band. +_Notes:_ Used when pension_system is 'Hybrid DB-NDC' or 'Hybrid DB-FDC', and when pension_earn_cap is true and pension_system is 'Defined Benefits'. Formerly factor1_db_ndc_hybrid, which is still accepted with a deprecation warning. May vary over time: set value for base year, click '+' to add value for next year. All future years not specified are set to last value entered. The cutoffs that apply to any labor income are those the earner's cohort faces in the period in which it was earned. Changes by birth cohort are entered through pension_regimes with a single number, indexed like a single value below. Under the hybrid systems, must be no greater than dc_earn_cap_factor in every period. A single value is the initial factor of a path indexed to remove trend growth, value / e^(g_y t) in model period t, so the cutoff is fixed in real terms; enter two or more values to supply your own path. _Value Type:_ float _Valid Range:_ min = 0.0 and max = 100.0 _Out-of-Range Action:_ error #### `dc_earn_cap_factor` -_Description:_ Labor income up to dc_earn_cap_factor in period t times avg_labor_inc_t1_model_units (average labor income in the first model period) is credited to a notional defined contribution account (computed with the Notional Defined Contribution parameters). Under the Notional Defined Contribution system with pension_earn_cap true, labor income above this cap is not credited. Under the hybrid defined benefit and notional defined contribution system, labor income between db_earn_cap_factor and dc_earn_cap_factor times avg_labor_inc_t1_model_units is subject to the contribution rate tau_p and earns a notional defined contribution benefit in addition to the defined benefit, and labor income above dc_earn_cap_factor times avg_labor_inc_t1_model_units earns no benefit. -_Notes:_ Used when pension_system is 'Hybrid DB-NDC', and when pension_earn_cap is true and pension_system is 'Notional Defined Contribution'. Formerly factor2_db_ndc_hybrid, which is still accepted with a deprecation warning. May vary over time: set value for base year, click '+' to add value for next year. All future years not specified are set to last value entered. The cutoffs that apply to any labor income are those the earner's cohort faces in the period in which it was earned. Changes by birth cohort are entered through pension_regimes with a single number, indexed like a single value below. Under the hybrid system, must be at least db_earn_cap_factor in every period. A single value is the initial factor of a path indexed to remove trend growth, value / e^(g_y t) in model period t, so the cutoff is fixed in real terms; enter two or more values to supply your own path. +_Description:_ Labor income up to dc_earn_cap_factor in period t times avg_labor_inc_t1_model_units (average labor income in the first model period) is credited to a notional defined contribution account (computed with the Notional Defined Contribution parameters). Under the Notional Defined Contribution system with pension_earn_cap true, labor income above this cap is not credited. Under the hybrid defined benefit and notional defined contribution system, labor income between db_earn_cap_factor and dc_earn_cap_factor times avg_labor_inc_t1_model_units is subject to the contribution rate tau_p and earns a notional defined contribution benefit in addition to the defined benefit, and labor income above dc_earn_cap_factor times avg_labor_inc_t1_model_units earns no benefit. Under the hybrid defined benefit and funded defined contribution system, labor income between db_earn_cap_factor and dc_earn_cap_factor times avg_labor_inc_t1_model_units pays the funded defined contribution (FDC) rate fdc_tau into an individual account, and labor income above it earns no benefit. With pension_earn_cap true, it is also the cap on the labor income on which FDC contributions are paid, under any other pension_system. +_Notes:_ Used when pension_system is 'Hybrid DB-NDC' or 'Hybrid DB-FDC', when pension_earn_cap is true and pension_system is 'Notional Defined Contribution', and when pension_earn_cap is true and fdc_tau is positive. Formerly factor2_db_ndc_hybrid, which is still accepted with a deprecation warning. May vary over time: set value for base year, click '+' to add value for next year. All future years not specified are set to last value entered. The cutoffs that apply to any labor income are those the earner's cohort faces in the period in which it was earned. Changes by birth cohort are entered through pension_regimes with a single number, indexed like a single value below. Under the hybrid systems, must be at least db_earn_cap_factor in every period. With pension_earn_cap true (and a pension_system other than 'Hybrid DB-FDC'), must be at least fdc_earn_floor_factor wherever fdc_tau is positive. A single value is the initial factor of a path indexed to remove trend growth, value / e^(g_y t) in model period t, so the cutoff is fixed in real terms; enter two or more values to supply your own path. _Value Type:_ float _Valid Range:_ min = 0.0 and max = 100.0 _Out-of-Range Action:_ error #### `avg_labor_inc_t1_model_units` -_Description:_ Average labor income in the first model period, in model units, taken from an outside model. The earnings cutoffs of the hybrid DB-NDC pension system, and the caps applied by pension_earn_cap under the Defined Benefits and Notional Defined Contribution systems, are db_earn_cap_factor and dc_earn_cap_factor times this value, so the cutoffs do not depend on endogenous model variables such as the wage. -_Notes:_ Used when pension_system is 'Hybrid DB-NDC', and when pension_earn_cap is true under 'Defined Benefits' or 'Notional Defined Contribution'. Must be expressed in the same (stationarized) model units as labor income w * e * n. +_Description:_ Average labor income in the first model period, in model units, taken from an outside model. The earnings cutoffs of the hybrid DB-NDC and DB-FDC pension systems, and the caps applied by pension_earn_cap under the Defined Benefits and Notional Defined Contribution systems, are db_earn_cap_factor and dc_earn_cap_factor times this value, so the cutoffs do not depend on endogenous model variables such as the wage. +_Notes:_ Used when pension_system is 'Hybrid DB-NDC' or 'Hybrid DB-FDC', when pension_earn_cap is true under 'Defined Benefits' or 'Notional Defined Contribution' or with a funded defined contribution pillar (fdc_tau positive), and to set the lower cutoff of the funded defined contribution earnings band (fdc_earn_floor_factor). Must be expressed in the same (stationarized) model units as labor income w * e * n. _Value Type:_ float _Valid Range:_ min = 0.0 and max = 1000.0 _Out-of-Range Action:_ error diff --git a/docs/book/content/theory/government.md b/docs/book/content/theory/government.md index 1985c57f0..b97f9604e 100644 --- a/docs/book/content/theory/government.md +++ b/docs/book/content/theory/government.md @@ -353,17 +353,18 @@ Businesses face a linear tax rate $\tau^{corp}_{m,t}$, which can vary by industr (SecGovPensions)= #### Pensions -The `OG-Core` model allows for five different systems for public pensions: +The `OG-Core` model allows for six different systems for public pensions: 1. U.S.-style social security system 2. Defined benefit system 3. Notional defined contribution system 4. Points system 5. Hybrid defined benefit and notional defined contribution system +6. Hybrid defined benefit and funded defined contribution system -These can be selected with the `pension_system` parameter. Accepted values are `US-Style Social Security`, `Defined Benefits`, `Notional Defined Contribution`, `Points System`, `Hybrid DB-NDC`. We discuss each of these in turn below. Any of them can be combined with a {ref}`funded defined contribution pillar ` of individual accounts, which is not part of the government budget and is turned on with `fdc_tau`. +These can be selected with the `pension_system` parameter. Accepted values are `US-Style Social Security`, `Defined Benefits`, `Notional Defined Contribution`, `Points System`, `Hybrid DB-NDC`, `Hybrid DB-FDC`. We discuss each of these in turn below. Any of them can be combined with a {ref}`funded defined contribution pillar ` of individual accounts, which is not part of the government budget and is turned on with `fdc_tau`. -For all systems, $R$ represents the age at which the individual becomes eligible to receive the government provided retirement benefit. The retirement age is a property of a birth cohort rather than of a calendar year: a household born in period $t-s$ (of age $s$ in period $t$) faces the retirement age $R_{t-s}$, and it faces the same $R_{t-s}$ in every period of its life unless a reform moves its cohort to a new value. The base value is the parameter `retirement_age`. Changes are entered through `pension_regimes`, a list of reforms applied in order, each with a calendar `year` from which it applies, an optional `max_age_at_start` (the oldest age, in that calendar year, to which the reform applies; cohorts not yet born always qualify, and leaving it out applies the reform to everyone including current retirees), and the new parameter values. This is how a phased-in increase in the retirement age that exempts those near retirement is expressed. The model expands these inputs into an array over periods and ages, so the household problem, the aggregates, and the steady state (which uses the final period's value) all read the same cohort-specific retirement age. The parameters of the defined benefit system (`alpha_db`, `avg_earn_num_years`, `yr_contrib`), of the notional defined contribution system (`tau_p`, `k_ret`, `indR`), and the contribution rate of the {ref}`funded defined contribution pillar ` (`fdc_tau`) can be changed by cohort in the same way, so a reform of the benefit formula can also be phased in by birth cohort. So can the earnings cap factors `db_earn_cap_factor` and `dc_earn_cap_factor` (used by the hybrid system and by `pension_earn_cap`) and the floor of the funded defined contribution earnings band `fdc_earn_floor_factor`, so that a change in a cutoff can exempt older workers; the cutoff that applies to labor income is the one the earner's cohort faces in the period in which the income is earned. With no regimes, the base `alpha_db` is a path by lifetime income group and the calendar year in which a benefit is paid, the base earnings cutoff factors are paths by calendar year (see the [hybrid system](#hybrid-defined-benefit-and-notional-defined-contribution-system)), and the other parameters are single values. A regime sets an earnings cutoff factor with a single number, which is indexed to remove trend growth in the same way as a single base value, $f e^{-g_y t}$, so the cutoff it sets is fixed in real terms. The replacement-rate adjustment `replacement_rate_adjust` is, by contrast, always indexed by the calendar year in which a benefit is paid. +For all systems, $R$ represents the age at which the individual becomes eligible to receive the government provided retirement benefit. The retirement age is a property of a birth cohort rather than of a calendar year: a household born in period $t-s$ (of age $s$ in period $t$) faces the retirement age $R_{t-s}$, and it faces the same $R_{t-s}$ in every period of its life unless a reform moves its cohort to a new value. The base value is the parameter `retirement_age`. Changes are entered through `pension_regimes`, a list of reforms applied in order, each with a calendar `year` from which it applies, an optional `max_age_at_start` (the oldest age, in that calendar year, to which the reform applies; cohorts not yet born always qualify, and leaving it out applies the reform to everyone including current retirees), and the new parameter values. This is how a phased-in increase in the retirement age that exempts those near retirement is expressed. The model expands these inputs into an array over periods and ages, so the household problem, the aggregates, and the steady state (which uses the final period's value) all read the same cohort-specific retirement age. The parameters of the defined benefit system (`alpha_db`, `avg_earn_num_years`, `yr_contrib`), of the notional defined contribution system (`tau_p`, `k_ret`, `indR`), and the contribution rate of the {ref}`funded defined contribution pillar ` (`fdc_tau`) can be changed by cohort in the same way, so a reform of the benefit formula can also be phased in by birth cohort. So can the earnings cap factors `db_earn_cap_factor` and `dc_earn_cap_factor` (used by the hybrid systems and by `pension_earn_cap`) and the floor of the funded defined contribution earnings band `fdc_earn_floor_factor`, so that a change in a cutoff can exempt older workers; the cutoff that applies to labor income is the one the earner's cohort faces in the period in which the income is earned. With no regimes, the base `alpha_db` is a path by lifetime income group and the calendar year in which a benefit is paid, the base earnings cutoff factors are paths by calendar year (see the [hybrid system](#hybrid-defined-benefit-and-notional-defined-contribution-system)), and the other parameters are single values. A regime sets an earnings cutoff factor with a single number, which is indexed to remove trend growth in the same way as a single base value, $f e^{-g_y t}$, so the cutoff it sets is fixed in real terms. The replacement-rate adjustment `replacement_rate_adjust` is, by contrast, always indexed by the calendar year in which a benefit is paid. ##### US-style social security system @@ -562,6 +563,25 @@ where, as in the separate systems, each sum runs over the household's own earnin Given this pension system, the partial derivative of the benefit with respect to labor supply at a working age $s < R$ is the defined benefit derivative in equation {eq}`eqn:db_deriv` when the household's labor income is below $f_{1,t} \bar{y}$, the notional defined contribution derivative in equation {eq}`eqn:ndc_deriv` when it is between $f_{1,t} \bar{y}$ and $f_{2,t} \bar{y}$, and zero when it is above $f_{2,t} \bar{y}$. +(SecGovPensionsHybridDBFDC)= +##### Hybrid defined benefit and funded defined contribution system + +The hybrid defined benefit and funded defined contribution (DB-FDC) system, selected with `pension_system` set to `Hybrid DB-FDC`, has the same structure as the [hybrid DB-NDC system](#hybrid-defined-benefit-and-notional-defined-contribution-system), with an individual account of the {ref}`funded defined contribution pillar ` in place of the notional account. It uses the same cutoffs, $f_{1,t}\bar{y}$ and $f_{2,t}\bar{y}$ with $0 \leq f_{1,t} \leq f_{2,t}$, set and indexed in the same way by `db_earn_cap_factor`, `dc_earn_cap_factor`, and `avg_labor_inc_t1_model_units`, and they can be changed by cohort through `pension_regimes` in the same way. Labor income $y_{j,s,t} = w_t e_{j,s,t} n_{j,s,t}$ is split into the following parts: + + * Labor income up to $f_{1,t} \bar{y}$ earns a defined benefit, $y^{DB}_{j,s,t}$ in equation {eq}`eqn:hybrid_bands`, computed with the formula and parameters of the [defined benefit system](#defined-benefit-system), exactly as under the hybrid DB-NDC system. This is the public pension: + + ```{math} + :label: eqn:hybrid_db_fdc_pension + pension_{j,s,t} = \biggl[\frac{\sum_{u=R-ny}^{R-1}y^{DB}_{j,u,t-s+u}}{ny}\biggr]\times Cy \times \alpha^{DB}_{j,s,t} \quad \forall s \geq R + ``` + + * Labor income between $f_{1,t} \bar{y}$ and $f_{2,t} \bar{y}$ pays the FDC contribution rate $\tau^{fdc}_{s,t}$ (`fdc_tau`) into the household's individual account, so the contribution {eq}`eqn:fdc_contrib` is paid on the band $y^{NDC}_{j,s,t}$ of equation {eq}`eqn:hybrid_bands`, with $f^{lo}_{s,t} = f_{1,t}$ and $f^{hi}_{s,t} = f_{2,t}$ whatever the values of `fdc_earn_floor_factor` and `pension_earn_cap`. The account accumulates, is annuitized at the retirement age, and enters the household problem, the capital market, and bequests as described for the {ref}`funded defined contribution pillar `. + * Labor income above $f_{2,t} \bar{y}$ earns no pension benefit and pays no FDC contribution. + +As under the hybrid DB-NDC system, the payroll tax `tau_payroll` applies to all labor income and finances the defined benefit, which is scaled by `replacement_rate_adjust`. Unlike the notional rate `tau_p`, however, FDC contributions are paid out of the household's income into its account, and the annuity bought with the account is paid by the FDC fund, not the government, so it is not part of $pension_{j,s,t}$ or of government pension outlays. The labor supply decision values the FDC band as in equation {eq}`eqn:fdc_foc`, with or without the value of the annuity depending on `pension_FOC_linkage`; the defined benefit band adds no term to it, as under the other pay-as-you-go systems. The FDC contribution rate should be positive under this system: with $\tau^{fdc} = 0$ it is the defined benefit system with covered earnings capped at $f_{1,t}\bar{y}$, and `OG-Core` warns. + +The same economy can be specified without this system, by selecting the `Defined Benefits` system with `pension_earn_cap` true and setting the funded defined contribution floor `fdc_earn_floor_factor` equal to `db_earn_cap_factor`. The hybrid DB-FDC system ties the two bands together, so that the funded band always starts where the defined benefit band ends, including when the cutoffs are changed by cohort. + (SecGovPensionsFDC)= ##### Funded defined contribution pillar @@ -589,7 +609,7 @@ p.update_specifications( C^{fdc}_{j,s,t} = \tau^{fdc}_{s,t}\Bigl(\min\bigl\{\max\{y_{j,s,t}, f^{lo}_{s,t}\bar{y}\}, f^{hi}_{s,t}\bar{y}\bigr\} - f^{lo}_{s,t}\bar{y}\Bigr) \quad\text{for}\quad s < R ``` -where $y_{j,s,t} = w_t e_{j,s,t} n_{j,s,t}$ is labor income, $\bar{y}$ is `avg_labor_inc_t1_model_units`, and $f^{lo}_{s,t}$ is `fdc_earn_floor_factor` (zero by default). There is no cap specific to the FDC pillar: the cap is the one shared with the [notional defined contribution system](#notional-defined-contribution-system), so $f^{hi}_{s,t}$ is `dc_earn_cap_factor` when `pension_earn_cap` is true, whichever `pension_system` is selected, and infinite otherwise. With `pension_system` set to `Notional Defined Contribution` and `pension_earn_cap` true, the notional and funded accounts are therefore credited on the same capped earnings, as in Sweden. Setting `fdc_earn_floor_factor` to the same values as `db_earn_cap_factor` instead makes the funded accounts cover only the earnings above a defined benefit band. The floor is entered and indexed in the same way as the [hybrid system's](#hybrid-defined-benefit-and-notional-defined-contribution-system) cutoffs: a single value $f$ is the path $f e^{-g_y t}$, fixed in real terms, and a list of values by year is used as entered (to hold a cutoff fixed in model units, so that it grows with wages, enter the same value twice). As for the other systems, the cutoffs that apply to any labor income are those the earner's cohort faces in the period in which it is earned, and `pension_regimes` can change them by cohort. With `pension_earn_cap` true, `dc_earn_cap_factor` must be at least `fdc_earn_floor_factor` wherever $\tau^{fdc}$ is positive. No contributions are paid from the retirement age on. +where $y_{j,s,t} = w_t e_{j,s,t} n_{j,s,t}$ is labor income, $\bar{y}$ is `avg_labor_inc_t1_model_units`, and $f^{lo}_{s,t}$ is `fdc_earn_floor_factor` (zero by default). There is no cap specific to the FDC pillar: the cap is the one shared with the [notional defined contribution system](#notional-defined-contribution-system), so $f^{hi}_{s,t}$ is `dc_earn_cap_factor` when `pension_earn_cap` is true, whichever `pension_system` is selected, and infinite otherwise. With `pension_system` set to `Notional Defined Contribution` and `pension_earn_cap` true, the notional and funded accounts are therefore credited on the same capped earnings, as in Sweden. Setting `fdc_earn_floor_factor` to the same values as `db_earn_cap_factor` instead makes the funded accounts cover only the earnings above a defined benefit band. The {ref}`hybrid DB-FDC system ` sets this band directly: under it, $f^{lo}_{s,t}$ is `db_earn_cap_factor` and $f^{hi}_{s,t}$ is `dc_earn_cap_factor`, whatever `fdc_earn_floor_factor` and `pension_earn_cap`. The floor is entered and indexed in the same way as the [hybrid system's](#hybrid-defined-benefit-and-notional-defined-contribution-system) cutoffs: a single value $f$ is the path $f e^{-g_y t}$, fixed in real terms, and a list of values by year is used as entered (to hold a cutoff fixed in model units, so that it grows with wages, enter the same value twice). As for the other systems, the cutoffs that apply to any labor income are those the earner's cohort faces in the period in which it is earned, and `pension_regimes` can change them by cohort. With `pension_earn_cap` true, `dc_earn_cap_factor` must be at least `fdc_earn_floor_factor` wherever $\tau^{fdc}$ is positive. No contributions are paid from the retirement age on. **Return on the accounts.** The accounts are credited the FDC return @@ -625,14 +645,16 @@ The annuity is priced on the mortality rates of the household's own lifetime inc Households alive when the transition path begins start from the FDC holdings of their age in the baseline steady state (zero if the baseline has no FDC pillar), scaled for the period-0 population in the same way as their private savings. Their balances earn the FDC return of period 0, and those already retired re-annuitize their remaining balances on the new path of $r_{fdc}$. -**Household problem.** The household budget constraint includes $-C^{fdc}_{j,s,t} + P_{j,s,t}$. Because a contribution buys a future annuity, the first order condition for labor supply values that annuity rather than treating the contribution as a tax. At a working age $s < R$, the FDC pillar adds to the marginal benefit of labor +**Household problem.** The household budget constraint includes $-C^{fdc}_{j,s,t} + P_{j,s,t}$. With `pension_FOC_linkage` set to true, the household recognizes that a contribution buys a future annuity, and the first order condition for labor supply values that annuity rather than treating the contribution as a tax. At a working age $s < R$, the FDC pillar then adds to the marginal benefit of labor ```{math} :label: eqn:fdc_foc -\frac{u'(c_{j,s,t})}{\tilde{p}_t}\frac{\partial C^{fdc}_{j,s,t}}{\partial n_{j,s,t}} + \frac{\partial C^{fdc}_{j,s,t}}{\partial n_{j,s,t}}m_{j,s,t}\sum_{u=R}^{E+S}\beta_j^{u-s}\prod_{i=s}^{u-1}(1 - \rho_{j,i})e^{(1-\sigma)g_y(u-s)}\frac{u'(c_{j,u,t+u-s})}{\tilde{p}_{t+u-s}}e^{-g_y(u-R)} ``` -where $m_{j,s,t}$ is the benefit at age $R$ bought by a unit contributed at age $s$. Along a consumption path that satisfies the savings Euler equation, contributions before retirement are valued like private saving, and the annuity adds the value of its mortality credits. +where $m_{j,s,t}$ is the benefit at age $R$ bought by a unit contributed at age $s$. Along a consumption path that satisfies the savings Euler equation, contributions before retirement are valued like private saving, and the annuity adds the value of its mortality credits. With `pension_FOC_linkage` set to false (the default), the household chooses labor as if its annuity did not depend on its contributions: only the first term of {eq}`eqn:fdc_foc`, the cost of the contribution, enters the first order condition, so the contribution acts on labor supply like a tax on the earnings in the FDC band, while the account and the annuity are still computed from actual contributions. This is how the pay-as-you-go systems are treated, none of which includes the value of the benefit an extra unit of labor earns in the labor first order condition. + +Where the FDC earnings band starts above zero, as under the hybrid DB-FDC system or with a positive `fdc_earn_floor_factor`, the marginal return to labor changes discretely at the floor of the band, whatever the value of `pension_FOC_linkage`. The default `hybr` root finder for the household problem may then fail to converge, and `FOC_root_method` set to `lm` can be used instead. **Aggregates.** The balances the fund owes households, $\hat{F}_t$, are the end-of-period holdings aggregated like household savings {eq}`EqMarkClr_Bt`, with immigrants arriving with the holdings per survivor of their age. The fund invests them in the same portfolio as household savings. diff --git a/ogcore/__init__.py b/ogcore/__init__.py index 3ffa859e2..19b2469fd 100644 --- a/ogcore/__init__.py +++ b/ogcore/__init__.py @@ -21,4 +21,4 @@ from ogcore.txfunc import * # noqa: F403 from ogcore.utils import * # noqa: F403 -__version__ = "0.25.1" +__version__ = "0.25.2" diff --git a/ogcore/default_parameters.json b/ogcore/default_parameters.json index 2594b08ad..cdfd16e60 100644 --- a/ogcore/default_parameters.json +++ b/ogcore/default_parameters.json @@ -4106,7 +4106,8 @@ "Defined Benefits", "Notional Defined Contribution", "Points System", - "Hybrid DB-NDC" + "Hybrid DB-NDC", + "Hybrid DB-FDC" ] } } @@ -4116,7 +4117,23 @@ "description": "Whether the labor income that earns a pension benefit is capped under the Defined Benefits and Notional Defined Contribution systems. When true, under the Defined Benefits system only labor income up to db_earn_cap_factor in period t times avg_labor_inc_t1_model_units (average labor income in the first model period) enters the benefit, and under the Notional Defined Contribution system only labor income up to dc_earn_cap_factor in period t times avg_labor_inc_t1_model_units is credited to the notional account. When true, funded defined contribution (FDC) contributions are also paid only on labor income up to dc_earn_cap_factor in period t times avg_labor_inc_t1_model_units. When false, all labor income enters the benefit and all labor income above the FDC floor (fdc_earn_floor_factor) is subject to FDC contributions.", "section_1": "Fiscal Policy Parameters", "section_2": "Government Pension Parameters", - "notes": "Used when pension_system is 'Defined Benefits' or 'Notional Defined Contribution', and for the funded defined contribution pillar under any pension_system; the 'Hybrid DB-NDC' system always applies its cutoffs. These are the same cutoffs, set and indexed in the same way, that bound the defined benefit and notional defined contribution bands of the hybrid system. The cutoff that applies to any labor income is the one in effect in the period in which it was earned. The cap applies to the income that earns a benefit, not to the payroll tax base: tau_payroll applies to all labor income under every system.", + "notes": "Used when pension_system is 'Defined Benefits' or 'Notional Defined Contribution', and for the funded defined contribution pillar under any pension_system other than 'Hybrid DB-FDC'; the 'Hybrid DB-NDC' and 'Hybrid DB-FDC' systems always apply their cutoffs. These are the same cutoffs, set and indexed in the same way, that bound the defined benefit and notional defined contribution bands of the hybrid system. The cutoff that applies to any labor income is the one in effect in the period in which it was earned. The cap applies to the income that earns a benefit, not to the payroll tax base: tau_payroll applies to all labor income under every system.", + "type": "bool", + "value": [ + { + "value": false + } + ], + "validators": { + "choice": {"choices": [true, false]} + } + }, + "pension_FOC_linkage": { + "title": "Households value the pension benefit their labor earns", + "description": "Whether the household's first order condition for labor supply includes the value of the additional pension benefit that an extra unit of labor earns. When false, households choose labor as if their pension benefits did not depend on their earnings, although benefits are still computed from actual earnings. Pension contributions that come out of household income (the funded defined contribution pillar, fdc_tau) enter the labor first order condition regardless of this setting.", + "section_1": "Fiscal Policy Parameters", + "section_2": "Government Pension Parameters", + "notes": "Currently affects only the funded defined contribution (FDC) pillar, whose accrual term (the value of the annuity bought by a marginal contribution) is included in the labor first order condition only when this is true. The pay-as-you-go systems (US Social Security, Defined Benefits, Notional Defined Contribution, Points System, and the hybrid systems) do not yet include an accrual term in the labor first order condition, so this setting does not affect them.", "type": "bool", "value": [ { @@ -4148,7 +4165,7 @@ }, "fdc_tau": { "title": "Contribution rate to funded defined contribution accounts.", - "description": "Share of labor income in the funded defined contribution (FDC) earnings band that households pay into individual FDC accounts before the retirement age. Accounts earn the FDC return r_fdc = r_p - r_fdc_wedge (the household portfolio return r_p less the wedge r_fdc_wedge) and, at the retirement age, buy an actuarially fair life annuity. The FDC pillar runs alongside whichever pension_system is selected; a rate of zero (the default) turns it off.", + "description": "Share of labor income in the funded defined contribution (FDC) earnings band that households pay into individual FDC accounts before the retirement age. Accounts earn the FDC return r_fdc = r_p - r_fdc_wedge (the household portfolio return r_p less the wedge r_fdc_wedge) and, at the retirement age, buy an actuarially fair life annuity. The FDC pillar runs alongside whichever pension_system is selected; a rate of zero (the default) turns it off. Under the 'Hybrid DB-FDC' pension_system, the FDC earnings band is the labor income between db_earn_cap_factor and dc_earn_cap_factor times avg_labor_inc_t1_model_units, and fdc_tau should be positive.", "section_1": "Fiscal Policy Parameters", "section_2": "Government Pension Parameters", "notes": "A single base value; changes by birth cohort or calendar year are entered through pension_regimes. Contributions are not government revenue and benefits are not government outlays: the accounts are held by a fund outside the government budget.", @@ -4167,10 +4184,10 @@ }, "fdc_earn_floor_factor": { "title": "Lower cutoff of the labor income on which funded defined contribution contributions are paid, as a multiple of initial-period average labor income.", - "description": "FDC contributions are paid only on labor income above fdc_earn_floor_factor in period t times avg_labor_inc_t1_model_units (average labor income in the first model period). Setting it to the upper cutoff of another pension system's band makes the FDC pillar cover the earnings above that band. The upper cutoff is the shared dc_earn_cap_factor when pension_earn_cap is true (and there is none otherwise).", + "description": "FDC contributions are paid only on labor income above fdc_earn_floor_factor in period t times avg_labor_inc_t1_model_units (average labor income in the first model period). Setting it to the upper cutoff of another pension system's band makes the FDC pillar cover the earnings above that band. The upper cutoff is the shared dc_earn_cap_factor when pension_earn_cap is true (and there is none otherwise). Under the 'Hybrid DB-FDC' pension_system, the band is set by db_earn_cap_factor and dc_earn_cap_factor instead, and this floor is not used.", "section_1": "Fiscal Policy Parameters", "section_2": "Government Pension Parameters", - "notes": "Only used when fdc_tau is positive. May vary over time: set value for base year, click '+' to add value for next year. All future years not specified are set to last value entered. The cutoff that applies to any labor income is the one the earner's cohort faces in the period in which it was earned. Changes by birth cohort are entered through pension_regimes with a single number, indexed like a single value below. Entered and indexed in the same way as db_earn_cap_factor and dc_earn_cap_factor: a single value is the initial factor of a path indexed to remove trend growth, value / e^(g_y t) in model period t, so the cutoff is fixed in real terms; enter two or more values to supply your own path. With pension_earn_cap true, must be no greater than dc_earn_cap_factor wherever fdc_tau is positive.", + "notes": "Only used when fdc_tau is positive and pension_system is not 'Hybrid DB-FDC'. May vary over time: set value for base year, click '+' to add value for next year. All future years not specified are set to last value entered. The cutoff that applies to any labor income is the one the earner's cohort faces in the period in which it was earned. Changes by birth cohort are entered through pension_regimes with a single number, indexed like a single value below. Entered and indexed in the same way as db_earn_cap_factor and dc_earn_cap_factor: a single value is the initial factor of a path indexed to remove trend growth, value / e^(g_y t) in model period t, so the cutoff is fixed in real terms; enter two or more values to supply your own path. With pension_earn_cap true, must be no greater than dc_earn_cap_factor wherever fdc_tau is positive.", "type": "float", "number_dims": 1, "value": [ @@ -4230,10 +4247,10 @@ }, "db_earn_cap_factor": { "title": "Cap on the labor income that earns a defined benefit, as a multiple of initial-period average labor income.", - "description": "Labor income up to db_earn_cap_factor in period t times avg_labor_inc_t1_model_units (average labor income in the first model period) earns a defined benefit (computed with the Defined Benefits parameters). Under the Defined Benefits system with pension_earn_cap true, labor income above this cap earns no benefit. Under the hybrid defined benefit and notional defined contribution system, this is the upper cutoff of the defined benefit band and the lower cutoff of the notional defined contribution band, and labor income up to it is subject to the payroll tax tau_payroll.", + "description": "Labor income up to db_earn_cap_factor in period t times avg_labor_inc_t1_model_units (average labor income in the first model period) earns a defined benefit (computed with the Defined Benefits parameters). Under the Defined Benefits system with pension_earn_cap true, labor income above this cap earns no benefit. Under the hybrid defined benefit and notional defined contribution system, this is the upper cutoff of the defined benefit band and the lower cutoff of the notional defined contribution band, and labor income up to it is subject to the payroll tax tau_payroll. Under the hybrid defined benefit and funded defined contribution system, it is the upper cutoff of the defined benefit band and the lower cutoff of the funded defined contribution (FDC) band.", "section_1": "Fiscal Policy Parameters", "section_2": "Government Pension Parameters", - "notes": "Used when pension_system is 'Hybrid DB-NDC', and when pension_earn_cap is true and pension_system is 'Defined Benefits'. Formerly factor1_db_ndc_hybrid, which is still accepted with a deprecation warning. May vary over time: set value for base year, click '+' to add value for next year. All future years not specified are set to last value entered. The cutoffs that apply to any labor income are those the earner's cohort faces in the period in which it was earned. Changes by birth cohort are entered through pension_regimes with a single number, indexed like a single value below. Under the hybrid system, must be no greater than dc_earn_cap_factor in every period. A single value is the initial factor of a path indexed to remove trend growth, value / e^(g_y t) in model period t, so the cutoff is fixed in real terms; enter two or more values to supply your own path.", + "notes": "Used when pension_system is 'Hybrid DB-NDC' or 'Hybrid DB-FDC', and when pension_earn_cap is true and pension_system is 'Defined Benefits'. Formerly factor1_db_ndc_hybrid, which is still accepted with a deprecation warning. May vary over time: set value for base year, click '+' to add value for next year. All future years not specified are set to last value entered. The cutoffs that apply to any labor income are those the earner's cohort faces in the period in which it was earned. Changes by birth cohort are entered through pension_regimes with a single number, indexed like a single value below. Under the hybrid systems, must be no greater than dc_earn_cap_factor in every period. A single value is the initial factor of a path indexed to remove trend growth, value / e^(g_y t) in model period t, so the cutoff is fixed in real terms; enter two or more values to supply your own path.", "type": "float", "number_dims": 1, "value": [ @@ -4252,10 +4269,10 @@ }, "dc_earn_cap_factor": { "title": "Cap on the labor income credited to a defined contribution account, as a multiple of initial-period average labor income.", - "description": "Labor income up to dc_earn_cap_factor in period t times avg_labor_inc_t1_model_units (average labor income in the first model period) is credited to a notional defined contribution account (computed with the Notional Defined Contribution parameters). Under the Notional Defined Contribution system with pension_earn_cap true, labor income above this cap is not credited. Under the hybrid defined benefit and notional defined contribution system, labor income between db_earn_cap_factor and dc_earn_cap_factor times avg_labor_inc_t1_model_units is subject to the contribution rate tau_p and earns a notional defined contribution benefit in addition to the defined benefit, and labor income above dc_earn_cap_factor times avg_labor_inc_t1_model_units earns no benefit. With pension_earn_cap true, it is also the cap on the labor income on which funded defined contribution (FDC) contributions are paid, under any pension_system.", + "description": "Labor income up to dc_earn_cap_factor in period t times avg_labor_inc_t1_model_units (average labor income in the first model period) is credited to a notional defined contribution account (computed with the Notional Defined Contribution parameters). Under the Notional Defined Contribution system with pension_earn_cap true, labor income above this cap is not credited. Under the hybrid defined benefit and notional defined contribution system, labor income between db_earn_cap_factor and dc_earn_cap_factor times avg_labor_inc_t1_model_units is subject to the contribution rate tau_p and earns a notional defined contribution benefit in addition to the defined benefit, and labor income above dc_earn_cap_factor times avg_labor_inc_t1_model_units earns no benefit. Under the hybrid defined benefit and funded defined contribution system, labor income between db_earn_cap_factor and dc_earn_cap_factor times avg_labor_inc_t1_model_units pays the funded defined contribution (FDC) rate fdc_tau into an individual account, and labor income above it earns no benefit. With pension_earn_cap true, it is also the cap on the labor income on which FDC contributions are paid, under any other pension_system.", "section_1": "Fiscal Policy Parameters", "section_2": "Government Pension Parameters", - "notes": "Used when pension_system is 'Hybrid DB-NDC', when pension_earn_cap is true and pension_system is 'Notional Defined Contribution', and when pension_earn_cap is true and fdc_tau is positive. Formerly factor2_db_ndc_hybrid, which is still accepted with a deprecation warning. May vary over time: set value for base year, click '+' to add value for next year. All future years not specified are set to last value entered. The cutoffs that apply to any labor income are those the earner's cohort faces in the period in which it was earned. Changes by birth cohort are entered through pension_regimes with a single number, indexed like a single value below. Under the hybrid system, must be at least db_earn_cap_factor in every period. With pension_earn_cap true, must be at least fdc_earn_floor_factor wherever fdc_tau is positive. A single value is the initial factor of a path indexed to remove trend growth, value / e^(g_y t) in model period t, so the cutoff is fixed in real terms; enter two or more values to supply your own path.", + "notes": "Used when pension_system is 'Hybrid DB-NDC' or 'Hybrid DB-FDC', when pension_earn_cap is true and pension_system is 'Notional Defined Contribution', and when pension_earn_cap is true and fdc_tau is positive. Formerly factor2_db_ndc_hybrid, which is still accepted with a deprecation warning. May vary over time: set value for base year, click '+' to add value for next year. All future years not specified are set to last value entered. The cutoffs that apply to any labor income are those the earner's cohort faces in the period in which it was earned. Changes by birth cohort are entered through pension_regimes with a single number, indexed like a single value below. Under the hybrid systems, must be at least db_earn_cap_factor in every period. With pension_earn_cap true (and a pension_system other than 'Hybrid DB-FDC'), must be at least fdc_earn_floor_factor wherever fdc_tau is positive. A single value is the initial factor of a path indexed to remove trend growth, value / e^(g_y t) in model period t, so the cutoff is fixed in real terms; enter two or more values to supply your own path.", "type": "float", "number_dims": 1, "value": [ @@ -4274,10 +4291,10 @@ }, "avg_labor_inc_t1_model_units": { "title": "Average labor income in the first model period, in model units.", - "description": "Average labor income in the first model period, in model units, taken from an outside model. The earnings cutoffs of the hybrid DB-NDC pension system, and the caps applied by pension_earn_cap under the Defined Benefits and Notional Defined Contribution systems, are db_earn_cap_factor and dc_earn_cap_factor times this value, so the cutoffs do not depend on endogenous model variables such as the wage.", + "description": "Average labor income in the first model period, in model units, taken from an outside model. The earnings cutoffs of the hybrid DB-NDC and DB-FDC pension systems, and the caps applied by pension_earn_cap under the Defined Benefits and Notional Defined Contribution systems, are db_earn_cap_factor and dc_earn_cap_factor times this value, so the cutoffs do not depend on endogenous model variables such as the wage.", "section_1": "Fiscal Policy Parameters", "section_2": "Government Pension Parameters", - "notes": "Used when pension_system is 'Hybrid DB-NDC', when pension_earn_cap is true under 'Defined Benefits' or 'Notional Defined Contribution' or with a funded defined contribution pillar (fdc_tau positive), and to set the lower cutoff of the funded defined contribution earnings band (fdc_earn_floor_factor). Must be expressed in the same (stationarized) model units as labor income w * e * n.", + "notes": "Used when pension_system is 'Hybrid DB-NDC' or 'Hybrid DB-FDC', when pension_earn_cap is true under 'Defined Benefits' or 'Notional Defined Contribution' or with a funded defined contribution pillar (fdc_tau positive), and to set the lower cutoff of the funded defined contribution earnings band (fdc_earn_floor_factor). Must be expressed in the same (stationarized) model units as labor income w * e * n.", "type": "float", "value": [ { diff --git a/ogcore/household.py b/ogcore/household.py index 40f738ff9..10e02cb1c 100644 --- a/ogcore/household.py +++ b/ogcore/household.py @@ -573,6 +573,11 @@ def fdc_labor_wedge(cons, p_tilde, fdc, rho, beta, p): equation shows $e^{-\sigma g_y}$ instead because next period's savings enter this period's budget multiplied by $e^{g_y}$.) + The second (accrual) term is included only when + ``p.pension_FOC_linkage`` is true; otherwise households choose labor + as if the annuity did not depend on their contributions. The first + term is always included. + Contributions of households that die before R go to bequests, which the household does not value here (its bequest motive is over private savings only). @@ -601,7 +606,10 @@ def fdc_labor_wedge(cons, p_tilde, fdc, rho, beta, p): L = np.shape(cons)[0] a0 = p.S - L R = fdc.R - a0 - if fdc.R >= p.S or not np.any(fdc.benefit_per_contrib): + # Specifications objects pickled before pension_FOC_linkage existed + # have none; they were solved with the accrual term + linkage = getattr(p, "pension_FOC_linkage", True) + if not linkage or fdc.R >= p.S or not np.any(fdc.benefit_per_contrib): return wedge rho = np.asarray(rho, dtype=float).reshape(np.shape(cons)) ages = np.arange(L).reshape((L,) + (1,) * (rho.ndim - 1)) diff --git a/ogcore/parameters.py b/ogcore/parameters.py index f059b0b76..358683a22 100644 --- a/ogcore/parameters.py +++ b/ogcore/parameters.py @@ -883,11 +883,13 @@ def _check_earn_cap_factors(self): Check that the earnings cutoffs are ordered for every period and age (a check paramtools validators cannot make, since the factors may be entered as lists of different lengths and changed - by pension regimes): under the hybrid DB-NDC system, - ``dc_earn_cap_factor`` must be at least ``db_earn_cap_factor``, - and with ``pension_earn_cap`` True, ``dc_earn_cap_factor`` (the - cap on funded defined contribution earnings) must be at least - ``fdc_earn_floor_factor`` wherever ``fdc_tau`` is positive. + by pension regimes): under the hybrid DB-NDC and DB-FDC + systems, ``dc_earn_cap_factor`` must be at least + ``db_earn_cap_factor``, and otherwise, with ``pension_earn_cap`` + True, ``dc_earn_cap_factor`` (the cap on funded defined + contribution earnings) must be at least ``fdc_earn_floor_factor`` + wherever ``fdc_tau`` is positive (the hybrid DB-FDC system sets + its funded band from the two cap factors instead). Args: None @@ -901,14 +903,15 @@ def _check_earn_cap_factors(self): """ checks = [] - if self.pension_system == "Hybrid DB-NDC": + hybrid = self.pension_system in ("Hybrid DB-NDC", "Hybrid DB-FDC") + if hybrid: checks.append( ( "db_earn_cap_factor", self.dc_earn_cap_factor < self.db_earn_cap_factor, ) ) - if self.pension_earn_cap: + if self.pension_earn_cap and not hybrid: checks.append( ( "fdc_earn_floor_factor", @@ -930,6 +933,14 @@ def _check_earn_cap_factors(self): f"{getattr(self, lower)[t, s]} and dc_earn_cap_factor=" f"{self.dc_earn_cap_factor[t, s]}" ) + if self.pension_system == "Hybrid DB-FDC" and not np.any( + np.asarray(self.fdc_tau) > 0 + ): + warnings.warn( + "pension_system is 'Hybrid DB-FDC' but fdc_tau is zero, so " + "no funded contributions are paid and the system is the " + "defined benefit system capped at db_earn_cap_factor" + ) def _check_pension_steady_state(self, arrays): """ diff --git a/ogcore/pensions.py b/ogcore/pensions.py index b9abbbf06..9e62ae2d3 100644 --- a/ogcore/pensions.py +++ b/ogcore/pensions.py @@ -99,6 +99,8 @@ def pension_earn_caps(p): The hybrid DB-NDC system pays a defined benefit on labor income up to the first cutoff and a notional defined contribution benefit on + labor income between the two. The hybrid DB-FDC system pays the + same defined benefit and collects funded defined contributions on labor income between the two. With ``pension_earn_cap`` True, the Defined Benefits system counts only labor income up to the first cutoff toward the benefit, and the Notional Defined Contribution @@ -500,12 +502,17 @@ def pension_amount( pension = pension * replacement_rate_adjustment( pension, t, j, method, p ) + elif p.pension_system == "Hybrid DB-FDC": + pension = DB_FDC_hybrid_amount(w, e, n, t, j, method, p) + pension = pension * replacement_rate_adjustment( + pension, t, j, method, p + ) else: raise ValueError( "pension_system must be one of the following: " "'US-Style Social Security', 'Defined Benefits', " "'Notional Defined Contribution', 'Points System', " - "'Hybrid DB-NDC'" + "'Hybrid DB-NDC', 'Hybrid DB-FDC'" ) return pension @@ -1100,6 +1107,49 @@ def NDC_amount( return NDC +def hybrid_earn_cutoffs(p): + """ + The two earnings cutoffs of the hybrid systems (``Hybrid DB-NDC`` + and ``Hybrid DB-FDC``), from ``pension_earn_caps``, checked to be + ordered in every period and at every age. + + Args: + p (OG-Core Specifications object): model parameters + + Returns: + cut1, cut2 (Numpy arrays): the cutoffs in model units of labor + income, by period and age ((T + S) x S once + ``Specifications`` builds them; a single value or a path by + period, as a caller may set by hand, is also accepted) + + Raises: + ValueError: if ``dc_earn_cap_factor`` is less than + ``db_earn_cap_factor`` in any period + """ + cut1, cut2 = pension_earn_caps(p) + n_per = max(cut1.shape[0], cut2.shape[0]) + n_age = max(cut1.shape[1], cut2.shape[1]) + rows = np.arange(n_per)[:, np.newaxis] + cols = np.arange(n_age)[np.newaxis, :] + c1_full = cut1[ + np.minimum(rows, cut1.shape[0] - 1), + np.minimum(cols, cut1.shape[1] - 1), + ] + c2_full = cut2[ + np.minimum(rows, cut2.shape[0] - 1), + np.minimum(cols, cut2.shape[1] - 1), + ] + if np.any(c2_full < c1_full): + t_bad, s_bad = np.argwhere(c2_full < c1_full)[0] + raise ValueError( + "dc_earn_cap_factor must be at least db_earn_cap_factor " + f"in every period and at every age: in period {t_bad} at " + f"age period {s_bad}, the cutoffs are {c1_full[t_bad, s_bad]} " + f"and {c2_full[t_bad, s_bad]}" + ) + return cut1, cut2 + + def DB_NDC_hybrid_amount(w, e, n, r, ndc_rates, t, j, method, p): r""" Calculate public pension from a hybrid defined benefit and notional @@ -1155,30 +1205,7 @@ def DB_NDC_hybrid_amount(w, e, n, r, ndc_rates, t, j, method, p): ValueError: if ``dc_earn_cap_factor`` is less than ``db_earn_cap_factor`` in any period """ - # cutoffs in model units of labor income, by period and age - # ((T + S) x S once Specifications builds them; a single value or a - # path by period, as a caller may set by hand, is also accepted) - cut1, cut2 = pension_earn_caps(p) - n_per = max(cut1.shape[0], cut2.shape[0]) - n_age = max(cut1.shape[1], cut2.shape[1]) - rows = np.arange(n_per)[:, np.newaxis] - cols = np.arange(n_age)[np.newaxis, :] - c1_full = cut1[ - np.minimum(rows, cut1.shape[0] - 1), - np.minimum(cols, cut1.shape[1] - 1), - ] - c2_full = cut2[ - np.minimum(rows, cut2.shape[0] - 1), - np.minimum(cols, cut2.shape[1] - 1), - ] - if np.any(c2_full < c1_full): - t_bad, s_bad = np.argwhere(c2_full < c1_full)[0] - raise ValueError( - "dc_earn_cap_factor must be at least db_earn_cap_factor " - f"in every period and at every age: in period {t_bad} at " - f"age period {s_bad}, the cutoffs are {c1_full[t_bad, s_bad]} " - f"and {c2_full[t_bad, s_bad]}" - ) + cut1, cut2 = hybrid_earn_cutoffs(p) DB = DB_amount(w, e, n, t, j, method, p, earn_lo=0.0, earn_hi=cut1) NDC = NDC_amount( w, @@ -1196,6 +1223,54 @@ def DB_NDC_hybrid_amount(w, e, n, r, ndc_rates, t, j, method, p): return DB + NDC +def DB_FDC_hybrid_amount(w, e, n, t, j, method, p): + r""" + Calculate public pension from a hybrid defined benefit and funded + defined contribution system. + + This system has the same structure as the hybrid DB-NDC system + (``DB_NDC_hybrid_amount``), with a funded defined contribution (FDC) + account in place of the notional one. Labor income + $w_t e_{j,s,t} n_{j,s,t}$ is split into two bands at the cutoffs + $f_{1,t} \bar{y}$ and $f_{2,t} \bar{y}$ of ``pension_earn_caps``. + Income up to $f_{1,t} \bar{y}$ earns a defined benefit computed + with the ``DB_amount`` formula and parameters on that capped + income, which this function returns. Income between + $f_{1,t} \bar{y}$ and $f_{2,t} \bar{y}$ pays the FDC contribution + rate ``fdc_tau`` into the household's individual account, which + buys an annuity at retirement (``fdc_earn_bands`` sets this band + under this system). The annuity is paid by the FDC fund, not the + government, so it is not part of this public pension; the household + receives it through the FDC pillar. Income above $f_{2,t} \bar{y}$ + earns no benefit: + + .. math:: + pension_{j,s,t} = pension^{DB}_{j,s,t}\bigl(\min\{w e n, + f_1 \bar{y}\}\bigr) \quad \forall s \geq R + + Args: + w (array_like): real wage rate + e (Numpy array): effective labor units + n (Numpy array): labor supply; same shapes as accepted by + ``DB_amount`` + t (int): model period of the first element of ``n`` + j (int): index of lifetime income group, None if all groups + method (str): adjusts calculation dimensions based on 'SS', + 'TPI', or 'TPI_scalar' + p (OG-Core Specifications object): model parameters + + Returns: + pension (Numpy array): defined benefit pension amount for each + household + + Raises: + ValueError: if ``dc_earn_cap_factor`` is less than + ``db_earn_cap_factor`` in any period + """ + cut1, _ = hybrid_earn_cutoffs(p) + return DB_amount(w, e, n, t, j, method, p, earn_lo=0.0, earn_hi=cut1) + + def PS_amount(w, e, n, j, factor, p): r""" Calculate public pension from a points system. @@ -2693,7 +2768,12 @@ def fdc_earn_bands(p): ``avg_labor_inc_t1_model_units``. The upper cutoff is the cap shared with the other defined contribution systems, ``dc_earn_cap_factor`` times ``avg_labor_inc_t1_model_units``, - when ``pension_earn_cap`` is True, and infinite otherwise. The + when ``pension_earn_cap`` is True, and infinite otherwise. Under + the hybrid DB-FDC system (``pension_system`` 'Hybrid DB-FDC'), the + band is instead the one between the two cutoffs of + ``pension_earn_caps``, as for the notional band of the hybrid + DB-NDC system, whatever ``fdc_earn_floor_factor`` and + ``pension_earn_cap``. The cutoff at period t and age s is the one that applies to the cohort of that household; it applies to the labor income the household earns in that period. @@ -2707,6 +2787,9 @@ def fdc_earn_bands(p): factor set by hand as a single value or a path by period gives one column, applied at every age) """ + if getattr(p, "pension_system", None) == "Hybrid DB-FDC": + # the FDC band of the hybrid system lies between its two cutoffs + return tuple(np.ascontiguousarray(c) for c in hybrid_earn_cutoffs(p)) avg_inc = float(p.avg_labor_inc_t1_model_units) lo = _period_age(getattr(p, "fdc_earn_floor_factor", 0.0)) * avg_inc if getattr(p, "pension_earn_cap", False): diff --git a/pyproject.toml b/pyproject.toml index ee4d375b4..0b0f0e86e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "ogcore" -version = "0.25.1" +version = "0.25.2" authors = [ {name = "Jason DeBacker and Richard W. Evans"}, ] diff --git a/tests/test_SS.py b/tests/test_SS.py index 458f6d18a..6b93aa885 100644 --- a/tests/test_SS.py +++ b/tests/test_SS.py @@ -1628,7 +1628,7 @@ def test_SS_funded_defined_contribution(): accounts are reported. """ base = _solve_small_SS({}) - fdc = _solve_small_SS({"fdc_tau": 0.05}) + fdc = _solve_small_SS({"fdc_tau": 0.05, "pension_FOC_linkage": True}) assert base["F"] == 0.0 and base["agg_fdc_contrib"] == 0.0 assert np.all(base["fdc_holdings"] == 0.0) assert np.abs(fdc["resource_constraint_error"]).max() < 1e-7 @@ -1643,6 +1643,41 @@ def test_SS_funded_defined_contribution(): assert fdc["fdc_fund_transfer"] == 0.0 +def test_SS_hybrid_db_fdc(): + """ + The steady state solves with the hybrid DB-FDC pension system: a + defined benefit on labor income up to the first cutoff, paid by the + government, and funded contributions on labor income between the + two cutoffs. It is the same economy as the Defined Benefits system + capped at the first cutoff with the FDC pillar's floor set at that + cutoff and its cap at the second. + """ + caps = { + "db_earn_cap_factor": [0.3, 0.3], + "dc_earn_cap_factor": [1.0, 1.0], + "fdc_tau": 0.05, + "alpha_db": [[0.02]], + # contributions start at the first cutoff, which puts a jump in + # the marginal return to labor there that the default hybr root + # finder does not get past + "FOC_root_method": "lm", + } + hybrid = _solve_small_SS(dict(caps, pension_system="Hybrid DB-FDC")) + assert np.abs(hybrid["resource_constraint_error"]).max() < 1e-7 + assert hybrid["agg_pension_outlays"] > 0.0 + assert hybrid["F"] > 0.0 and hybrid["agg_fdc_contrib"] > 0.0 + same = _solve_small_SS( + dict( + caps, + pension_system="Defined Benefits", + pension_earn_cap=True, + fdc_earn_floor_factor=[0.3, 0.3], + ) + ) + for var in ("Y", "K", "L", "r", "w", "F", "agg_pension_outlays"): + assert np.allclose(hybrid[var], same[var], rtol=1e-8), var + + @pytest.mark.parametrize( "wedge", [0.01, -0.01], ids=["wedge", "negative wedge"] ) @@ -1654,7 +1689,9 @@ def test_SS_funded_defined_contribution_wedge(wedge): wedge, covered by a transfer from the government. The resource constraint holds in each case. """ - fdc = _solve_small_SS({"fdc_tau": 0.05, "r_fdc_wedge": [wedge]}) + fdc = _solve_small_SS( + {"fdc_tau": 0.05, "r_fdc_wedge": [wedge], "pension_FOC_linkage": True} + ) assert np.abs(fdc["resource_constraint_error"]).max() < 1e-7 assert fdc["F"] > 0.0 assert np.isclose(fdc["fdc_spread"], wedge * fdc["F"], rtol=1e-8) diff --git a/tests/test_TPI.py b/tests/test_TPI.py index cb1c73cea..252647f55 100644 --- a/tests/test_TPI.py +++ b/tests/test_TPI.py @@ -1641,7 +1641,9 @@ def _fdc_tpi_run( ) with open(os.path.join(CUR_PATH, "testing_params.json")) as f: p.update_specifications(json.load(f)) - p.update_specifications({"fdc_tau": tau, **(updates or {})}) + p.update_specifications( + {"fdc_tau": tau, "pension_FOC_linkage": True, **(updates or {})} + ) utils.mkdirs(os.path.join(out, "SS")) ss = SS.run_SS(p, client=None) with open(os.path.join(out, "SS", "SS_vars.pkl"), "wb") as f: diff --git a/tests/test_household.py b/tests/test_household.py index ee6f02398..9e1c87262 100644 --- a/tests/test_household.py +++ b/tests/test_household.py @@ -1274,7 +1274,7 @@ def test_get_ci(c_s, p_i, p_tilde, tau_c, alpha_c, c_min, method, expected): def _fdc_on_specs(tau=0.05): p = Specifications() - p.update_specifications({"fdc_tau": tau}) + p.update_specifications({"fdc_tau": tau, "pension_FOC_linkage": True}) return p @@ -1529,3 +1529,40 @@ def test_fdc_labor_wedge_partial_lifetime(): cons[a0:], 1.0, part, rho[a0:], 0.97, p ) assert np.allclose(wedge, full[a0:]) + + +@pytest.mark.parametrize("linkage", [True, False], ids=["linked", "unlinked"]) +def test_fdc_labor_wedge_linkage(linkage): + """ + With pension_FOC_linkage false, the wedge is only the contribution + cost, -MU_s dC_s; the value of the annuity the contribution buys + is left out. With it true, that value is added. + """ + from ogcore import pensions + from types import SimpleNamespace + + S, R = 10, 6 + p = SimpleNamespace(S=S, sigma=2.0, g_y=0.02, pension_FOC_linkage=linkage) + rho = np.linspace(0.01, 0.3, S) + rho[-1] = 1.0 + C, A, P, H, dC, m = pensions.fdc_lifetime_loop( + np.linspace(0.5, 1.0, S), + np.full(S, 0.1), + np.zeros(S), + np.full(S, np.inf), + np.full(S, 0.05), + rho, + R, + 0.02, + 0, + 0.0, + S, + ) + fdc = pensions.FDCLifetime(C, A, P, H, dC, m, R) + cons = np.linspace(0.6, 0.9, S) + wedge = household.fdc_labor_wedge(cons, 1.0, fdc, rho, 0.97, p) + cost = -household.marg_ut_cons(cons, p.sigma) * dC + if linkage: + assert np.all(wedge[:R] > cost[:R]) + else: + assert np.allclose(wedge, cost) diff --git a/tests/test_pensions.py b/tests/test_pensions.py index 9e4296c55..f1095db06 100644 --- a/tests/test_pensions.py +++ b/tests/test_pensions.py @@ -1212,8 +1212,20 @@ def test_get_PS(args, PS_expected): "avg_labor_inc_t1_model_units": 0.8, }, ), + ( + "Hybrid DB-FDC", + { + "alpha_db": [[0.02]], + "yr_contrib": 35, + "avg_earn_num_years": 40, + "fdc_tau": 0.05, + "db_earn_cap_factor": [0.5], + "dc_earn_cap_factor": [1.5], + "avg_labor_inc_t1_model_units": 0.8, + }, + ), ], - ids=["DB", "PS", "NDC", "Hybrid"], + ids=["DB", "PS", "NDC", "Hybrid", "Hybrid DB-FDC"], ) def test_pension_amount_with_real_specifications(system, updates): """ @@ -1268,8 +1280,20 @@ def test_pension_amount_with_real_specifications(system, updates): "avg_labor_inc_t1_model_units": 0.8, }, ), + ( + "Hybrid DB-FDC", + { + "alpha_db": [[0.02]], + "yr_contrib": 35, + "avg_earn_num_years": 40, + "fdc_tau": 0.05, + "db_earn_cap_factor": [0.5], + "dc_earn_cap_factor": [1.5], + "avg_labor_inc_t1_model_units": 0.8, + }, + ), ], - ids=["SS", "DB", "PS", "NDC", "Hybrid"], + ids=["SS", "DB", "PS", "NDC", "Hybrid", "Hybrid DB-FDC"], ) def test_replacement_rate_adjust_applies_to_every_system(system, updates): """ @@ -3319,6 +3343,138 @@ def test_fdc_earn_cap_below_floor_raises(): ) +def _db_fdc_params(factor1=0.5, factor2=1.5, **updates): + """ + Specifications for the hybrid DB-FDC system with constant cutoff + factors (entered twice so they are not indexed) and the defined + benefit parameters of the hybrid DB-NDC tests. + """ + p = Specifications() + p.update_specifications( + dict( + { + "alpha_db": [[0.02]], + "yr_contrib": 35, + "avg_earn_num_years": 40, + "fdc_tau": 0.05, + "pension_system": "Hybrid DB-FDC", + "db_earn_cap_factor": [factor1, factor1], + "dc_earn_cap_factor": [factor2, factor2], + "avg_labor_inc_t1_model_units": 0.8, + }, + **updates, + ) + ) + p.n_preTP = 0.4 * np.ones((p.S, p.J)) + return p + + +@pytest.mark.parametrize("ndim", [1, 2], ids=["S", "SxJ"]) +def test_DB_FDC_hybrid_amount_SS(ndim): + """ + The public pension of the hybrid DB-FDC system is the defined + benefit on labor income capped at the first cutoff: the same as the + Defined Benefits system with pension_earn_cap and the same cap. The + funded band pays no public pension. + """ + p = _db_fdc_params() + p_db = copy.deepcopy(p) + p_db.pension_system = "Defined Benefits" + p_db.pension_earn_cap = True + w = 1.2 + if ndim == 1: + j = p.J - 1 + e = p.e[-1, :, j] + n = 0.4 * np.ones(p.S) + else: + j = None + e = p.e[-1, :, :] + n = 0.4 * np.ones((p.S, p.J)) + hybrid = pensions.DB_FDC_hybrid_amount(w, e, n, None, j, "SS", p) + capped = pensions.DB_amount( + w, e, n, None, j, "SS", p_db, earn_hi=pensions.pension_earn_caps(p)[0] + ) + uncapped = pensions.DB_amount(w, e, n, None, j, "SS", p_db) + assert np.any(hybrid > 0.0) + assert np.allclose(hybrid, capped) + # the cap binds for the top earners, so the cap matters + assert np.any(hybrid < uncapped) + theta = np.zeros(p.J) + args = (0.05, w, n, 1.0, theta, None, j, False, "SS", e, 1e5) + assert np.allclose( + pensions.pension_amount(*args, p), + pensions.pension_amount(*args, p_db), + ) + + +def test_fdc_earn_bands_hybrid_db_fdc(): + """ + Under the hybrid DB-FDC system, FDC contributions are paid on labor + income between the two hybrid cutoffs, whatever + fdc_earn_floor_factor and pension_earn_cap, as the notional account + of the hybrid DB-NDC system is credited. + """ + p = _db_fdc_params(fdc_earn_floor_factor=[0.1, 0.1]) + assert not p.pension_earn_cap + lo, hi = pensions.fdc_earn_bands(p) + cut1, cut2 = pensions.pension_earn_caps(p) + assert np.allclose(lo, cut1) and np.allclose(hi, cut2) + assert np.allclose(lo, 0.5 * 0.8) and np.allclose(hi, 1.5 * 0.8) + e = np.ones(p.S) + n = np.linspace(0.0, 1.5, p.S) + out = pensions.fdc_lifetime(1.0, e, n, 0.04, None, 0, p) + R = out.R + expected = 0.05 * (np.clip(n[:R], 0.4, 1.2) - 0.4) + assert np.allclose(out.contrib[:R], expected) + inside = (n[:R] > 0.4) & (n[:R] < 1.2) + assert np.allclose(out.dcontrib_dn[:R], np.where(inside, 0.05, 0.0)) + # the same accounts as the FDC pillar alongside a capped DB system + # with its floor at the DB cap + p_db = _db_fdc_params( + pension_system="Defined Benefits", + pension_earn_cap=True, + fdc_earn_floor_factor=[0.5, 0.5], + ) + out_db = pensions.fdc_lifetime(1.0, e, n, 0.04, None, 0, p_db) + assert np.allclose(out.contrib, out_db.contrib) + assert np.allclose(out.benefit, out_db.benefit) + + +def test_hybrid_db_fdc_cutoff_checks(): + """ + Under the hybrid DB-FDC system the DB cap may not exceed the DC cap + for any cohort; fdc_earn_floor_factor is not checked against the DC + cap, since the system does not use it; and a zero fdc_tau warns. + """ + with pytest.raises(ValueError, match="at every age"): + Specifications().update_specifications( + { + "pension_system": "Hybrid DB-FDC", + "fdc_tau": 0.05, + "pension_regimes": [ + { + "year": 2030, + "max_age_at_start": 54, + "db_earn_cap_factor": 3.0, + } + ], + } + ) + Specifications().update_specifications( + { + "pension_system": "Hybrid DB-FDC", + "fdc_tau": 0.05, + "pension_earn_cap": True, + "dc_earn_cap_factor": [1.5], + "fdc_earn_floor_factor": [2.0], + } + ) + with pytest.warns(UserWarning, match="fdc_tau is zero"): + Specifications().update_specifications( + {"pension_system": "Hybrid DB-FDC"} + ) + + def test_fdc_tau_by_cohort(): """ A regime introducing FDC for younger cohorts: older cohorts never diff --git a/uv.lock b/uv.lock index d6e390cfd..d71c5388c 100644 --- a/uv.lock +++ b/uv.lock @@ -2027,7 +2027,7 @@ wheels = [ [[package]] name = "ogcore" -version = "0.25.1" +version = "0.25.2" source = { editable = "." } dependencies = [ { name = "dask" },