iza-institute-of-labor-economics / gettsim

The GErman Taxes and Transfers SIMulator
https://gettsim.readthedocs.io/
GNU Affero General Public License v3.0
54 stars 32 forks source link

Adjust statutory retirement ages #717

Closed MImmesberger closed 4 months ago

MImmesberger commented 6 months ago

Closes #665, #664 Closes #491 partially Related to #663

What problem do you want to solve?

This PR solves two problems (as discussed in #665):

  1. Statutory retirement ages (SRAs) are wrong in the parameter files. This is a relict of the missing dates_active feature. Back then, we dealt with abolished pathways into retirement by setting the relevant SRA of the abolished pathway to the SRA of a pathway that continued to exist (e.g. setting the full retirement age for Altersrente for Frauen to the Regelaltersgrenze after the 1952 birth cohort). This logic fails once we want to depict changes of the policy environment over time.
  2. SRAs are currently implemented via piecewise linear functions. We started to replace this with explicit birth-cohort-age dicts in #645

Along these lines, this PR changes the test files that currently only test the pension functions for policy year 2010. Due to point 1, there are probably a lot of tests that expect wrong SRAs.

Todo

codecov[bot] commented 5 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 89.63%. Comparing base (cd0cffd) to head (4b96953). Report is 9 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #717 +/- ## ========================================== + Coverage 89.57% 89.63% +0.06% ========================================== Files 52 52 Lines 3711 3764 +53 ========================================== + Hits 3324 3374 +50 - Misses 387 390 +3 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

MImmesberger commented 5 months ago

I mostly changed parameters and adjusted how the functions access them accordingly.

There are some occasions where I changed default values of targets. Those changes make sense to me but maybe I'm missing something (especially as I wasn't around when the original defaults were introduced). I highlighted them in the comments above to make the review easier.

MImmesberger commented 4 months ago

I think I addressed all the requested changes. The unresolved conversations are all related to the discussion we had here. To make the logic more apparent for future users, I adjusted the docstrings accordingly.