iza-institute-of-labor-economics / gettsim

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

Implementation pension for unemployed #634

Closed TeBackh closed 1 year ago

TeBackh commented 1 year ago

What problem do you want to solve?

Closes #633 : Implementation of pension for unemployed. Implementation without considering Vertrauensschutz.

Todo

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.10% :tada:

Comparison is base (08f808d) 90.42% compared to head (ed714f4) 90.53%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #634 +/- ## ========================================== + Coverage 90.42% 90.53% +0.10% ========================================== Files 48 48 Lines 3061 3094 +33 ========================================== + Hits 2768 2801 +33 Misses 293 293 ``` | [Files Changed](https://app.codecov.io/gh/iza-institute-of-labor-economics/gettsim/pull/634?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=iza-institute-of-labor-economics) | Coverage Δ | | |---|---|---| | [src/\_gettsim/config.py](https://app.codecov.io/gh/iza-institute-of-labor-economics/gettsim/pull/634?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=iza-institute-of-labor-economics#diff-c3JjL19nZXR0c2ltL2NvbmZpZy5weQ==) | `33.33% <ø> (ø)` | | | [src/\_gettsim/demographic\_vars.py](https://app.codecov.io/gh/iza-institute-of-labor-economics/gettsim/pull/634?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=iza-institute-of-labor-economics#diff-c3JjL19nZXR0c2ltL2RlbW9ncmFwaGljX3ZhcnMucHk=) | `100.00% <100.00%> (ø)` | | | [src/\_gettsim/transfers/rente.py](https://app.codecov.io/gh/iza-institute-of-labor-economics/gettsim/pull/634?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=iza-institute-of-labor-economics#diff-c3JjL19nZXR0c2ltL3RyYW5zZmVycy9yZW50ZS5weQ==) | `96.62% <100.00%> (+0.68%)` | :arrow_up: |

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

TeBackh commented 1 year ago

One thing that occurred to me is that we should get rid of some functions for more recent years via @dates_active. I guess after 2017 or so, nobody was affected by this anymore? Or might one need it to calculate pension levels for older cohorts (do we support that?)?

Yeah, I have thought about it too. But then I thought, when we want to calculate the pension payment for someone born in say 1945 for year 2020 , then we need the function. (But I am never sure about the purpose of gettsim in this respect, we should talk about this)

hmgaudecker commented 1 year ago

One thing that occurred to me is that we should get rid of some functions for more recent years via @dates_active. I guess after 2017 or so, nobody was affected by this anymore? Or might one need it to calculate pension levels for older cohorts (do we support that?)?

Yeah, I have thought about it too. But then I thought, when we want to calculate the pension payment for someone born in say 1945 for year 2020 , then we need the function. (But I am never sure about the purpose of gettsim in this respect, we should talk about this)

Yip, this is exactly what I meant. I guess my question was whether we carry all information around so that this is possible? Could well be, I just have no idea.

Is it possible to earn Entgeltpunkte after accessing the pension? If so, this would make it impossible I suppose. Else it could work.

TeBackh commented 1 year ago

One thing that occurred to me is that we should get rid of some functions for more recent years via @dates_active. I guess after 2017 or so, nobody was affected by this anymore? Or might one need it to calculate pension levels for older cohorts (do we support that?)?

Yeah, I have thought about it too. But then I thought, when we want to calculate the pension payment for someone born in say 1945 for year 2020 , then we need the function. (But I am never sure about the purpose of gettsim in this respect, we should talk about this)

Yip, this is exactly what I meant. I guess my question was whether we carry all information around so that this is possible? Could well be, I just have no idea.

Is it possible to earn Entgeltpunkte after accessing the pension? If so, this would make it impossible I suppose. Else it could work.

What do you mean by carry around? (doesn't this require to have calculated the pension in some earlier year/ or at least have observed the person? I was thinking about some cross sectional application )

Yes,it is possible to earn Entgeltpunkte after accessing the pension. (probably rarely done but possible)

hmgaudecker commented 1 year ago

One thing that occurred to me is that we should get rid of some functions for more recent years via @dates_active. I guess after 2017 or so, nobody was affected by this anymore? Or might one need it to calculate pension levels for older cohorts (do we support that?)?

Yeah, I have thought about it too. But then I thought, when we want to calculate the pension payment for someone born in say 1945 for year 2020 , then we need the function. (But I am never sure about the purpose of gettsim in this respect, we should talk about this)

Yip, this is exactly what I meant. I guess my question was whether we carry all information around so that this is possible? Could well be, I just have no idea.

What do you mean by carry around? (doesn't this require to have calculated the pension in some earlier year/ or at least have observed the person? I was thinking about some cross sectional application )

Apologies, the "we" did not make much sense. What I meant is whether we can compute the pension in a backward-looking manner. I.e., if we observed cross-sectional variables in 2020 plus some others like pension start date, would it even be possible to calculate the pension of an 80-year-old who has been retired for 17 years?

Yes, it is possible to earn Entgeltpunkte after accessing the pension. (probably rarely done but possible)

And I think this case makes the above impossible. Else we'd need to distinguish between credits earned before accessing the pension and after doing so?

TeBackh commented 1 year ago

Yes, it is possible to earn Entgeltpunkte after accessing the pension. (probably rarely done but possible)

And I think this case makes the above impossible. Else we'd need to distinguish between credits earned before accessing the pension and after doing so?

Thats right. That is with the current implementation we can only do this for people who have stopped working when they started to claim "Altersrente", which is the vast majority though.

TeBackh commented 1 year ago

Great, many thanks! Sorry for being a drag here!

No worries, improved the quality :)