-
Notifications
You must be signed in to change notification settings - Fork 186
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d8be53a
commit 9ede0e4
Showing
9 changed files
with
112 additions
and
16 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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
- bump: minor | ||
changes: | ||
added: | ||
- Reafctor the Alternative Minimum Tax (AMT) logic. | ||
- Refactor the Alternative Minimum Tax (AMT) logic. |
21 changes: 21 additions & 0 deletions
21
policyengine_us/parameters/gov/irs/income/amt/multiplier.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,21 @@ | ||
description: The IRS multiplies the Alternative Minimum Tax income tax brackets by this rate, based on filing status. | ||
metadata: | ||
unit: /1 | ||
period: year | ||
breakdown: | ||
- filing_status | ||
label: AMT tax bracket multiplier | ||
reference: | ||
- title: 26 U.S. Code § 55 - Alternative minimum tax imposed (b)(1)(C) | ||
href: https://www.law.cornell.edu/uscode/text/26/55#b_1_C | ||
|
||
SINGLE: | ||
2013-01-01: 1 | ||
JOINT: | ||
2013-01-01: 1 | ||
HEAD_OF_HOUSEHOLD: | ||
2013-01-01: 1 | ||
SURVIVING_SPOUSE: | ||
2013-01-01: 0.5 | ||
SEPARATE: | ||
2013-01-01: 1 |
File renamed without changes.
23 changes: 23 additions & 0 deletions
23
...line/gov/irs/tax/federal_income/alternative_minimum_tax/base_tax/amt_higher_base_tax.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,23 @@ | ||
- name: Single person, low income | ||
period: 2022 | ||
input: | ||
filing_status: SINGLE | ||
amt_income_less_exemptions: 10_000 | ||
output: | ||
amt_higher_base_tax: 0 | ||
|
||
- name: Single person, 400k income | ||
period: 2022 | ||
input: | ||
filing_status: SINGLE | ||
amt_income_less_exemptions: 400_000 | ||
output: | ||
amt_higher_base_tax: 54_292 | ||
|
||
- name: Joint, 600k income | ||
period: 2022 | ||
input: | ||
filing_status: JOINT | ||
amt_income_less_exemptions: 600_000 | ||
output: | ||
amt_higher_base_tax: 110_292 |
23 changes: 23 additions & 0 deletions
23
...eline/gov/irs/tax/federal_income/alternative_minimum_tax/base_tax/amt_lower_base_tax.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,23 @@ | ||
- name: Single person, low income | ||
period: 2022 | ||
input: | ||
filing_status: SINGLE | ||
amt_income_less_exemptions: 10_000 | ||
output: | ||
amt_lower_base_tax: 2_600 | ||
|
||
- name: Single person, no income | ||
period: 2022 | ||
input: | ||
filing_status: SINGLE | ||
amt_income_less_exemptions: 0 | ||
output: | ||
amt_lower_base_tax: 0 | ||
|
||
- name: Joint, high income | ||
period: 2022 | ||
input: | ||
filing_status: JOINT | ||
amt_income_less_exemptions: 400_000 | ||
output: | ||
amt_lower_base_tax: 53_586 |
16 changes: 16 additions & 0 deletions
16
..._us/variables/gov/irs/tax/federal_income/alternative_minimum_tax/base_tax/amt_base_tax.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,16 @@ | ||
from policyengine_us.model_api import * | ||
|
||
|
||
class amt_base_tax(Variable): | ||
value_type = float | ||
entity = TaxUnit | ||
definition_period = YEAR | ||
label = "Alternative Minimum Tax base tax" | ||
unit = USD | ||
documentation = "Alternative Minimum Tax (AMT) base tax, Form 6251 Part II Line 7 'All Others'" | ||
reference = "https://www.irs.gov/pub/irs-pdf/f6251.pdf" | ||
|
||
adds = [ | ||
"amt_lower_base_tax", | ||
"amt_higher_base_tax", | ||
] |
17 changes: 5 additions & 12 deletions
17
...e/alternative_minimum_tax/amt_base_tax.py → ...nimum_tax/base_tax/amt_higher_base_tax.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 |
---|---|---|
@@ -1,27 +1,20 @@ | ||
from policyengine_us.model_api import * | ||
|
||
|
||
class amt_base_tax(Variable): | ||
class amt_higher_base_tax(Variable): | ||
value_type = float | ||
entity = TaxUnit | ||
definition_period = YEAR | ||
label = "Alternative Minimum Tax" | ||
label = "Alternative Minimum Tax higher base tax amount" | ||
unit = USD | ||
documentation = "Alternative Minimum Tax (AMT) base tax, Form 6251 Part II Line 7 'All Others'" | ||
documentation = "Alternative Minimum Tax (AMT) base tax, Form 6251 Part II Line 7 'All Others' - higher bracket" | ||
reference = "https://www.irs.gov/pub/irs-pdf/f6251.pdf" | ||
|
||
def formula(tax_unit, period, parameters): | ||
p = parameters(period).gov.irs.income.amt | ||
filing_status = tax_unit("filing_status", period) | ||
reduced_income = tax_unit("amt_income_less_exemptions", period) | ||
bracket_fraction = where( | ||
filing_status == filing_status.possible_values.SEPARATE, | ||
0.5, | ||
1.0, | ||
) | ||
bracket_fraction = p.multiplier[filing_status] | ||
tax_rate_threshold = p.brackets.thresholds[-1] * bracket_fraction | ||
lower_rate = p.brackets.rates[0] | ||
higher_rate = p.brackets.rates[1] | ||
lower_tax = min_(reduced_income, tax_rate_threshold) * lower_rate | ||
higher_tax = max_(0, reduced_income - tax_rate_threshold) * higher_rate | ||
return lower_tax + higher_tax | ||
return max_(0, reduced_income - tax_rate_threshold) * higher_rate |
20 changes: 20 additions & 0 deletions
20
...riables/gov/irs/tax/federal_income/alternative_minimum_tax/base_tax/amt_lower_base_tax.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,20 @@ | ||
from policyengine_us.model_api import * | ||
|
||
|
||
class amt_lower_base_tax(Variable): | ||
value_type = float | ||
entity = TaxUnit | ||
definition_period = YEAR | ||
label = "Alternative Minimum Tax lower base tax amount" | ||
unit = USD | ||
documentation = "Alternative Minimum Tax (AMT) base tax, Form 6251 Part II Line 7 'All Others' - lower bracket" | ||
reference = "https://www.irs.gov/pub/irs-pdf/f6251.pdf" | ||
|
||
def formula(tax_unit, period, parameters): | ||
p = parameters(period).gov.irs.income.amt | ||
filing_status = tax_unit("filing_status", period) | ||
reduced_income = tax_unit("amt_income_less_exemptions", period) | ||
bracket_fraction = p.multiplier[filing_status] | ||
tax_rate_threshold = p.brackets.thresholds[-1] * bracket_fraction | ||
lower_rate = p.brackets.rates[0] | ||
return min_(reduced_income, tax_rate_threshold) * lower_rate |
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