-
Notifications
You must be signed in to change notification settings - Fork 176
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Trump / Harris tax exempt tip income reform and overtime tax reform (#…
…5245) * Trump tax exempt tip income reform Fixes #5244 * test fix * adjust logic to just reduce the var * adjust AGI as opposed to taxable income * gross income* * test name * consolidate overtime and tip income into one reform structure
- Loading branch information
1 parent
f38a254
commit d78b8fe
Showing
11 changed files
with
203 additions
and
0 deletions.
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: | ||
- Trump tip income tax exempt. |
8 changes: 8 additions & 0 deletions
8
policyengine_us/parameters/gov/contrib/tax_exempt/in_effect.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,8 @@ | ||
description: Various income sources are exempt from federal income or payroll tax, if this is true. | ||
metadata: | ||
unit: bool | ||
period: year | ||
label: Tax exemptions in effect | ||
|
||
values: | ||
0000-01-01: false |
8 changes: 8 additions & 0 deletions
8
policyengine_us/parameters/gov/contrib/tax_exempt/overtime/income_tax_exempt.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,8 @@ | ||
description: The propsal to exempt overtime income from income tax applies, if this is true. | ||
metadata: | ||
unit: bool | ||
period: year | ||
label: Overtime income, income tax exempt | ||
|
||
values: | ||
0000-01-01: false |
8 changes: 8 additions & 0 deletions
8
policyengine_us/parameters/gov/contrib/tax_exempt/overtime/payroll_tax_exempt.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,8 @@ | ||
description: The propsal to exempt overtime income from payroll tax applies, if this is true. | ||
metadata: | ||
unit: bool | ||
period: year | ||
label: Overtime income payroll tax exempt | ||
|
||
values: | ||
0000-01-01: false |
9 changes: 9 additions & 0 deletions
9
policyengine_us/parameters/gov/contrib/tax_exempt/tip_income/income_tax_exempt.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,9 @@ | ||
|
||
description: The propsal to exempt tip income from payroll tax applies, if this is true. | ||
metadata: | ||
unit: bool | ||
period: year | ||
label: Tip income, income tax exempt | ||
|
||
values: | ||
0000-01-01: false |
8 changes: 8 additions & 0 deletions
8
policyengine_us/parameters/gov/contrib/tax_exempt/tip_income/payroll_tax_exempt.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,8 @@ | ||
description: The propsal to exempt tip income from payroll tax applies, if this is true. | ||
metadata: | ||
unit: bool | ||
period: year | ||
label: Tip income payroll tax exempt | ||
|
||
values: | ||
0000-01-01: false |
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
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
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,3 @@ | ||
from .tax_exempt_reform import ( | ||
create_tax_exempt_reform, | ||
) |
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,86 @@ | ||
from policyengine_us.model_api import * | ||
|
||
|
||
def create_tax_exempt() -> Reform: | ||
class irs_gross_income(Variable): | ||
value_type = float | ||
entity = Person | ||
label = "Gross income" | ||
unit = USD | ||
documentation = ( | ||
"Gross income, as defined in the Internal Revenue Code." | ||
) | ||
definition_period = YEAR | ||
reference = "https://www.law.cornell.edu/uscode/text/26/61" | ||
|
||
def formula(person, period, parameters): | ||
sources = parameters(period).gov.irs.gross_income.sources | ||
total = 0 | ||
not_dependent = ~person("is_tax_unit_dependent", period) | ||
for source in sources: | ||
# Add positive values only - losses are deducted later. | ||
total += not_dependent * max_(0, add(person, period, [source])) | ||
exempt_income = 0 | ||
p = parameters(period).gov.contrib.tax_exempt | ||
if p.tip_income.income_tax_exempt: | ||
tip_income = person("tip_income", period) | ||
exempt_income += tip_income | ||
if p.overtime.income_tax_exempt: | ||
exempt_income += person("overtime_income", period) | ||
return max_(total - exempt_income, 0) | ||
|
||
class payroll_tax_gross_wages(Variable): | ||
value_type = float | ||
entity = Person | ||
label = "Gross wages and salaries for payroll taxes" | ||
definition_period = YEAR | ||
unit = USD | ||
|
||
def formula(person, period, parameters): | ||
income = person("irs_employment_income", period) | ||
p = parameters(period).gov.contrib.tax_exempt | ||
exempt_income = 0 | ||
if p.tip_income.payroll_tax_exempt: | ||
exempt_income += person("tip_income", period) | ||
if p.overtime.payroll_tax_exempt: | ||
exempt_income += person("overtime_income", period) | ||
return max_(income - exempt_income, 0) | ||
|
||
class tip_income(Variable): | ||
value_type = float | ||
entity = Person | ||
label = "Tip income" | ||
unit = USD | ||
definition_period = YEAR | ||
reference = "https://www.law.cornell.edu/cfr/text/26/31.3402(k)-1" | ||
|
||
class overtime_income(Variable): | ||
value_type = float | ||
entity = Person | ||
label = "Income from overtime hours worked" | ||
unit = USD | ||
definition_period = YEAR | ||
|
||
class reform(Reform): | ||
def apply(self): | ||
self.update_variable(irs_gross_income) | ||
self.update_variable(tip_income) | ||
self.update_variable(payroll_tax_gross_wages) | ||
self.update_variable(overtime_income) | ||
|
||
return reform | ||
|
||
|
||
def create_tax_exempt_reform(parameters, period, bypass: bool = False): | ||
if bypass: | ||
return create_tax_exempt() | ||
|
||
p = parameters(period).gov.contrib.tax_exempt | ||
|
||
if p.in_effect: | ||
return create_tax_exempt() | ||
else: | ||
return None | ||
|
||
|
||
tax_exempt_reform = create_tax_exempt_reform(None, None, bypass=True) |
62 changes: 62 additions & 0 deletions
62
policyengine_us/tests/policy/contrib/tax_exempt/tax_exempt_reform.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,62 @@ | ||
- name: Overtime and tips are excluded from income and payroll tax | ||
period: 2024 | ||
reforms: policyengine_us.reforms.tax_exempt.tax_exempt_reform.tax_exempt_reform | ||
input: | ||
gov.contrib.tax_exempt.in_effect: true | ||
gov.contrib.tax_exempt.overtime.payroll_tax_exempt: true | ||
gov.contrib.tax_exempt.overtime.income_tax_exempt: true | ||
gov.contrib.tax_exempt.tip_income.payroll_tax_exempt: true | ||
gov.contrib.tax_exempt.tip_income.income_tax_exempt: true | ||
overtime_income: 10_000 | ||
tip_income: 10_000 | ||
irs_employment_income: 30_000 | ||
output: | ||
irs_gross_income: 10_000 | ||
payroll_tax_gross_wages: 10_000 | ||
|
||
- name: Reform does not apply | ||
period: 2024 | ||
input: | ||
gov.contrib.tax_exempt.in_effect: false | ||
gov.contrib.tax_exempt.overtime.payroll_tax_exempt: true | ||
gov.contrib.tax_exempt.overtime.income_tax_exempt: true | ||
gov.contrib.tax_exempt.tip_income.payroll_tax_exempt: true | ||
gov.contrib.tax_exempt.tip_income.income_tax_exempt: true | ||
# overtime_income: 10_000 | ||
# tip_income: 10_000 | ||
irs_employment_income: 30_000 | ||
output: | ||
irs_gross_income: 30_000 | ||
payroll_tax_gross_wages: 30_000 | ||
|
||
- name: Overtime and tips are excluded from income but not payroll tax | ||
period: 2024 | ||
reforms: policyengine_us.reforms.tax_exempt.tax_exempt_reform.tax_exempt_reform | ||
input: | ||
gov.contrib.tax_exempt.in_effect: true | ||
gov.contrib.tax_exempt.overtime.payroll_tax_exempt: false | ||
gov.contrib.tax_exempt.overtime.income_tax_exempt: true | ||
gov.contrib.tax_exempt.tip_income.payroll_tax_exempt: false | ||
gov.contrib.tax_exempt.tip_income.income_tax_exempt: true | ||
overtime_income: 10_000 | ||
tip_income: 10_000 | ||
irs_employment_income: 30_000 | ||
output: | ||
irs_gross_income: 10_000 | ||
payroll_tax_gross_wages: 30_000 | ||
|
||
- name: Overtime is income tax exempt and tips are payroll tax exempt | ||
period: 2024 | ||
reforms: policyengine_us.reforms.tax_exempt.tax_exempt_reform.tax_exempt_reform | ||
input: | ||
gov.contrib.tax_exempt.in_effect: true | ||
gov.contrib.tax_exempt.overtime.payroll_tax_exempt: false | ||
gov.contrib.tax_exempt.overtime.income_tax_exempt: true | ||
gov.contrib.tax_exempt.tip_income.payroll_tax_exempt: true | ||
gov.contrib.tax_exempt.tip_income.income_tax_exempt: false | ||
overtime_income: 12_000 | ||
tip_income: 11_000 | ||
irs_employment_income: 30_000 | ||
output: | ||
irs_gross_income: 18_000 | ||
payroll_tax_gross_wages: 19_000 |