-
Notifications
You must be signed in to change notification settings - Fork 31
Change namespace of private Renteneinnahmen #1029
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
hmgaudecker
merged 5 commits into
collect-components-of-namespaces
from
priv-rente-namespace
Jul 18, 2025
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
521376e
Change namespace of private_rente_m. Add different types of pension i…
MImmesberger c72ec8b
Review comments (untested).
MImmesberger 06f495f
Fix remaining bugs.
MImmesberger 65cc94c
Review comments.
MImmesberger f4fee6c
Add EM Rente to income definition of many TT components.
MImmesberger File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
src/_gettsim/einkommensteuer/einkünfte/sonstige/rente/__init__.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| from __future__ import annotations |
46 changes: 46 additions & 0 deletions
46
src/_gettsim/einkommensteuer/einkünfte/sonstige/rente/inputs.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| """Input columns.""" | ||
|
|
||
| from __future__ import annotations | ||
|
|
||
| from ttsim.tt_dag_elements import policy_input | ||
|
|
||
|
|
||
| @policy_input() | ||
| def alle_weiteren_m() -> float: | ||
| """Additional income: includes private and public transfers that are not yet | ||
| implemented in GETTSIM (e.g., BAföG, Kriegsopferfürsorge). | ||
|
|
||
| Excludes income from public and private pensions. | ||
| """ | ||
|
|
||
|
|
||
| @policy_input(start_date="2021-01-01") | ||
| def gesamtbetrag_vorjahr_m() -> float: | ||
| """Income from private and public pensions in the previous year. | ||
|
|
||
| GETTSIM can calculate this input based on the data of the previous year using the | ||
| target `("einkommensteuer", "einkünfte", "sonstige", "betrag_m")`. | ||
| """ | ||
|
|
||
|
|
||
| @policy_input() | ||
| def sonstige_private_vorsorge_m() -> float: | ||
| """Monthly payout from private pensions without tax-favored contributions. | ||
|
|
||
| This refers to pension payments from plans where the original | ||
| contributions were not tax-deductible (or tax-exempt). | ||
| """ | ||
|
|
||
|
|
||
| @policy_input() | ||
| def geförderte_private_vorsorge_m() -> float: | ||
| """Monthly payout from private pensions with tax-favored contributions. | ||
|
|
||
| This refers to pension payments from plans where the original | ||
| contributions were tax-deductible (or tax-exempt). Primarily Riesterrente. | ||
| """ | ||
|
|
||
|
|
||
| @policy_input() | ||
| def betriebliche_altersvorsorge_m() -> float: | ||
| """Amount of monthly occupational pension.""" |
53 changes: 53 additions & 0 deletions
53
src/_gettsim/einkommensteuer/einkünfte/sonstige/rente/rente.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| """Sonstige Einkünfte according to § 22 EStG.""" | ||
|
|
||
| from __future__ import annotations | ||
|
|
||
| from typing import TYPE_CHECKING | ||
|
|
||
| if TYPE_CHECKING: | ||
| from types import ModuleType | ||
|
|
||
| from ttsim.tt_dag_elements import ( | ||
| PiecewisePolynomialParamValue, | ||
| piecewise_polynomial, | ||
| policy_function, | ||
| ) | ||
|
|
||
|
|
||
| @policy_function() | ||
| def betrag_m( | ||
| ertragsanteil: float, | ||
| sozialversicherung__rente__altersrente__betrag_m: float, | ||
MImmesberger marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| sozialversicherung__rente__erwerbsminderung__betrag_m: float, | ||
| geförderte_private_vorsorge_m: float, | ||
| sonstige_private_vorsorge_m: float, | ||
| betriebliche_altersvorsorge_m: float, | ||
| ) -> float: | ||
| """Pension income counting towards taxable income. | ||
|
|
||
| Reference: § 22 EStG | ||
| """ | ||
| return ( | ||
| ertragsanteil | ||
| * ( | ||
| sozialversicherung__rente__altersrente__betrag_m | ||
| + sozialversicherung__rente__erwerbsminderung__betrag_m | ||
| + sonstige_private_vorsorge_m | ||
| ) | ||
| + betriebliche_altersvorsorge_m | ||
| + geförderte_private_vorsorge_m | ||
| ) | ||
|
|
||
|
|
||
| @policy_function() | ||
| def ertragsanteil( | ||
| sozialversicherung__rente__jahr_renteneintritt: int, | ||
| parameter_ertragsanteil: PiecewisePolynomialParamValue, | ||
| xnp: ModuleType, | ||
| ) -> float: | ||
| """Share of pensions subject to income taxation.""" | ||
| return piecewise_polynomial( | ||
| x=sozialversicherung__rente__jahr_renteneintritt, | ||
| parameters=parameter_ertragsanteil, | ||
| xnp=xnp, | ||
| ) | ||
21 changes: 14 additions & 7 deletions
21
...ommensteuer/einkünfte/sonstige/rente.yaml → ...teuer/einkünfte/sonstige/rente/rente.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.