forked from PolicyEngine/policyengine-us
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Personal Credit Reform (PolicyEngine#4906)
* Personal Credit Reform Fixes PolicyEngine#4905 * reform structure * testing * add phase in to the basic income * test * circular ref. * include ss * remove reform * desc. * ss * test fix
- Loading branch information
1 parent
7eacb11
commit 276f5bf
Showing
8 changed files
with
112 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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,4 @@ | ||
- bump: minor | ||
changes: | ||
added: | ||
- Personal Credit reform. |
7 changes: 7 additions & 0 deletions
7
...ameters/gov/contrib/ubi_center/basic_income/phase_in/include_ss_benefits_as_earnings.yaml
This file contains 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,7 @@ | ||
description: Social Security benefits are treated as earnings under the basic income phase in if this is selected. | ||
values: | ||
0000-01-01: false | ||
metadata: | ||
unit: bool | ||
label: SS benefits treated as earnings for basic income | ||
period: year |
7 changes: 7 additions & 0 deletions
7
policyengine_us/parameters/gov/contrib/ubi_center/basic_income/phase_in/per_person.yaml
This file contains 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,7 @@ | ||
description: Basic incomes phase in per person if this is selected; otherwise, they phase in at a flat rate irrespective of household size. | ||
values: | ||
0000-01-01: false | ||
metadata: | ||
unit: bool | ||
label: Phase in basic income per person | ||
period: year |
7 changes: 7 additions & 0 deletions
7
policyengine_us/parameters/gov/contrib/ubi_center/basic_income/phase_in/rate.yaml
This file contains 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,7 @@ | ||
description: The basic income phases in at this rate. | ||
values: | ||
0000-01-01: 1 | ||
metadata: | ||
unit: /1 | ||
label: Basic income phase-in rate | ||
period: year |
This file contains 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
35 changes: 35 additions & 0 deletions
35
policyengine_us/tests/policy/baseline/contrib/ubi_center/basic_income_phase_in.yaml
This file contains 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,35 @@ | ||
- name: Three people phased in at 70% with earned income | ||
period: 2022 | ||
input: | ||
gov.contrib.ubi_center.basic_income.phase_in.rate: 0.7 | ||
gov.contrib.ubi_center.basic_income.phase_in.per_person: false | ||
gov.contrib.ubi_center.basic_income.phase_in.include_ss_benefits_as_earnings: false | ||
tax_unit_earned_income: 2_000 | ||
tax_unit_size: 3 | ||
tax_unit_social_security: 0 | ||
output: | ||
basic_income_phase_in: 1_400 | ||
|
||
- name: Five people phased in at 30% with earned income, phased in per person | ||
period: 2022 | ||
input: | ||
gov.contrib.ubi_center.basic_income.phase_in.rate: 0.3 | ||
gov.contrib.ubi_center.basic_income.phase_in.per_person: true | ||
gov.contrib.ubi_center.basic_income.phase_in.include_ss_benefits_as_earnings: true | ||
tax_unit_earned_income: 2_000 | ||
tax_unit_size: 5 | ||
tax_unit_social_security: 0 | ||
output: | ||
basic_income_phase_in: 3_000 | ||
|
||
- name: SS included in earnings | ||
period: 2022 | ||
input: | ||
gov.contrib.ubi_center.basic_income.phase_in.rate: 0.3 | ||
gov.contrib.ubi_center.basic_income.phase_in.per_person: false | ||
gov.contrib.ubi_center.basic_income.phase_in.include_ss_benefits_as_earnings: true | ||
tax_unit_earned_income: 2_000 | ||
tax_unit_size: 5 | ||
tax_unit_social_security: 3_000 | ||
output: | ||
basic_income_phase_in: 1_500 |
This file contains 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
22 changes: 22 additions & 0 deletions
22
policyengine_us/variables/contrib/ubi_center/basic_income/basic_income_phase_in.py
This file contains 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,22 @@ | ||
from policyengine_us.model_api import * | ||
|
||
|
||
class basic_income_phase_in(Variable): | ||
value_type = float | ||
entity = TaxUnit | ||
label = "Basic income phase-in" | ||
definition_period = YEAR | ||
unit = USD | ||
|
||
def formula(tax_unit, period, parameters): | ||
p = parameters(period).gov.contrib.ubi_center.basic_income.phase_in | ||
earnings = tax_unit("tax_unit_earned_income", period) | ||
if p.include_ss_benefits_as_earnings: | ||
ss_benefits = tax_unit("tax_unit_social_security", period) | ||
earnings += ss_benefits | ||
if p.per_person: | ||
tax_unit_size = tax_unit("tax_unit_size", period) | ||
rate = p.rate * tax_unit_size | ||
else: | ||
rate = p.rate | ||
return rate * earnings |