Skip to content

Releases: PSLmodels/OG-Core

0.16.3

26 Jun 17:27
903cfc2

Choose a tag to compare

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

16 Jun 03:49
b4f5dbb

Choose a tag to compare

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

05 Jun 18:37
463156e

Choose a tag to compare

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

04 Jun 17:03
d8e454e

Choose a tag to compare

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

15 May 02:20
1a3d8c9

Choose a tag to compare

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

14 May 19:46
673b1f3

Choose a tag to compare

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

08 May 17:18
2cd743e

Choose a tag to compare

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

23 Apr 15:37
562c6d3

Choose a tag to compare

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

0.15.9

23 Apr 09:05
a9961c0

Choose a tag to compare

This release:

  • Creates an ogcore logging environment so that logging specificed in ogcore.config is not overridden by other logging configurations in user code. See PR #1109.
    OG-Core/pull/1106).
  • Includes PR #1111 and PR 1112 that change build_and_test.yml to not upload CodeCov statistics for PRs generated by dependabots and updates the codecov-action to v5.

0.15.8

16 Apr 06:50
e689396

Choose a tag to compare

This release:

  • Updates the uv.lock file to the current version of ogcore package (0.15.8)
  • Adds '**.lock' to the paths in build_and_test.yml so that any changes to the uv.lock file trigger the GH Action CI tests in build_and_test.yml
  • Incorporates the dependabot updates to uv.lock versions from PR #1105 and PR #1106.