Skip to content

Releases: PSLmodels/OG-Core

0.18.0

Choose a tag to compare

@rickecon rickecon released this 22 Jul 14:39
b0986ac

This release:

  • Demographic parameters (rho, omega, imm_rates) are now allowed to vary across lifetime income groups J. See PR #1165 #1165.

0.17.0

Choose a tag to compare

@jdebacker jdebacker released this 16 Jul 20:53
d907c8e

This release enables new pension systems and makes the following bug fixes:

  • Fixes the Defined Benefits and Points System pension paths so they run
    against a real Specifications object (Issues #1014 and #1075):
    p.retire (an array since PR #433) was passed as the scalar S_ret
    into the numba loops, the scalar p.g_y was indexed as an array inside
    the loops, the scalar steady-state wage was indexed as a path, and the
    time-varying 3-D e matrix (PR #895) was sliced as 2-D. The systems
    use the steady-state retirement age and earnings profile for now; full
    time variation remains open in Issue #1014. The same coercions are
    applied to the NDC path, but the NDC system additionally requires
    growth-rate settings (ndc_growth_rate, dir_growth_rate) that are
    not yet parameters in default_parameters.json, so it still cannot
    run against a real Specifications object (see Issue #1169).
  • Wires the pre-time-path inputs the DB/NDC/PS benefit formulas need
    into the TPI: labor supplied before the time path begins comes from
    the model's initial condition (the same baseline object that
    initializes wealth), and pre-time-path wages are anchored to the
    period-0 wage of the current path. Adds the full time-path (T x S x J)
    evaluation of Defined Benefits amounts (DB_3dim_loop) used when the
    TPI computes aggregate revenues, built from each cohort's own wage and
    labor history so aggregates are consistent with household behavior.
    With these changes a country model using the Defined Benefits system
    solves both the steady state and the transition path.
  • Adds regression tests that call pension_amount with a real
    Specifications object per pension system (the existing tests
    pre-scalarized the inputs and so never exercised the real interface)
    and a local-marked steady-state solve test with the Defined Benefits
    system. See PR #1167.
  • Fixes the tax-liability revenue calculation using the first year's tax
    noncompliance and filer rates for every period, even when those rates
    are set to vary over time (Issue #1168): households responded to the
    changing rates while government revenue, the budget, and debt stayed on
    the first-year values. income_tax_liab now slices the rates over the
    transition path. See PR #1174.
  • Fixes the steady-state etr_ss and mtry_ss diagnostics using the
    labor-income tax noncompliance rate in place of the capital-income rate
    (capital_noncompliance_rate_2D in SS.py, Issue #1170). This affects
    only the post-solve SS diagnostics -- the solution itself already used
    the correct rates -- and is a no-op when the two rates are equal (the
    default). See PR #1171.
  • Fixes alpha_FA (direct foreign aid, added in 0.16.0) not being
    extended over the model time path: it was never registered in
    tp_param_list, so a multi-year path stayed short and broke the
    transition solve. It now extends to T + S with the last value carried
    forward, like alpha_G/alpha_T/alpha_I. See PR #1166.

0.16.3

Choose a tag to compare

@jdebacker jdebacker released this 26 Jun 17:27
903cfc2

This release:

Adds

  • Better functionality and more country repositories with the OG installer. See PR #1162

Fixes

  • Fixes an inconsistency with the pre-time path population distribution and growth rates. Note that the demographics.get_pop function has been changed and now only returns one object: the population distribution (not also the distribution prior to the start year). In addition, the get_pop and get_pop_objs functions no longer have the pre_pop_dist kwarg. See PR #1073.

0.16.2

Choose a tag to compare

@jdebacker jdebacker released this 16 Jun 03:49
b4f5dbb

This release:

Adds

  • Adds output_tables.model_fit_table function that generates a table comparing model output to data for a set of target moments, and adds a test of this function in test_output_tables.py. The function takes as input a list of target moment descriptions, the TPI output dictionary, and the model parameters object, and returns a pandas DataFrame with the target moment descriptions, the model values for those moments, and the data values for those moments (where applicable). The function currently supports a set of macroeconomic moments (interest rate, capital share of output, labor share of output), inequality moments (Gini coefficient for before-tax income and after-tax income), and demographic moments (fraction of population 65+ and population growth rate). See PR #1138.
  • Validates beta_annual and chi_b against J. (PR #1149)

Fixes

  • Fixes issue with reading UN data on Pandas >= 3.0 and UN token string. (PR #1151)
  • Fixes math notation for plot labels. (PR #1148)
  • Fixes reshaping issues with J=1 parameterization. (PR #1145)
  • Fixed math notion for tilde variables in plot labels in output_plots.py to be consistent with the documentation and the code. See PR #1148.

0.16.1

Choose a tag to compare

@jdebacker jdebacker released this 05 Jun 18:37
463156e

This release:

  • Adds a use_sparse_FOC_jac Specifications parameter (default True) that accelerates the time path iteration (TPI) household solve. With it on, scipy.optimize.root is given a sparse (banded) finite-difference Jacobian for the stacked household Euler and labor first order conditions: the sparsity pattern is auto-detected once per problem size and the solver then needs far fewer function evaluations per Jacobian build (about 20x fewer on the default S=80 cohort solve), with an automatic fallback to dense finite differences if the Jacobian is not sparse enough to benefit or if a solve fails. The result matches the legacy dense-finite-difference solution to within the model's resource-constraint accuracy floor on every calibration tested (OG-Core standard example, OG-ETH, OG-ZAF, OG-PHL, OG-IDN), giving roughly a 1.9-2.4x TPI speedup at no accuracy cost. Set use_sparse_FOC_jac=False to recover bit-identical agreement with v0.16.0 and earlier.

0.16.0

Choose a tag to compare

@rickecon rickecon released this 04 Jun 17:03
d8e454e

This release:

  • Adds a new parameter alpha_FA that allows the user to specify the level of direct foreign aid as a percentage of GDP. See PR #1126.

0.15.13

Choose a tag to compare

@rickecon rickecon released this 15 May 02:20
1a3d8c9

This release:

  • Increases the maximum value of the mindist_TPI parameter to 0.01 in default_parameters.json.
  • Updates the uv.lock with package updates.

0.15.12

Choose a tag to compare

@jdebacker jdebacker released this 14 May 19:46
673b1f3

This release:

  • Caches the e_long array in household.FOC_savings and household.FOC_labor rather than rebuilding it on every call. e_long is a pure function of p.e, p.S, and p.J, none of which change during a solve, so a _get_e_long helper now builds it once per worker and reuses it. Profiling identified this rebuild as the single most expensive operation in a TPI run. The change is a pure cache — model output is bit-for-bit identical to master — and gives roughly a 3x speedup on a single-reform TPI run. See PR #1128.
  • Builds the per-period tax-parameter slices in TPI.inner_loop as numpy arrays via a new _params_to_array helper, and switches txfunc.get_tax_rates to np.asarray, so the repeated per-call list-to-array conversion is skipped on the hot TPI path. mono and mono2D tax functions store callables rather than numbers, so their nested-list form is passed through unchanged. Profiling identified this conversion as the next hot spot after the e_long rebuild. Model output is bit-for-bit identical to master, and the change gives roughly a further 10% speedup on a single-reform TPI run (about 3.3x cumulative versus master). See PR #1128.
  • Changes the minimum of the allowable range for tau_c in default_parameters.py to allow for government consumption subsidies.
  • Fixes a bug in the parameter_plots.plot_fert_rates function. See PR #1127.

0.15.11

Choose a tag to compare

@rickecon rickecon released this 08 May 17:18
2cd743e

This release:

  • Updates the uv.lock to include dependabot upgrades in PR #1118, PR #1119, PR #1120, and PR #1121, as well as some other package upgrades that were available.

0.15.10

Choose a tag to compare

@rickecon rickecon released this 23 Apr 15:37
562c6d3

This release:

  • Updates uv.lock to include upgrade to package nbconvert from 7.17.0 to 7.17.1. This was the subject of PR #1110. But we could not get its tests to pass.
  • Fixes typo in CHANGELOG.md