From 4eeb491a7068d7024c6852b7b2af91183e77b254 Mon Sep 17 00:00:00 2001 From: SirMalamute Date: Fri, 1 Dec 2023 04:16:40 +0000 Subject: [PATCH 01/14] Parameterize 25% on line 37 of AMT Fixes #3278 --- .../income/amt/capital_gains/capital_gain_excess_tax_rate.yaml | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 policyengine_us/parameters/gov/irs/income/amt/capital_gains/capital_gain_excess_tax_rate.yaml diff --git a/policyengine_us/parameters/gov/irs/income/amt/capital_gains/capital_gain_excess_tax_rate.yaml b/policyengine_us/parameters/gov/irs/income/amt/capital_gains/capital_gain_excess_tax_rate.yaml new file mode 100644 index 00000000000..e69de29bb2d From 6c8fa92fdcf85d9ffae6a98d90bb79bc754bfbfa Mon Sep 17 00:00:00 2001 From: SirMalamute Date: Mon, 4 Dec 2023 20:34:47 +0000 Subject: [PATCH 02/14] added variable file --- .../capital_gains/capital_gain_excess_tax_rate.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/policyengine_us/parameters/gov/irs/income/amt/capital_gains/capital_gain_excess_tax_rate.yaml b/policyengine_us/parameters/gov/irs/income/amt/capital_gains/capital_gain_excess_tax_rate.yaml index e69de29bb2d..1bf4fcc5e1a 100644 --- a/policyengine_us/parameters/gov/irs/income/amt/capital_gains/capital_gain_excess_tax_rate.yaml +++ b/policyengine_us/parameters/gov/irs/income/amt/capital_gains/capital_gain_excess_tax_rate.yaml @@ -0,0 +1,10 @@ +description: The amount determined under AMT shall not exceed this percentage of amounts calculated. +metadata: + unit: /1 + label: AMT Capital Gain Excess Tax Rate Percentage + period: year + reference: + - title: 26 U.S. Code § 55 - Alternative minimum tax imposed + href: https://www.law.cornell.edu/uscode/text/26/55#b_3_E +values: + 2021-01-01: 0.25 From 30bb8701212fb462c063d730a81c99ecef73c4b0 Mon Sep 17 00:00:00 2001 From: SirMalamute Date: Mon, 4 Dec 2023 21:06:30 +0000 Subject: [PATCH 03/14] parameterized --- .../irs/tax/federal_income/alternative_minimum_tax.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/policyengine_us/variables/gov/irs/tax/federal_income/alternative_minimum_tax.py b/policyengine_us/variables/gov/irs/tax/federal_income/alternative_minimum_tax.py index 576c26712d8..bd354c13353 100644 --- a/policyengine_us/variables/gov/irs/tax/federal_income/alternative_minimum_tax.py +++ b/policyengine_us/variables/gov/irs/tax/federal_income/alternative_minimum_tax.py @@ -43,6 +43,9 @@ class regular_tax_before_credits(Variable): unit = USD def formula(tax_unit, period, parameters): + + p = parameters(period).gov.irs.income.amt + filing_status = tax_unit("filing_status", period) dwks1 = tax_unit("taxable_income", period) @@ -74,8 +77,10 @@ def formula(tax_unit, period, parameters): dwks10 = tax_unit("dwks10", period) dwks34 = dwks10 + dwks19 dwks36 = max_(0, dwks34 - dwks1) - dwks37 = max_(0, dwks33 - dwks36) - dwks38 = 0.25 * dwks37 + dwks37 = max_(0, dwks33 - dwks36)5 + + #parameterized + dwks38 = p.capital_gain_excess_tax_rate * dwks37 # Break in worksheet lines dwks39 = dwks19 + dwks20 + dwks28 + dwks31 + dwks37 dwks40 = dwks1 - dwks39 From 977430a43c601a2f39b6ac8f9c524286291465e1 Mon Sep 17 00:00:00 2001 From: SirMalamute Date: Mon, 4 Dec 2023 21:09:44 +0000 Subject: [PATCH 04/14] changelog --- changelog_entry.yaml | 4 ++++ .../amt/capital_gains/capital_gain_excess_tax_rate.yaml | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/changelog_entry.yaml b/changelog_entry.yaml index e69de29bb2d..df4cfdb355a 100644 --- a/changelog_entry.yaml +++ b/changelog_entry.yaml @@ -0,0 +1,4 @@ +- bump: patch + changes: + fixes: + - Parameterized 25% for Alternative Minimum Tax. diff --git a/policyengine_us/parameters/gov/irs/income/amt/capital_gains/capital_gain_excess_tax_rate.yaml b/policyengine_us/parameters/gov/irs/income/amt/capital_gains/capital_gain_excess_tax_rate.yaml index 1bf4fcc5e1a..ebf457d64d6 100644 --- a/policyengine_us/parameters/gov/irs/income/amt/capital_gains/capital_gain_excess_tax_rate.yaml +++ b/policyengine_us/parameters/gov/irs/income/amt/capital_gains/capital_gain_excess_tax_rate.yaml @@ -1,7 +1,7 @@ -description: The amount determined under AMT shall not exceed this percentage of amounts calculated. +description: The IRS multiples the taxable excess capital gains by this rate. metadata: unit: /1 - label: AMT Capital Gain Excess Tax Rate Percentage + label: Alternative Minimum Tax capital gain excess tax rate period: year reference: - title: 26 U.S. Code § 55 - Alternative minimum tax imposed From 765e59a4aad98b2b5fb1b71be6bf02d64dbb62c5 Mon Sep 17 00:00:00 2001 From: SirMalamute Date: Mon, 4 Dec 2023 21:12:01 +0000 Subject: [PATCH 05/14] rename --- .../gov/irs/tax/federal_income/alternative_minimum_tax.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/policyengine_us/variables/gov/irs/tax/federal_income/alternative_minimum_tax.py b/policyengine_us/variables/gov/irs/tax/federal_income/alternative_minimum_tax.py index bd354c13353..6a3db16c82d 100644 --- a/policyengine_us/variables/gov/irs/tax/federal_income/alternative_minimum_tax.py +++ b/policyengine_us/variables/gov/irs/tax/federal_income/alternative_minimum_tax.py @@ -44,7 +44,7 @@ class regular_tax_before_credits(Variable): def formula(tax_unit, period, parameters): - p = parameters(period).gov.irs.income.amt + income_amt = parameters(period).gov.irs.income.amt filing_status = tax_unit("filing_status", period) dwks1 = tax_unit("taxable_income", period) @@ -80,7 +80,7 @@ def formula(tax_unit, period, parameters): dwks37 = max_(0, dwks33 - dwks36)5 #parameterized - dwks38 = p.capital_gain_excess_tax_rate * dwks37 + dwks38 = income_amt.capital_gain_excess_tax_rate * dwks37 # Break in worksheet lines dwks39 = dwks19 + dwks20 + dwks28 + dwks31 + dwks37 dwks40 = dwks1 - dwks39 From df6aa5a89dea37068e42cc667ce04366a73d4588 Mon Sep 17 00:00:00 2001 From: SirMalamute Date: Mon, 4 Dec 2023 21:13:45 +0000 Subject: [PATCH 06/14] reformat --- .../gov/irs/tax/federal_income/alternative_minimum_tax.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/policyengine_us/variables/gov/irs/tax/federal_income/alternative_minimum_tax.py b/policyengine_us/variables/gov/irs/tax/federal_income/alternative_minimum_tax.py index 6a3db16c82d..d587c224507 100644 --- a/policyengine_us/variables/gov/irs/tax/federal_income/alternative_minimum_tax.py +++ b/policyengine_us/variables/gov/irs/tax/federal_income/alternative_minimum_tax.py @@ -44,8 +44,6 @@ class regular_tax_before_credits(Variable): def formula(tax_unit, period, parameters): - income_amt = parameters(period).gov.irs.income.amt - filing_status = tax_unit("filing_status", period) dwks1 = tax_unit("taxable_income", period) @@ -80,7 +78,9 @@ def formula(tax_unit, period, parameters): dwks37 = max_(0, dwks33 - dwks36)5 #parameterized - dwks38 = income_amt.capital_gain_excess_tax_rate * dwks37 + p = parameters(period).gov.irs.income + + dwks38 = p.amt.capital_gain_excess_tax_rate * dwks37 # Break in worksheet lines dwks39 = dwks19 + dwks20 + dwks28 + dwks31 + dwks37 dwks40 = dwks1 - dwks39 @@ -88,7 +88,6 @@ def formula(tax_unit, period, parameters): # Compute regular tax using bracket rates and thresholds reg_taxinc = max_(0, dwks19) - p = parameters(period).gov.irs.income bracket_tops = p.bracket.thresholds bracket_rates = p.bracket.rates reg_tax = 0 From 4d83814a37a6366a5c0455b1738ddd8cbd08bcd8 Mon Sep 17 00:00:00 2001 From: SirMalamute Date: Mon, 4 Dec 2023 21:15:31 +0000 Subject: [PATCH 07/14] typo --- .../gov/irs/tax/federal_income/alternative_minimum_tax.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/policyengine_us/variables/gov/irs/tax/federal_income/alternative_minimum_tax.py b/policyengine_us/variables/gov/irs/tax/federal_income/alternative_minimum_tax.py index d587c224507..2ba8c55bb1a 100644 --- a/policyengine_us/variables/gov/irs/tax/federal_income/alternative_minimum_tax.py +++ b/policyengine_us/variables/gov/irs/tax/federal_income/alternative_minimum_tax.py @@ -75,7 +75,7 @@ def formula(tax_unit, period, parameters): dwks10 = tax_unit("dwks10", period) dwks34 = dwks10 + dwks19 dwks36 = max_(0, dwks34 - dwks1) - dwks37 = max_(0, dwks33 - dwks36)5 + dwks37 = max_(0, dwks33 - dwks36) #parameterized p = parameters(period).gov.irs.income From a00281658e4774cfa79610f141ae2358086d4196 Mon Sep 17 00:00:00 2001 From: SirMalamute Date: Mon, 4 Dec 2023 21:15:51 +0000 Subject: [PATCH 08/14] format --- .../gov/irs/tax/federal_income/alternative_minimum_tax.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/policyengine_us/variables/gov/irs/tax/federal_income/alternative_minimum_tax.py b/policyengine_us/variables/gov/irs/tax/federal_income/alternative_minimum_tax.py index 2ba8c55bb1a..44d06c79caf 100644 --- a/policyengine_us/variables/gov/irs/tax/federal_income/alternative_minimum_tax.py +++ b/policyengine_us/variables/gov/irs/tax/federal_income/alternative_minimum_tax.py @@ -43,7 +43,6 @@ class regular_tax_before_credits(Variable): unit = USD def formula(tax_unit, period, parameters): - filing_status = tax_unit("filing_status", period) dwks1 = tax_unit("taxable_income", period) @@ -77,7 +76,7 @@ def formula(tax_unit, period, parameters): dwks36 = max_(0, dwks34 - dwks1) dwks37 = max_(0, dwks33 - dwks36) - #parameterized + # parameterized p = parameters(period).gov.irs.income dwks38 = p.amt.capital_gain_excess_tax_rate * dwks37 From b745043c2d73fba09e8bc9cce5b46941b6d7e08e Mon Sep 17 00:00:00 2001 From: SirMalamute Date: Mon, 4 Dec 2023 21:16:58 +0000 Subject: [PATCH 09/14] typo --- .../income/amt/capital_gains/capital_gain_excess_tax_rate.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/policyengine_us/parameters/gov/irs/income/amt/capital_gains/capital_gain_excess_tax_rate.yaml b/policyengine_us/parameters/gov/irs/income/amt/capital_gains/capital_gain_excess_tax_rate.yaml index ebf457d64d6..f5d17cef18a 100644 --- a/policyengine_us/parameters/gov/irs/income/amt/capital_gains/capital_gain_excess_tax_rate.yaml +++ b/policyengine_us/parameters/gov/irs/income/amt/capital_gains/capital_gain_excess_tax_rate.yaml @@ -1,4 +1,4 @@ -description: The IRS multiples the taxable excess capital gains by this rate. +description: The IRS multiplies the taxable excess capital gains by this rate. metadata: unit: /1 label: Alternative Minimum Tax capital gain excess tax rate From 03308637e8d90db840d38c7eab7bced6c3c0e79a Mon Sep 17 00:00:00 2001 From: SirMalamute Date: Mon, 4 Dec 2023 21:17:33 +0000 Subject: [PATCH 10/14] typo --- .../income/amt/capital_gains/capital_gain_excess_tax_rate.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/policyengine_us/parameters/gov/irs/income/amt/capital_gains/capital_gain_excess_tax_rate.yaml b/policyengine_us/parameters/gov/irs/income/amt/capital_gains/capital_gain_excess_tax_rate.yaml index f5d17cef18a..321c3cb86a0 100644 --- a/policyengine_us/parameters/gov/irs/income/amt/capital_gains/capital_gain_excess_tax_rate.yaml +++ b/policyengine_us/parameters/gov/irs/income/amt/capital_gains/capital_gain_excess_tax_rate.yaml @@ -1,4 +1,4 @@ -description: The IRS multiplies the taxable excess capital gains by this rate. +description: The IRS multiplies the taxable excess capital gain by this rate. metadata: unit: /1 label: Alternative Minimum Tax capital gain excess tax rate From b6d1f9e29e891e6b2f3f3fae170d8ba3b1a4751f Mon Sep 17 00:00:00 2001 From: SirMalamute Date: Mon, 4 Dec 2023 21:18:17 +0000 Subject: [PATCH 11/14] changelog edit --- changelog_entry.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog_entry.yaml b/changelog_entry.yaml index df4cfdb355a..154237d104c 100644 --- a/changelog_entry.yaml +++ b/changelog_entry.yaml @@ -1,4 +1,4 @@ - bump: patch changes: fixes: - - Parameterized 25% for Alternative Minimum Tax. + - Parameterized 25% of the Alternative Minimum Tax calculation. From 9721e428a37ffa6b6bb67381770e8e1c37019736 Mon Sep 17 00:00:00 2001 From: SirMalamute Date: Mon, 11 Dec 2023 20:11:59 +0000 Subject: [PATCH 12/14] Parameterize 25% on line 37 of AMT Fixes #3278 --- .../gov/irs/tax/federal_income/alternative_minimum_tax.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/policyengine_us/variables/gov/irs/tax/federal_income/alternative_minimum_tax.py b/policyengine_us/variables/gov/irs/tax/federal_income/alternative_minimum_tax.py index 44d06c79caf..35bbf3f8768 100644 --- a/policyengine_us/variables/gov/irs/tax/federal_income/alternative_minimum_tax.py +++ b/policyengine_us/variables/gov/irs/tax/federal_income/alternative_minimum_tax.py @@ -79,7 +79,7 @@ def formula(tax_unit, period, parameters): # parameterized p = parameters(period).gov.irs.income - dwks38 = p.amt.capital_gain_excess_tax_rate * dwks37 + dwks38 = p.amt.capital_gains.capital_gain_excess_tax_rate * dwks37 # Break in worksheet lines dwks39 = dwks19 + dwks20 + dwks28 + dwks31 + dwks37 dwks40 = dwks1 - dwks39 From 51e430dbdba06ea364d465e1c7273d0ceb528151 Mon Sep 17 00:00:00 2001 From: SirMalamute Date: Mon, 11 Dec 2023 21:19:42 +0000 Subject: [PATCH 13/14] Parameterize 25% on line 37 of AMT Fixes #3278 --- .../amt/capital_gains/capital_gain_excess_tax_rate.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/policyengine_us/parameters/gov/irs/income/amt/capital_gains/capital_gain_excess_tax_rate.yaml b/policyengine_us/parameters/gov/irs/income/amt/capital_gains/capital_gain_excess_tax_rate.yaml index 321c3cb86a0..b7486fbbd29 100644 --- a/policyengine_us/parameters/gov/irs/income/amt/capital_gains/capital_gain_excess_tax_rate.yaml +++ b/policyengine_us/parameters/gov/irs/income/amt/capital_gains/capital_gain_excess_tax_rate.yaml @@ -4,7 +4,7 @@ metadata: label: Alternative Minimum Tax capital gain excess tax rate period: year reference: - - title: 26 U.S. Code § 55 - Alternative minimum tax imposed + - title: 26 U.S.C. § 55 (2018) §55. Alternative minimum tax imposed (b)(3)(E) href: https://www.law.cornell.edu/uscode/text/26/55#b_3_E values: - 2021-01-01: 0.25 + 2018-01-01: 0.25 From 78eea71888fe42254ac42bbb9cb2495f68f2b92a Mon Sep 17 00:00:00 2001 From: Pavel Makarchuk <110687043+PavelMakarchuk@users.noreply.github.com> Date: Wed, 13 Dec 2023 02:10:25 +0100 Subject: [PATCH 14/14] Update policyengine_us/variables/gov/irs/tax/federal_income/alternative_minimum_tax.py --- .../gov/irs/tax/federal_income/alternative_minimum_tax.py | 1 - 1 file changed, 1 deletion(-) diff --git a/policyengine_us/variables/gov/irs/tax/federal_income/alternative_minimum_tax.py b/policyengine_us/variables/gov/irs/tax/federal_income/alternative_minimum_tax.py index 35bbf3f8768..024c8981675 100644 --- a/policyengine_us/variables/gov/irs/tax/federal_income/alternative_minimum_tax.py +++ b/policyengine_us/variables/gov/irs/tax/federal_income/alternative_minimum_tax.py @@ -76,7 +76,6 @@ def formula(tax_unit, period, parameters): dwks36 = max_(0, dwks34 - dwks1) dwks37 = max_(0, dwks33 - dwks36) - # parameterized p = parameters(period).gov.irs.income dwks38 = p.amt.capital_gains.capital_gain_excess_tax_rate * dwks37