Pension Functions#

pensions.py modules

ogcore.pensions#

ogcore.pensions.earnings_band_at(x, lo, hi, period, age)[source]#

Part of labor income x (w * e * n, in model units) that lies between the cutoffs that applied to the earner’s cohort in the model period in which it was earned, min(max(x, lo), hi) - lo. With lo = 0 and hi = inf this returns x unchanged.

Parameters:
  • x (scalar or Numpy array) – labor income, w * e * n

  • lo (Numpy array) – lower cutoff by model period and age, in model units of labor income (2-D; a single column applies at every age)

  • hi (Numpy array) – upper cutoff by model period and age, as lo

  • period (int) – model period in which x was earned; periods before or after the arrays read their first or last row

  • age (int) – age (model period of life) at which x was earned

Returns:

part of x between the cutoffs

in effect at period and age

Return type:

band (scalar or Numpy array)

ogcore.pensions.pension_earn_caps(p)[source]#

The two earnings cutoffs, by model period and age, set by db_earn_cap_factor, dc_earn_cap_factor, and avg_labor_inc_t1_model_units, in model units of labor income.

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 system credits only labor income up to the second cutoff to the notional account. The cutoffs do not depend on any endogenous variable. The cutoff at period t and age s is the one that applies to the cohort of that household (the factors are cohort pension parameters that pension_regimes may change); it applies to the labor income the household earns in that period.

Parameters:

p (OG-Core Specifications object) – model parameters

Returns:

the cutoffs,

db_earn_cap_factor and dc_earn_cap_factor times avg_labor_inc_t1_model_units, as 2-D arrays by period and age ((T + S) x S once Specifications builds them; a factor set by hand as a single value or a path by period gives one column, applied at every age)

Return type:

cut1, cut2 (Numpy arrays)

ogcore.pensions.replacement_rate_vals(nssmat, wss, factor_ss, j, p)[source]#

Calculates replacement rate values for the social security system.

\[\theta_{j,R,t+R} = \frac{PIA_{j,R,t+R} \times 12}{factor \times w_{t+R}}\]
Parameters:
  • nssmat (Numpy array) – initial guess at labor supply, size = SxJ

  • new_w (scalar) – steady state real wage rate

  • factor_ss (scalar) – scaling factor converting model units to dollars

  • j (int) – index of lifetime income group

  • p (OG-Core Specifications object) – model parameters

Returns:

social security replacement rate value for

lifetime income group j

Return type:

theta (Numpy array)

ogcore.pensions.pension_amount(r, w, n, ndc_rates, theta, t, j, shift, method, e, factor, p)[source]#

Calculate public pension benefit amounts for each household.

Parameters:
  • r (array_like) – real interest rate

  • w (array_like) – real wage rate

  • n (Numpy array) – labor supply

  • ndc_rates (NDCRates) – calendar paths of the NDC credited and discount rates (ndc_rates_path), used only by the notional defined contribution system; None for the steady-state rates

  • theta (Numpy array) – social security replacement rate value for lifetime income group j

  • t (int) – time period

  • j (int) – index of lifetime income group

  • shift (bool) – whether computing for periods 0–s or 1–(s+1), =True for 1–(s+1)

  • method (str) – adjusts calculation dimensions based on ‘SS’ or ‘TPI’

  • e (Numpy array) – effective labor units

  • p (OG-Core Specifications object) – model parameters

Returns:

pension amount for each household

Return type:

pension (Numpy array)

Under the Defined Benefits and Notional Defined Contribution systems, p.pension_earn_cap True caps the labor income that earns a benefit at the first and second cutoffs of pension_earn_caps (the same cutoffs that bound the two bands of the hybrid DB-NDC system). False, the default, counts all labor income.

ogcore.pensions.SS_amount(w, n, theta, t, j, shift, method, e, p)[source]#

Calculate public pension benefit amounts for each household under a US-style social security system.

\[pension_{j,s,t} = \theta_j \times w_t \quad \forall s \geq R_{t-s}\]

where \(R_{t-s}\) is the retirement age of the cohort born in period \(t - s\), read from the (T + S) x S array p.retire.

Parameters:
  • w (array_like) – real wage rate

  • n (Numpy array) – labor supply

  • theta (array_like) – social security replacement rate before replacement_rate_adjust scaling. A length J vector when j is None; a scalar (or length 1 array) for group j when n is 1D or method is ‘TPI_scalar’

  • t (int) – time period

  • j (int) – index of lifetime income group

  • shift (bool) – whether computing for periods 0–s or 1–(s+1), =True for 1–(s+1)

  • method (str) – adjusts calculation dimensions based on ‘SS’ or ‘TPI’

  • e (Numpy array) – effective labor units

  • p (OG-Core Specifications object) – model parameters

Returns:

pension amount for each household

Return type:

pension (Numpy array)

Notes

replacement_rate_adjust is applied here, and only here, for the US-style system, so callers pass the unadjusted theta. Along the time path the factor is indexed by the year the benefit is paid and the retirement age by the household’s own cohort, so the single-cohort path agrees with the (T, S, J) array that the aggregates use. The steady state uses the final values of both.

ogcore.pensions.DB_amount(w, e, n, t, j, method, p, earn_lo=None, earn_hi=None)[source]#

Calculate public pension from a defined benefits system.

\[pension_{j,s,t} = \biggl[\frac{\sum_{u=R-ny}^{R-1}w_{t-s+u} e_{j,u,t-s+u}n_{j,u,t-s+u}}{ny}\biggr]\times Cy \times \alpha^{DB}_{j,s,t} \quad \forall s \geq R\]

where the retirement age \(R\), the averaging window \(ny\) (avg_earn_num_years), the years of contribution \(Cy\) (yr_contrib), and the replacement rate \(\alpha^{DB}\) (alpha_db) are those of the household’s own birth cohort at the age and period the benefit is paid, read from the period-by-age arrays that pension_regimes builds. With no regimes, \(R\), \(ny\), and \(Cy\) are the same for everyone and \(\alpha^{DB}_{j,t}\) varies only by lifetime income group and the calendar year of payment.

Parameters:
  • w (array_like) – real wage rate

  • e (Numpy array) – effective labor units

  • n (Numpy array) – labor supply; may be a partial lifetime path (length < S, for cohorts alive when the time path begins), a steady-state vector (S,) or matrix (S, J), or the full time path (T, S, J)

  • t (int) – model period of the first element of n (for a partial or full lifetime path) or of the first row of n (for the full time path)

  • 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

  • earn_lo (scalar, array_like, or None) – only labor income w * e * n above earn_lo enters the benefit (used by the hybrid DB-NDC system, and by pension_amount when pension_earn_cap is True). In model units of labor income, a single value, a path by model period of length T + S, or a (T + S) x S array by period and age; the cutoff at the period and age at which each income was earned applies. None (the default) for no lower cutoff.

  • earn_hi (scalar, array_like, or None) – only labor income below earn_hi enters the benefit, as for earn_lo. None (the default) for no upper cutoff.

Returns:

pension amount for each household

Return type:

DB (Numpy array)

ogcore.pensions.NDC_amount(w, e, n, r, ndc_rates, t, j, method, p, earn_lo=None, earn_hi=None)[source]#

Calculate public pension from a notional defined contribution system.

\[pension_{j,s,t} = \biggl[\sum_{u=E}^{R-1}\tau^{p}_{u,t-s+u} w_{t-s+u}e_{j,u,t-s+u}n_{j,u,t-s+u} \prod_{a=u+1}^{R}(1 + g_{NDC,t-s+a}) \biggr]\delta_{R,s,t} \quad \forall s \geq R\]

where the retirement age \(R\) and the conversion coefficient \(\delta_{R,s,t}\) (through k_ret and indR) are those of the household’s own birth cohort at the age and period the benefit is paid, and the contribution rate \(\tau^{p}_{u,t-s+u}\) is the one the cohort faced at each working age u, all read from the period-by-age arrays that pension_regimes builds. Each contribution earns the rate credited in each period from the one after the contribution through the retirement period, \(g_{NDC,t}\) (the balance is valued in the period of the first payment, as the conversion coefficient assumes), and the conversion coefficient discounts payments at the rate in the period the household retires.

Parameters:
  • w (array_like) – real wage rate

  • e (Numpy array) – effective labor units

  • n (Numpy array) – labor supply; may be a partial lifetime path (length < S, for cohorts alive when the time path begins), a steady-state vector (S,) or matrix (S, J), or the full time path (T, S, J)

  • r (array_like) – interest rate, used for the steady-state rates when ndc_rates is not given

  • ndc_rates (NDCRates) – calendar paths of the credited and discount rates from ndc_rates_path; anything else (such as None) uses the steady-state rates, with the ‘r’ options reading the last element of r

  • t (int) – model period of the first element of n (for a partial or full lifetime path) or of the first row of n (for the full time path)

  • 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

  • earn_lo (scalar, array_like, or None) – only labor income w * e * n above earn_lo enters the benefit (used by the hybrid DB-NDC system, and by pension_amount when pension_earn_cap is True). In model units of labor income, a single value, a path by model period of length T + S, or a (T + S) x S array by period and age; the cutoff at the period and age at which each income was earned applies. None (the default) for no lower cutoff.

  • earn_hi (scalar, array_like, or None) – only labor income below earn_hi enters the benefit, as for earn_lo. None (the default) for no upper cutoff.

Returns:

pension amount for each household

Return type:

NDC (Numpy array)

ogcore.pensions.hybrid_earn_cutoffs(p)[source]#

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.

Parameters:

p (OG-Core Specifications object) – model parameters

Returns:

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)

Return type:

cut1, cut2 (Numpy arrays)

Raises:

ValueError – if dc_earn_cap_factor is less than db_earn_cap_factor in any period

ogcore.pensions.DB_NDC_hybrid_amount(w, e, n, r, ndc_rates, t, j, method, p)[source]#

Calculate public pension from a hybrid defined benefit and notional defined contribution system.

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}\), where \(f_{1,t}\) and \(f_{2,t}\) are db_earn_cap_factor and dc_earn_cap_factor in period t and \(\bar{y}\) is avg_labor_inc_t1_model_units, the average labor income in the first model period in model units, taken from outside the model. The cutoffs therefore do not depend on any endogenous variable. Both factors may vary over time; the cutoffs that apply to any income are those of the period in which it was earned. Income up to \(f_{1,t} \bar{y}\) is subject to the payroll tax tau_payroll and earns a defined benefit computed with the DB_amount formula and parameters on that capped income. Income between \(f_{1,t} \bar{y}\) and \(f_{2,t} \bar{y}\) is subject to the NDC contribution rate tau_p and earns a notional defined contribution benefit computed with the NDC_amount formula and parameters. Income above \(f_{2,t} \bar{y}\) earns no benefit. The pension is the sum:

\[pension_{j,s,t} = pension^{DB}_{j,s,t}\bigl(\min\{w e n, f_1 \bar{y}\}\bigr) + pension^{NDC}_{j,s,t}\bigl(\max\{ \min\{w e n, f_2 \bar{y}\} - f_1 \bar{y}, 0\}\bigr) \quad \forall s \geq R\]

where the argument of each term is the labor income that enters that system, with the cutoffs of the period of each earning.

Parameters:
  • w (array_like) – real wage rate

  • e (Numpy array) – effective labor units

  • n (Numpy array) – labor supply; same shapes as accepted by DB_amount and NDC_amount

  • r (array_like) – interest rate, used for the steady-state NDC rates when ndc_rates is not given

  • ndc_rates (NDCRates) – calendar paths of the NDC credited and discount rates (ndc_rates_path), or None for the steady-state rates; see NDC_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 amount for each household

Return type:

pension (Numpy array)

Raises:

ValueError – if dc_earn_cap_factor is less than db_earn_cap_factor in any period

ogcore.pensions.DB_FDC_hybrid_amount(w, e, n, t, j, method, p)[source]#

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:

\[pension_{j,s,t} = pension^{DB}_{j,s,t}\bigl(\min\{w e n, f_1 \bar{y}\}\bigr) \quad \forall s \geq R\]
Parameters:
  • 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:

defined benefit pension amount for each

household

Return type:

pension (Numpy array)

Raises:

ValueError – if dc_earn_cap_factor is less than db_earn_cap_factor in any period

ogcore.pensions.PS_amount(w, e, n, j, factor, p)[source]#

Calculate public pension from a points system.

\[pension{j,s,t} = \sum_{s=E}^{R-1}w_{t}e_{j,s,t}n_{j,s,t} \times v_{t} \quad \forall s > R\]
Parameters:
  • w (array_like) – real wage rate

  • e (Numpy array) – effective labor units

  • n (Numpy array) – labor supply

  • j (int) – index of lifetime income group

  • factor (scalar) – scaling factor converting model units to dollars

  • p (OG-Core Specifications object) – model parameters

Returns:

pension amount for each household

Return type:

PS (Numpy array)

ogcore.pensions.deriv_theta(r, w, e, Y, per_rmn, factor, t, j, p)[source]#

Change in pension benefits for another unit of labor supply for pension system selected

Parameters:
  • r (array_like) – interest rate

  • w (array_like) – real wage rate

  • e (Numpy array) – effective labor units

  • Y (array_like) – GDP

  • per_rmn (int) – number of periods remaining in the model

  • factor (scalar) – scaling factor converting model units to

  • t (int) – model period

  • j (int) – index of lifetime income group

  • p (OG-Core Specifications object) – model parameters

Returns:

change in pension benefits for another

unit of labor supply

Return type:

d_theta (Numpy array)

ogcore.pensions.deriv_NDC(r, w, e, Y, per_rmn, p)[source]#

Change in NDC pension benefits for another unit of labor supply

\[\begin{split}\frac{\partial \theta_{j,u,t+u-s}}{\partial n_{j,s,t}} = \begin{cases} \tau^{p}_{t}w_{t}e_{j,s}(1+g_{NDC})^{R - s}\delta_{R}, & \text{if}\ s<R \\ 0, & \text{if}\ s \geq R \\ \end{cases}\end{split}\]
Parameters:
  • r (array_like) – interest rate

  • w (array_like) – real wage rate

  • e (Numpy array) – effective labor units

  • Y (array_like) – GDP

  • per_rmn (int) – number of periods remaining in the model

  • p (OG-Core Specifications object) – model parameters

Returns:

change in NDC pension benefits for

another unit of labor supply

Return type:

d_theta (Numpy array)

ogcore.pensions.deriv_DB(w, e, per_rmn, t, j, p)[source]#

Change in DB pension benefits for another unit of labor supply

\[\begin{split}\frac{\partial \theta_{j,u,t+u-s}}{\partial n_{j,s,t}} = \begin{cases} 0 , & \text{if}\ s < R - Cy \\ w_{t}e_{j,s}\alpha^{DB}_{j,t+R-s}\times \frac{Cy}{ny}, & \text{if}\ R - Cy <= s < R \\ 0, & \text{if}\ s \geq R \\ \end{cases}\end{split}\]

With a replacement rate that varies over time, the change in the benefit paid at each age u depends on the rate in effect at that time. This function returns a single derivative for each working age s, evaluated at the rate in effect when the household retires (period t + R - s), as an approximation.

Parameters:
  • w (array_like) – real wage rate

  • e (Numpy array) – effective labor units

  • per_rmn (int) – number of periods remaining in the model

  • t (int) – model period

  • j (int) – index of lifetime income group

  • p (OG-Core Specifications object) – model parameters

Returns:

change in DB pension benefits for another unit of labor

supply

Return type:

d_theta

ogcore.pensions.deriv_PS(w, e, per_rmn, factor, p)[source]#

Change in points system pension benefits for another unit of labor supply

\[\begin{split}\frac{\partial \theta_{j,u,t+u-s}}{\partial n_{j,s,t}} = \begin{cases} 0 , & \text{if}\ s < R \\ w_{t}e_{j,s}v_{t}, & \text{if}\ s \geq R \\ \end{cases}\end{split}\]
Parameters:
  • w (array_like) – real wage rate

  • e (Numpy array) – effective labor units

  • per_rmn (int) – number of periods remaining in the model

  • factor (scalar) – scaling factor converting model units to

  • p (OG-Core Specifications object) – model parameters

Returns:

change in points system pension benefits

for another unit of labor supply

Return type:

d_theta (Numpy array)

ogcore.pensions.delta_point(r, Y, g_n, g_y, p)[source]#

Compute growth rate used for contributions to points system pension

Parameters:
  • r (array_like) – interest rate

  • Y (array_like) – GDP

  • g_n (array_like) – population growth rate

  • g_y (array_like) – GDP growth rate

  • p (OG-Core Specifications object) – model parameters

Returns:

growth rate used for contributions to

points

Return type:

delta_point (Numpy array)

class ogcore.pensions.NDCRates(credit, discount)[source]#

Calendar paths of the rates used in a notional defined contribution system, built by ndc_rates_path.

Both fields are length T + S on the time path, or length 1 for a steady state. Periods before the path read the first element and periods after it the last.

Parameters:
  • credit (ndarray)

  • discount (ndarray)

credit: ndarray#

rate credited to notional balances in each model period, the growth realized from the previous period (after any averaging set by ndc_growth_avg_years)

Type:

Numpy array

discount: ndarray#

rate used to discount payments in the conversion coefficient of a household retiring in each model period

Type:

Numpy array

ogcore.pensions.growth_rate_path(choice, r, Y, w, L, p, method, exog=None)[source]#

Calendar path of an NDC growth rate.

Element t is the growth realized from period t - 1 to period t, in real, non-stationarized terms. Stationarized aggregates are divided by \(e^{g_y t}\) and by population, and p.g_n[t] is population growth from t to t + 1, so for an aggregate X

\[g_{t} = \frac{\hat{X}_{t}}{\hat{X}_{t-1}}e^{g_y} (1 + g_{n,t-1}) - 1\]

where X is GDP for ‘Curr GDP’ and the wage bill wL for ‘wage bill’. ‘avg wage’ is the growth of earnings per person, the same expression without population growth. ‘r’ is the interest rate path and ‘LR GDP’ the constant steady-state growth of GDP. ‘exogenous’ is the user-specified path exog, not tied to any variable in the model. Growth into period 0 uses the period-0 level as the level of the period before.

Parameters:
  • choice (str) – one of NDC_GROWTH_CHOICES

  • r (array_like) – interest rate path

  • Y (array_like) – GDP path, used for ‘Curr GDP’

  • w (array_like) – real wage path, used for ‘wage bill’ and ‘avg wage’

  • L (array_like) – aggregate labor path, used for ‘wage bill’ and ‘avg wage’

  • p (OG-Core Specifications object) – model parameters

  • method (str) – ‘SS’ for the steady-state value or ‘TPI’ for the time path

  • exog (array_like or None) – model-period rate path used when choice is ‘exogenous’ (p.ndc_growth_rate_exog or p.dir_growth_rate_exog)

Returns:

length 1 in the steady state, else T + S

Return type:

rate (Numpy array)

ogcore.pensions.ndc_rates_path(r, Y, w, L, p, method)[source]#

Credited return and annuity discount rate paths for an NDC system.

The credited return is ndc_growth_rate averaged over the ndc_growth_avg_years years up to and including each period (periods before the path take the period-0 rate). The discount rate is dir_growth_rate; a household’s conversion coefficient uses its value in the period the household retires.

Parameters:
  • r (array_like) – interest rate path (scalar in the steady state)

  • Y (array_like) – GDP path

  • w (array_like) – real wage path

  • L (array_like) – aggregate labor path

  • p (OG-Core Specifications object) – model parameters

  • method (str) – ‘SS’ or ‘TPI’

Returns:

credit and discount rate paths

Return type:

rates (NDCRates)

ogcore.pensions.g_ndc(r, Y, p)[source]#

Steady-state growth rate credited to NDC balances.

Parameters:
  • r (array_like) – interest rate; its last element is used

  • Y (array_like) – GDP (unused: GDP growth in the steady state follows from g_y and g_n)

  • p (OG-Core Specifications object) – model parameters

Returns:

growth rate credited to NDC balances

Return type:

g_ndc (scalar)

ogcore.pensions.g_dir(r, Y, p)[source]#

Steady-state rate used to discount payments in the NDC conversion coefficient.

Parameters:
  • r (array_like) – interest rate; its last element is used

  • Y (array_like) – GDP (unused: GDP growth in the steady state follows from g_y and g_n)

  • p (OG-Core Specifications object) – model parameters

Returns:

discount rate in the conversion coefficient

Return type:

g_dir (scalar)

ogcore.pensions.annuity_mort_rates(p)[source]#

Mortality rates by period and age used to annuitize NDC balances.

These are the model’s mortality rates rho, averaged over lifetime income groups with their population weights lambdas, so that a single conversion coefficient applies to every income group. A mort_rates_SS attribute set on p by hand (a vector by age) overrides rho and is used in every period.

Parameters:

p (OG-Core Specifications object) – model parameters

Returns:

(T + S) x S mortality rates, where

row t, column s is the probability that a household of age s in period t dies before period t + 1

Return type:

mort_rates (Numpy array)

ogcore.pensions.delta_ret(r, Y, p, S_ret=None, indR=None, k_ret=None, t_ret=None, g_dir_path=None)[source]#

Compute conversion coefficient for the NDC pension amount

\[\delta_{R} = (dir_{R} + ind_{R} - k)^{-1}\]

The mortality rates entering \(dir_{R}\) are set by the parameter ndc_mortality:

  • ‘steady state’: the steady-state mortality rates, for every cohort

  • ‘period’: the mortality rates by age in the period in which the household retires (a period life table)

  • ‘cohort’: the mortality rates the household’s own birth cohort faces at each age after retirement (a projected cohort life table), the rates that also enter the household’s problem

Payments are discounted at dir_growth_rate. Given a calendar path of that rate (g_dir_path), each household uses its value in the period it retires, held fixed over the payments; otherwise the steady-state rate is used.

Parameters:
  • r (array_like) – interest rate

  • Y (array_like) – GDP

  • p (OG-Core Specifications object) – model parameters

  • S_ret (array_like) – model period of retirement; any shape, or None for the steady-state value (the final row of retire)

  • indR (array_like) – survivor benefit adjustment, broadcastable against S_ret, or None for the steady-state value

  • k_ret (array_like) – payment frequency adjustment, broadcastable against S_ret, or None for the steady-state value

  • t_ret (array_like) – model period in which the household reaches age S_ret, broadcastable against S_ret; may lie before 0 or after T + S - 1, in which case the first or last row of the mortality rates is used. None for the steady state.

  • g_dir_path (array_like) – calendar path of the discount rate (NDCRates.discount), read at t_ret (clipped to the path); None to use the steady-state rate

Returns:

conversion coefficient for

the NDC pension amount, shaped like S_ret

Return type:

delta_ret (scalar or Numpy array)

ogcore.pensions.deriv_DB_loop(w, e, S, S_ret, per_rmn, avg_earn_num_years, alpha_db, yr_contr)[source]#

Change in DB pension benefits for another unit of labor supply

Parameters:
  • w (array_like) – real wage rate

  • e (Numpy array) – effective labor units

  • S (int) – number of periods in the model

  • S_ret (int) – retirement age

  • per_rmn (int) – number of periods remaining in the model

  • avg_earn_num_years (int) – number of years AIME is computed from

  • alpha_db (Numpy array) – replacement rate for each of the per_rmn remaining periods

  • yr_contr (scalar) – years of contribution

Returns:

change in DB pension benefits for

another unit of labor supply

Return type:

d_theta (Numpy array)

ogcore.pensions.deriv_PS_loop(w, e, S, S_ret, per_rmn, d_theta, vpoint, factor)[source]#

Change in points system pension benefits for another unit of labor supply

Parameters:
  • w (array_like) – real wage rate

  • e (Numpy array) – effective labor units

  • S (int) – number of periods in the model

  • S_ret (int) – retirement age

  • per_rmn (int) – number of periods remaining in the model

  • d_theta (Numpy array) – change in points system pension benefits for another unit of labor supply

  • vpoint (scalar) – value of points

  • factor (scalar) – scaling factor converting model units to local currency

Returns:

change in points system pension benefits

for another unit of labor supply

Return type:

d_theta (Numpy array)

ogcore.pensions.deriv_NDC_loop(w, e, per_rmn, S, S_ret, tau_p, g_ndc_value, delta_ret_value, d_theta)[source]#

Change in NDC pension benefits for another unit of labor supply

The benefit rises with labor supply at working age s by

\[\tau^{p}w_{s}e_{s}(1 + g_{NDC})^{R - s}\delta_{R}\]

since a contribution at age s is credited in each period from s + 1 through the retirement period R.

Parameters:
  • w (array_like) – real wage rate

  • e (Numpy array) – effective labor units

  • per_rmn (int) – number of periods remaining in the model

  • S (int) – number of periods in the model

  • S_ret (int) – retirement age

  • tau_p (scalar) – tax rate

  • g_ndc_value (scalar) – growth rate of NDC pension

  • delta_ret_value (scalar) – conversion coefficient for the NDC pension amount

  • d_theta (Numpy array) – change in NDC pension benefits for another unit of labor supply

Returns:

change in NDC pension benefits for

another unit of labor supply

Return type:

d_theta (Numpy array)

ogcore.pensions.delta_ret_loop(S, S_ret, surv_rates, g_dir_value)[source]#

Compute the annuity factor in the NDC conversion coefficient

\[dir_{R} = \sum_{k=0}^{S-R-1}\left[\prod_{i=0}^{k-1} (1 - \hat{\rho}_{R+i})\right](1 + g_{dir})^{-k}\]

The pension is paid at ages R, …, S - 1. Following the household mortality convention, 1 - rho[s] is the probability of surviving from age s to age s + 1, so the payment at age R + k is received with probability prod_{i=0}^{k-1} (1 - rho[R + i]) by a household alive at retirement age R.

Parameters:
  • S (int) – number of periods in the model

  • S_ret (int) – retirement age

  • surv_rates (Numpy array) – length S survival rates by age, 1 - rho

  • g_dir_value (scalar) – discount rate used in the conversion coefficient

Returns:

expected discounted number of pension

payments per unit of annual benefit

Return type:

dir_delta (scalar)

ogcore.pensions.PS_1dim_loop(w, e, n, S_ret, S, g_y, vpoint, factor, L_inc_avg_s, PS)[source]#

Calculate public pension from a points system.

Parameters:
  • w (array_like) – real wage rate

  • e (Numpy array) – effective labor units

  • n (Numpy array) – labor supply

  • S_ret (int) – retirement age

  • S (int) – number of periods in the model

  • g_y (array_like) – GDP growth rate

  • vpoint (scalar) – value of points

  • factor (scalar) – scaling factor converting model units to local currency

  • L_inc_avg_s (Numpy array) – average labor income

  • PS (Numpy array) – pension amount for each household

Returns:

pension amount for each household

Return type:

PS (Numpy array)

ogcore.pensions.PS_2dim_loop(w, e, n, S_ret, S, J, g_y, vpoint, factor, L_inc_avg_sj, PS)[source]#

Calculate public pension from a points system.

Parameters:
  • w (array_like) – real wage rate

  • e (Numpy array) – effective labor units

  • n (Numpy array) – labor supply

  • S_ret (int) – retirement age

  • S (int) – number of periods in the model

  • J (int) – number of lifetime income groups

  • g_y (array_like) – GDP growth rate

  • vpoint (scalar) – value of points

  • factor (scalar) – scaling factor converting model units to local currency

  • L_inc_avg_sj (Numpy array) – average labor income

  • PS (Numpy array) – pension amount for each household

Returns:

pension amount for each household

Return type:

PS (Numpy array)

ogcore.pensions.DB_1dim_loop(w, e, n, S_ret, S, g_y, DB, avg_earn_num_years, alpha_db, yr_contr, earn_lo=None, earn_hi=None, t_birth=0)[source]#

Calculate public pension from a defined benefits system for one household over its lifetime.

Parameters:
  • w (array_like) – real wage rate at each age, length S

  • e (Numpy array) – effective labor units at each age, length S

  • n (Numpy array) – labor supply at each age, length S

  • S_ret (Numpy array) – retirement period that applies to the household at each age u, length S

  • S (int) – number of periods in the model

  • g_y (array_like) – GDP growth rate

  • DB (Numpy array) – pension amount for each household (filled in and returned), length S

  • avg_earn_num_years (Numpy array) – number of periods earnings are averaged over, by age u, length S

  • alpha_db (Numpy array) – replacement rate in effect at each age u, length S

  • yr_contr (Numpy array) – periods of contribution credited, by age u, length S

  • earn_lo (Numpy array) – lower cutoff, by model period and age, of the earnings band, in model units of labor income; only labor income w * e * n above it counts. None (the default) applies no band.

  • earn_hi (Numpy array) – upper cutoff, by model period and age, of the earnings band; only labor income below it counts

  • t_birth (int) – model period in which the household is age 0, so earnings at age s were made in period t_birth + s

Returns:

pension amount for each household

Return type:

DB (Numpy array)

ogcore.pensions.DB_2dim_loop(w, e, n, S_ret, S, g_y, DB, avg_earn_num_years, alpha_db, yr_contr, earn_lo=None, earn_hi=None, t_cross=0)[source]#

Calculate public pension from a defined benefits system for a cross section of S x J households in one period.

Parameters:
  • w (array_like) – real wage rate, length S

  • e (Numpy array) – effective labor units, size S x J

  • n (Numpy array) – labor supply, size S x J

  • S_ret (Numpy array) – retirement period of the household of each age u, length S

  • S (int) – number of periods in the model

  • g_y (array_like) – GDP growth rate

  • DB (Numpy array) – pension amount for each household (filled in and returned), size S x J

  • avg_earn_num_years (Numpy array) – number of periods earnings are averaged over, by age u, length S

  • alpha_db (Numpy array) – replacement rate in effect at each age u for each group j, size S x J

  • yr_contr (Numpy array) – periods of contribution credited, by age u, length S

  • earn_lo (Numpy array) – lower cutoff, by model period and age, of the earnings band, in model units of labor income; only labor income w * e * n above it counts. None (the default) applies no band.

  • earn_hi (Numpy array) – upper cutoff, by model period and age, of the earnings band; only labor income below it counts

  • t_cross (int) – model period of the cross section; the household of age u earned at age s in period t_cross - u + s

Returns:

pension amount for each household

Return type:

DB (Numpy array)

ogcore.pensions.DB_3dim_loop(w_path, e_ss, n, n_preTP, S_ret, S, J, g_y, avg_earn_num_years, alpha_db, yr_contr, earn_lo=None, earn_hi=None)[source]#

Calculate public pension from a defined benefits system over the full time path.

Used when the TPI solution evaluates taxes for all periods at once to compute aggregates. Each retiree’s benefit is computed from their own cohort’s wage and labor history: the wage entering the average for a household aged u at time t, earned at age s, is the wage at time t - (u - s). Histories that predate the time path use the period-0 wage (trend growth is handled by the de-trending in the benefit formula) and the model’s initial labor supply, so this reproduces exactly what the per-cohort household solves compute and household behavior and aggregates are consistent. The pension parameters are read at (t, u), the cell of the period-by-age arrays that belongs to the retiree’s own cohort. The inner work is vectorized rather than looped.

Parameters:
  • w_path (Numpy array) – real wage rate path, length T

  • e_ss (Numpy array) – effective labor units, size SxJ

  • n (Numpy array) – labor supply, size TxSxJ

  • n_preTP (Numpy array) – pre-time-path labor supply, size SxJ

  • S_ret (Numpy array) – retirement period by period and age, size T x S

  • S (int) – number of periods in the model

  • J (int) – number of lifetime income groups

  • g_y (scalar) – growth rate of technology

  • avg_earn_num_years (Numpy array) – number of periods earnings are averaged over, by period and age, size T x S

  • alpha_db (Numpy array) – replacement rate per year of contribution by period, age, and group, size T x S x J

  • yr_contr (Numpy array) – periods of contribution credited, by period and age, size T x S

  • earn_lo (Numpy array) – lower cutoff, by model period and age, of the earnings band, in model units of labor income; only labor income w * e * n above it counts. None (the default) applies no band.

  • earn_hi (Numpy array) – upper cutoff, by model period and age, of the earnings band; only labor income below it counts Both arrays start in the period of the first row of n.

Returns:

pension amount for each household, size TxSxJ

Return type:

DB (Numpy array)

ogcore.pensions.NDC_1dim_loop(w, e, n, S_ret, S, g_y, tau_p, g_ndc, t_birth, delta_ret, NDC, earn_lo=None, earn_hi=None)[source]#

Calculate public pension from a notional defined contribution system for one household over its lifetime.

The contribution made at working age s earns the rate credited in each later period through the retirement period R, in which the first benefit is paid:

\[\prod_{a=s+1}^{R}(1 + g_{NDC,t_0 + a})\]

where \(t_0\) is the household’s period of birth (age 0).

Parameters:
  • w (array_like) – real wage rate at each age, length S

  • e (Numpy array) – effective labor units at each age, length S

  • n (Numpy array) – labor supply at each age, length S

  • S_ret (Numpy array) – retirement period that applies to the household at each age u, length S

  • S (int) – number of periods in the model

  • g_y (array_like) – GDP growth rate

  • tau_p (Numpy array) – contribution rate the household faced at each working age s, length S

  • g_ndc (Numpy array) – calendar path of the credited rate (NDCRates.credit), a 1-D float array; periods outside it read the first or last element

  • t_birth (int) – model period in which the household is age 0

  • delta_ret (Numpy array) – conversion coefficient for the NDC pension amount that applies at each age u, length S

  • NDC (Numpy array) – pension amount for each household (filled in and returned), length S

  • earn_lo (Numpy array) – lower cutoff, by model period and age, of the earnings band, in model units of labor income; only labor income w * e * n above it counts. None (the default) applies no band.

  • earn_hi (Numpy array) – upper cutoff, by model period and age, of the earnings band; only labor income below it counts The cutoffs are read at period t_birth + s and age s.

Returns:

pension amount for each household

Return type:

NDC (Numpy array)

ogcore.pensions.NDC_2dim_loop(w, e, n, S_ret, S, g_y, tau_p, g_ndc, t_cross, delta_ret, NDC, earn_lo=None, earn_hi=None)[source]#

Calculate public pension from a notional defined contribution system for a cross section of S x J households in one period.

As in NDC_1dim_loop, contributions compound at the rates credited in the periods the household lived through: the household of age u in period t_cross was age s in period t_cross - u + s.

Parameters:
  • w (array_like) – real wage rate, length S

  • e (Numpy array) – effective labor units, size S x J

  • n (Numpy array) – labor supply, size S x J

  • S_ret (Numpy array) – retirement period of the household of each age u, length S

  • S (int) – number of periods in the model

  • g_y (array_like) – GDP growth rate

  • tau_p (Numpy array) – contribution rate of the household of each age s, length S

  • g_ndc (Numpy array) – calendar path of the credited rate

  • t_cross (int) – model period of the cross section

  • delta_ret (Numpy array) – conversion coefficient for the NDC pension amount of the household of each age u, length S

  • NDC (Numpy array) – pension amount for each household (filled in and returned), size S x J

  • earn_lo (Numpy array) – lower cutoff, by model period and age, of the earnings band, in model units of labor income; only labor income w * e * n above it counts. None (the default) applies no band.

  • earn_hi (Numpy array) – upper cutoff, by model period and age, of the earnings band; only labor income below it counts The cutoffs are read at period t_cross - u + s and age s.

Returns:

pension amount for each household

Return type:

NDC (Numpy array)

class ogcore.pensions.FDCLifetime(contrib, balance, benefit, holdings, dcontrib_dn, benefit_per_contrib, R)[source]#

A household’s funded defined contribution account over its life, returned by fdc_lifetime. Every field except R is a length S array by age; entries before the first age computed are zero.

Parameters:
  • contrib (ndarray)

  • balance (ndarray)

  • benefit (ndarray)

  • holdings (ndarray)

  • dcontrib_dn (ndarray)

  • benefit_per_contrib (ndarray)

  • R (int)

contrib: ndarray#

contribution paid at each age, out of that period’s resources (zero from the retirement age on)

Type:

Numpy array

balance: ndarray#

account balance at the start of each age, after the return credited in that period and before that period’s contribution or benefit

Type:

Numpy array

benefit: ndarray#

annuity benefit received at each age (zero before the retirement age)

Type:

Numpy array

holdings: ndarray#

end-of-period holdings at each age, the balance plus the contribution before retirement and the balance less the benefit after; these are the fund’s assets

Type:

Numpy array

dcontrib_dn: ndarray#

derivative of the contribution with respect to labor supply n at each age

Type:

Numpy array

benefit_per_contrib: ndarray#

benefit at the retirement age per unit of contribution made at each earlier age; the benefit at a later age u is that times e^{-g_y (u - R)}

Type:

Numpy array

R: int#

age at which the balance is annuitized (S if the household does not reach retirement within its life)

Type:

int

ogcore.pensions.fdc_earn_bands(p)[source]#

Lower and upper cutoffs, by model period and age, of the labor income on which funded defined contribution (FDC) contributions are paid, in model units of labor income.

The lower cutoff is fdc_earn_floor_factor times 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. 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.

Parameters:

p (OG-Core Specifications object) – model parameters

Returns:

the cutoffs as 2-D arrays by period and

age ((T + S) x S once Specifications builds them; a factor set by hand as a single value or a path by period gives one column, applied at every age)

Return type:

lo, hi (Numpy arrays)

ogcore.pensions.fdc_mort_rates(p, j)[source]#

Mortality rates by period and age that price the FDC annuity of lifetime income group j.

The annuity is priced on the mortality of the household’s own income group, so that the annuity pool of each group pays out exactly what it holds when mortality differs across groups.

Parameters:
  • p (OG-Core Specifications object) – model parameters

  • j (int) – lifetime income group, or None for the average over groups weighted by lambdas

Returns:

(T + S) x S mortality rates, where

row t, column s is the probability that a household of age s in period t dies before period t + 1

Return type:

mort_rates (Numpy array)

ogcore.pensions.fdc_annuity_factor_loop(S, a, rho, r)[source]#

Price, at age a, of an annuity-due paying one unit of real income at each age from a to S - 1 while the household lives:

\[\ddot{a}_{a} = 1 + \frac{1 - \rho_{a}}{1 + r_{fdc,a+1}} \ddot{a}_{a+1}, \quad \ddot{a}_{S-1} = 1\]

The benefit is fixed in real terms, which in detrended model units is a benefit that falls by e^{-g_y} each period while the balance behind it is also detrended by e^{-g_y}, so trend growth does not enter the price.

Parameters:
  • S (int) – number of periods of life

  • a (int) – age at which the annuity is bought

  • rho (Numpy array) – mortality rate at each age of the household’s life, length S

  • r (Numpy array) – FDC return r_fdc = r_p - r_fdc_wedge credited at each age of the household’s life (r[s] is earned on holdings carried from age s - 1 to age s), length S

Returns:

annuity factor

Return type:

ann (scalar)

ogcore.pensions.fdc_lifetime_loop(y, tau, lo, hi, r, rho, R, g_y, a0, A0, S)[source]#

Funded defined contribution account of one household from age a0 to the end of life, in detrended model units.

Before the retirement age R the household contributes \(C_s = \tau_s(\min(\max(y_s, lo_s), hi_s) - lo_s)\) out of period resources, and its end-of-period holdings \(H_s = A_s + C_s\) earn the next period’s return:

\[A_{s+1} = (1 + r_{fdc,s+1})e^{-g_y}H_s\]

The account therefore earns the return in every period from the period after each contribution through the retirement period R itself, the same window over which the notional defined contribution system credits. At age \(\max(R, a_0)\) the balance buys an annuity, \(P = A/\ddot{a}\); a household already retired at a0 holds a remaining balance that is re-annuitized on the rates given. After that \(H_s = A_s - P_s\), \(P_{s+1} = P_s e^{-g_y}\), and the holdings of those who die stay in the annuity pool:

\[A_{s+1} = \frac{(1 + r_{fdc,s+1})e^{-g_y}}{1 - \rho_s}H_s\]
Parameters:
  • y (Numpy array) – labor income w * e * n at each age, length S

  • tau (Numpy array) – contribution rate at each age, length S

  • lo (Numpy array) – lower cutoff of the earnings band at each age

  • hi (Numpy array) – upper cutoff of the earnings band at each age

  • r (Numpy array) – FDC return r_fdc = r_p - r_fdc_wedge credited at each age (on holdings carried in from the previous age), length S

  • rho (Numpy array) – mortality rate at each age, length S

  • R (int) – retirement age (S for none within the household’s life)

  • g_y (scalar) – growth rate of labor augmenting technology

  • a0 (int) – first age computed

  • A0 (scalar) – balance at the start of age a0

  • S (int) – number of periods of life

Returns:

length S arrays by age

  • C (Numpy array): contribution

  • A (Numpy array): balance at the start of the period

  • P (Numpy array): annuity benefit

  • H (Numpy array): end-of-period holdings

  • dC (Numpy array): derivative of C with respect to y

  • m (Numpy array): benefit at age R per unit of contribution at each age before R

Return type:

(tuple)

ogcore.pensions.fdc_lifetime(w, e, n, r_p, t_birth, j, p, a0=0, A0=0.0, by_age=False)[source]#

Funded defined contribution account of one household over its lifetime: contributions, balances, annuity benefits, end-of-period holdings, and the derivatives the household’s labor decision needs.

The household is born (age 0) in model period t_birth and lives age s in period t_birth + s. Calendar inputs (the wage, the return, and the parameters) are read in the period each age is lived; periods before or after the time path read its first or last element. With t_birth None every calendar input reads its last element, which gives the steady state.

The contribution rate fdc_tau and the retirement age are the household’s own cohort values (from pension_regimes), the earnings band cutoffs are those the cohort faces in the period the income is earned, and the annuity is priced on the mortality of income group j along the cohort’s life and on the path of the FDC return the household foresees. The account earns the FDC return r_fdc = r_p - r_fdc_wedge at each age, where r_fdc_wedge is the value the household’s cohort faces in the period that age is lived.

Parameters:
  • w (scalar or array_like) – wage, a single value or a calendar path by model period

  • e (Numpy array) – effective labor units at each age, length S

  • n (Numpy array) – labor supply at each age, length S; ages before a0 are ignored

  • r_p (scalar or array_like) – household portfolio return, a single value or a calendar path by model period; the element for period t is the return earned in t on holdings carried from t - 1; the account earns this less r_fdc_wedge

  • t_birth (int or None) – model period in which the household is age 0, None for the steady state

  • j (int or None) – lifetime income group, which sets the mortality rates that price the annuity (None for the lambda-weighted average)

  • p (OG-Core Specifications object) – model parameters

  • a0 (int) – first age computed, for a household already alive when the time path begins

  • A0 (scalar) – account balance at the start of age a0; a household already retired at a0 annuitizes this remaining balance on the rates given

  • by_age (bool) – if True, w and r_p are length S arrays already indexed by the household’s age (entries before a0 are ignored) rather than calendar paths; the parameters are still read in the periods given by t_birth

Returns:

the account by age

Return type:

FDCLifetime

ogcore.pensions.fdc_ss(r_p, w, e, n, p)[source]#

Steady-state funded defined contribution accounts of every lifetime income group.

Parameters:
  • r_p (scalar) – steady-state household portfolio return; the accounts earn r_fdc = r_p - r_fdc_wedge

  • w (scalar) – steady-state wage

  • e (Numpy array) – effective labor units, S x J

  • n (Numpy array) – labor supply, S x J

  • p (OG-Core Specifications object) – model parameters

Returns:

each array field S x J, and R the steady-state

retirement age

Return type:

FDCLifetime

ogcore.pensions.fdc_holdings(fdc)[source]#

End-of-period holdings of funded defined contribution accounts, the fund’s assets, by age (and group).

Parameters:

fdc (FDCLifetime or None) – the accounts, None when the pillar is off

Returns:

holdings, or 0.0 when the

pillar is off

Return type:

H (Numpy array or scalar)

ogcore.pensions.fdc_wedge_path(p)[source]#

Wedge r_fdc_wedge between the portfolio return r_p and the FDC return r_fdc by model period and age: element [t, s] is the wedge on the return earned in period t at age s, by the household of that age’s cohort. fdc_lifetime reads a cohort’s values down the diagonal; periods after the array read its last row, the steady state.

Parameters:

p (OG-Core Specifications object) – model parameters

Returns:

wedge by period and age, (T + S) x S (a

single row of zeros if the parameter is absent)

Return type:

wedge (Numpy array)

ogcore.pensions.fdc_wedge_ss(p)[source]#

Steady-state wedge r_fdc_wedge between the portfolio return r_p and the FDC return r_fdc at each age, the value fdc_lifetime uses for a household with t_birth None (the last row of fdc_wedge_path).

Parameters:

p (OG-Core Specifications object) – model parameters

Returns:

wedge at each age, length S (zeros if the

parameter is absent)

Return type:

wedge (Numpy array)

ogcore.pensions.fdc_bequeathable(fdc, r_p, p)[source]#

End-of-period holdings that go to bequests if the household dies before the next period: the account holdings at ages before the retirement age. After retirement the holdings of those who die stay in the annuity pool.

The account of a member who dies is credited the FDC return r_fdc = r_p - r_fdc_wedge, like the account of a survivor, and the fund keeps the spread. Because aggregates.get_BQ multiplies the savings it is given by (1 + r_p), the holdings are scaled here by (1 + r_fdc) / (1 + r_p), with r_fdc the return at the next age. They are also returned in the next period’s detrended units, e^{-g_y} times the holdings, the units of the private savings b_{s+1} they are added to.

Parameters:
  • fdc (FDCLifetime or None) – the accounts, None when the pillar is off

  • r_p (scalar) – steady-state household portfolio return

  • p (OG-Core Specifications object) – model parameters

Returns:

holdings at ages before

the retirement age and zero after, in next-period units, or 0.0 when the pillar is off

Return type:

H_bq (Numpy array or scalar)

ogcore.pensions.fdc_bequeathable_tpi(bq, r_p, p)[source]#

Time-path counterpart of fdc_bequeathable: scales the funded defined contribution holdings bequeathed in each period so that the accounts of members who die are credited the FDC return r_fdc = r_p - r_fdc_wedge, like those of survivors, and the fund keeps the spread. aggregates.get_BQ multiplies the holdings it is given for period t by (1 + r_{p,t}), so the holdings carried out of age s are scaled by (1 + r_{p,t} - w_{t,s+1}) / (1 + r_{p,t}), with w_{t,s+1} the wedge on the return of age s + 1 in period t.

Parameters:
  • bq (Numpy array) – holdings bequeathed in periods 0 to T - 1, T x S x J, in each period’s units (row 0 from p.fdc_bequeathable_preTP and the rest from FDCPath.bequeathable)

  • r_p (Numpy array) – household portfolio return in periods 0 to T - 1

  • p (OG-Core Specifications object) – model parameters

Returns:

the scaled holdings, T x S x J

Return type:

bq_fdc (Numpy array)

ogcore.pensions.fdc_survivor_claims(fdc, rho, p)[source]#

Funded defined contribution holdings per survivor, carried into the next period before its return: the end-of-period holdings before the retirement age, and the holdings divided by the survival rate after it, when the holdings of those who die are shared among the survivors of the annuity pool.

Immigrants are taken to arrive with the same assets as the natives of their age, so this is what an immigrant brings into the fund (the counterpart of the private savings b that get_B credits to immigrants). Like b_{s+1}, the claims are in the next period’s detrended units, e^{-g_y} times the holdings.

Parameters:
  • fdc (FDCLifetime or None) – the accounts, None when the pillar is off

  • rho (Numpy array) – mortality rates, shaped like the holdings

  • p (OG-Core Specifications object) – model parameters

Returns:

holdings per survivor in

next-period units, or 0.0 when the pillar is off

Return type:

H_claims (Numpy array or scalar)

class ogcore.pensions.FDCPath(contrib, benefit, holdings, claims, bequeathable)[source]#

Funded defined contribution accounts of every household along the time path, returned by fdc_tpi. Every field is a T x S x J array indexed by model period, age, and lifetime income group.

Parameters:
  • contrib (ndarray)

  • benefit (ndarray)

  • holdings (ndarray)

  • claims (ndarray)

  • bequeathable (ndarray)

contrib: ndarray#

contribution paid

Type:

Numpy array

benefit: ndarray#

annuity benefit received

Type:

Numpy array

holdings: ndarray#

end-of-period holdings, in the period’s units

Type:

Numpy array

claims: ndarray#

holdings per survivor carried into the next period, in the next period’s units (fdc_survivor_claims)

Type:

Numpy array

bequeathable: ndarray#

holdings bequeathed if the household dies before the next period, in the next period’s units, before fdc_bequeathable_tpi credits them the FDC return

Type:

Numpy array

ogcore.pensions.fdc_initial_holdings(ss, p)[source]#

Funded defined contribution holdings of the households alive when the time path begins, from the baseline steady state, in the units of the first model period.

The steady-state end-of-period holdings by age are scaled by scale (the same population adjustment applied to initial private savings) and carried into period 0 with the mortality rates of the period before the time path (rho_preTP).

Parameters:
  • ss (dict) – baseline steady-state output; the holdings are zero if it has no FDC output (the pillar off, or output saved before the pillar existed)

  • p (OG-Core Specifications object) – model parameters

Returns:

S x J arrays

  • holdings (Numpy array): end-of-period holdings in the period before the time path, in that period’s units

  • claims (Numpy array): holdings per survivor carried into period 0, in period-0 units

  • bequeathable (Numpy array): holdings bequeathed in period 0 by those who die before it, in period-0 units

Return type:

(tuple)

ogcore.pensions.fdc_tpi(r_p, w, n_mat, p)[source]#

Funded defined contribution accounts of every household along the time path, cohort by cohort.

Each cohort’s account is computed with fdc_lifetime along its diagonal of n_mat, from the r_p and wage paths it foresees. Households alive when the path begins start from the claims of their age in p.fdc_claims_preTP (set by TPI.get_initial_SS_values), credited with the period-0 FDC return r_fdc = r_p - r_fdc_wedge; those already retired re-annuitize those balances on the path.

Parameters:
  • r_p (Numpy array) – household portfolio return, length T + S

  • w (Numpy array) – wage, length T + S

  • n_mat (Numpy array) – labor supply, (T + S) x S x J

  • p (OG-Core Specifications object) – model parameters

Returns:

the accounts by period, age, and income group

Return type:

FDCPath