Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
 into shuyu7zhan/issue4176
  • Loading branch information
shuyu7zhan committed Mar 25, 2024
2 parents 2dabefc + 96a36af commit f53e96c
Show file tree
Hide file tree
Showing 46 changed files with 610 additions and 263 deletions.
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,24 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.715.0] - 2024-03-25 18:10:17

### Added

- Biden reform to tax LTCG and qualified dividends as ordinary income for high-income filers.

## [0.714.0] - 2024-03-25 15:54:18

### Fixed

- Maryland earned income tax credit.

## [0.713.3] - 2024-03-25 15:14:47

### Fixed

- Bug in filing status logic causing tax unit spouses to appear in separate returns.

## [0.713.2] - 2024-03-24 03:38:17

### Added
Expand Down Expand Up @@ -7974,6 +7992,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0



[0.715.0]: https://github.com/PolicyEngine/policyengine-us/compare/0.714.0...0.715.0
[0.714.0]: https://github.com/PolicyEngine/policyengine-us/compare/0.713.3...0.714.0
[0.713.3]: https://github.com/PolicyEngine/policyengine-us/compare/0.713.2...0.713.3
[0.713.2]: https://github.com/PolicyEngine/policyengine-us/compare/0.713.1...0.713.2
[0.713.1]: https://github.com/PolicyEngine/policyengine-us/compare/0.713.0...0.713.1
[0.713.0]: https://github.com/PolicyEngine/policyengine-us/compare/0.712.0...0.713.0
Expand Down
16 changes: 16 additions & 0 deletions changelog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6803,3 +6803,19 @@
added:
- Longer history and source for Social Security benefits target.
date: 2024-03-24 03:38:17
- bump: patch
changes:
fixed:
- Bug in filing status logic causing tax unit spouses to appear in separate returns.
date: 2024-03-25 15:14:47
- bump: minor
changes:
fixed:
- Maryland earned income tax credit.
date: 2024-03-25 15:54:18
- bump: minor
changes:
added:
- Biden reform to tax LTCG and qualified dividends as ordinary income for high-income
filers.
date: 2024-03-25 18:10:17
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Tax capital gains income as ordinary income
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
description: The proposal of President Biden to tax capital income as ordinary is active if this is true.
metadata:
unit: bool
period: year
label: Capital income over threshold taxed as ordinary income
reference:
- title: General Explanations of the Administration's Fiscal Year 2025 Revenue Proposals
href: https://home.treasury.gov/system/files/131/General-Explanations-FY2025.pdf#page=88

values:
0000-01-01: false
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
description: President Biden proposed taxing as ordinary income the excess of capital income above these thresholds, by filing status.
metadata:
reference:
- title: General Explanations of the Administration's Fiscal Year 2025 Revenue Proposals
href: https://home.treasury.gov/system/files/131/General-Explanations-FY2025.pdf#page=88
label: Threshold above which capital income is taxed as ordinary income
unit: currency-USD
period: year
uprating: gov.irs.uprating

breakdown:
- filing_status
JOINT:
2024-01-01: 1_000_000
SINGLE:
2024-01-01: 1_000_000
SEPARATE:
2024-01-01: 500_000
HEAD_OF_HOUSEHOLD:
2024-01-01: 1_000_000
WIDOW:
2024-01-01: 1_000_000

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
description: Maryland matches this percent of the federal Earned Income Tax Credit as a non-refundable credit for filers who are not single and childless.
description: Maryland matches this percent of the federal Earned Income Tax Credit for individuals with qualifying child or married couples filing jointly or separately with or without a qualifying child.
values:
2019-01-01: 0.5
metadata:
Expand All @@ -7,3 +7,6 @@ metadata:
reference:
- title: Md. Code, Tax-Gen. § 10-704(c)(1)(i)
href: https://casetext.com/statute/code-of-maryland/article-tax-general/title-10-income-tax/subtitle-7-income-tax-credits/section-10-704-effective-until-6302023-for-earned-income
- title: 2021 Maryland Resident Booklet Individual
href: https://www.marylandtaxes.gov/forms/21_forms/Resident_Booklet.pdf#page=19
# you may claim one-half (50%) of the federal credit on your Maryland return.
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
description: Maryland matches this percentage of the federal Earned Income Tax Credit to individuals without a qualifying child.
values:
2019-01-01: 1
metadata:
unit: /1
period: year
label: Maryland childless EITC match
reference:
- title: Md. Code, Tax-Gen. § 10-704(c)(3)(ii)
href: https://casetext.com/statute/code-of-maryland/article-tax-general/title-10-income-tax/subtitle-7-income-tax-credits/section-10-704-effective-until-6302023-for-earned-income
- title: 2021 Maryland Resident Booklet Individual
href: https://www.marylandtaxes.gov/forms/21_forms/Resident_Booklet.pdf#page=19
# Individuals filing as single, head of household, or qualifying widow(er) without a qualifying child
# may claim 100% of the federal earned income credit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
description: Maryland provides up to this amount for its Earned Income Tax Credit to single childless filers.
description: Maryland provides up to this amount for its Earned Income Tax Credit to individuals without a qualifying child.
values:
2019-01-01: 530
2023-01-01: .inf
Expand All @@ -9,5 +9,8 @@ metadata:
reference:
- title: Md. Code, Tax-Gen. § 10-704(c)(3)(iii)
href: https://casetext.com/statute/code-of-maryland/article-tax-general/title-10-income-tax/subtitle-7-income-tax-credits/section-10-704-effective-until-6302023-for-earned-income
# Individuals filing as single, head of household, or qualifying widow(er) without a qualifying child
- title: 2021 Maryland Resident Booklet Individual
href: https://www.marylandtaxes.gov/forms/21_forms/Resident_Booklet.pdf#page=19
- title: Family Prosperity Act of 2023
href: https://mgaleg.maryland.gov/2023RS/fnotes/bil_0007/hb0547.pdf
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ description: Maryland list of non-refundable tax credits.
values:
2020-01-01:
- md_cdcc
- md_non_single_childless_non_refundable_eitc
- md_non_refundable_eitc
- md_poverty_line_credit
2022-01-01:
- md_cdcc
- md_non_single_childless_non_refundable_eitc
- md_non_refundable_eitc
- md_poverty_line_credit
- md_senior_tax_credit
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@ description: Maryland list of refundable tax credits.
values:
2020-01-01:
- md_refundable_cdcc
- md_non_single_childless_refundable_eitc
- md_single_childless_eitc
- md_refundable_eitc
- md_ctc
4 changes: 4 additions & 0 deletions policyengine_us/reforms/biden/budget_2025/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
from .medicare_and_investment_tax_increase import (
create_medicare_and_investment_tax_increase_reform,
)

from .capital_gains_tax_increase import (
create_capital_gains_tax_increase_reform,
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
from policyengine_us.model_api import *


def create_capital_gains_tax_increase() -> Reform:
class capital_gains_tax(Variable):
value_type = float
entity = TaxUnit
label = "Maximum income tax after capital gains tax"
unit = USD
definition_period = YEAR

def formula(tax_unit, period, parameters):
net_cg = tax_unit("net_capital_gain", period)
taxable_income = tax_unit("taxable_income", period)
adjusted_net_cg = min_(
tax_unit("adjusted_net_capital_gain", period),
taxable_income,
) # ANCG is referred to in all cases as ANCG or taxable income if less.

cg = parameters(period).gov.irs.capital_gains

excluded_cg = tax_unit(
"capital_gains_excluded_from_taxable_income", period
)
non_cg_taxable_income = max_(0, taxable_income - excluded_cg)
income_less_ancg = max_(0, taxable_income - adjusted_net_cg)

filing_status = tax_unit("filing_status", period)

first_threshold = cg.brackets.thresholds["1"][filing_status]
second_threshold = cg.brackets.thresholds["2"][filing_status]

income_ordinarily_under_second_rate = clip(
taxable_income, 0, first_threshold
)

income_ordinarily_under_third_rate = clip(
taxable_income, 0, second_threshold
)

# The 2025 Biden Budget taxes the excess of long-term capital gains and qualified dividends
# over $1 million as ordinary income.
# We apply this only to ANCG, not Unrecaptured Section 1250 Gain or the 28% rate CG.

p_reform = parameters(
period
).gov.contrib.biden.budget_2025.capital_gains
income_threshold = p_reform.income_threshold[filing_status]
excess_income = max_(0, taxable_income - income_threshold)

cg_in_top_bracket = min_(adjusted_net_cg, excess_income)

income_tax = parameters(period).gov.irs.income.bracket.rates["7"]

new_cg_tax = cg_in_top_bracket * income_tax

cg_in_first_bracket = max_(
0, income_ordinarily_under_second_rate - income_less_ancg
)

cg_in_first_bracket_below_top_bracket = max_(
cg_in_first_bracket - cg_in_top_bracket, 0
)

cg_in_second_bracket = min_(
max_(
0, adjusted_net_cg - cg_in_first_bracket_below_top_bracket
),
max_(
0,
income_ordinarily_under_third_rate
- (
non_cg_taxable_income
+ cg_in_first_bracket_below_top_bracket
),
),
)

cg_in_second_bracket_below_top_bracket = max_(
cg_in_second_bracket - cg_in_top_bracket, 0
)

cg_in_third_bracket = max_(
adjusted_net_cg
- cg_in_first_bracket_below_top_bracket
- cg_in_second_bracket_below_top_bracket,
0,
)

cg_in_third_bracket_below_top_bracket = max_(
cg_in_third_bracket - cg_in_top_bracket, 0
)

main_cg_tax = (
cg_in_first_bracket_below_top_bracket * cg.brackets.rates["1"]
+ cg_in_second_bracket_below_top_bracket
* cg.brackets.rates["2"]
+ cg_in_third_bracket_below_top_bracket
* cg.brackets.rates["3"]
+ new_cg_tax
)

unrecaptured_s_1250_gain = tax_unit(
"unrecaptured_section_1250_gain", period
)

qualified_dividends = add(
tax_unit, period, ["qualified_dividend_income"]
)

max_taxable_unrecaptured_gain = min_(
unrecaptured_s_1250_gain,
max_(0, net_cg - qualified_dividends),
)
unrecaptured_gain_deduction = max_(
non_cg_taxable_income + net_cg - taxable_income,
0,
)
taxable_unrecaptured_gain = max_(
max_taxable_unrecaptured_gain - unrecaptured_gain_deduction,
0,
)

unrecaptured_gain_tax = (
cg.unrecaptured_s_1250_rate * taxable_unrecaptured_gain
)

remaining_cg_tax = (
tax_unit("capital_gains_28_percent_rate_gain", period)
* cg.other_cg_rate
)
return main_cg_tax + unrecaptured_gain_tax + remaining_cg_tax

class reform(Reform):
def apply(self):
self.update_variable(capital_gains_tax)

return reform


def create_capital_gains_tax_increase_reform(
parameters, period, bypass: bool = False
):
if bypass:
return create_capital_gains_tax_increase()

p = parameters(period).gov.contrib.biden.budget_2025.capital_gains

if p.active:
return create_capital_gains_tax_increase()
else:
return None


capital_gains_tax_increase = create_capital_gains_tax_increase_reform(
None, None, bypass=True
)
5 changes: 5 additions & 0 deletions policyengine_us/reforms/reforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
from .biden.budget_2025 import (
create_medicare_and_investment_tax_increase_reform,
)
from .biden.budget_2025 import create_capital_gains_tax_increase_reform
from policyengine_core.reforms import Reform
import warnings

Expand Down Expand Up @@ -50,6 +51,9 @@ def create_structural_reforms_from_parameters(parameters, period):
reported_state_income_tax = create_reported_state_income_tax_reform(
parameters, period
)
capital_gains_tax_increase = create_capital_gains_tax_increase_reform(
parameters, period
)

reforms = [
afa_reform,
Expand All @@ -63,6 +67,7 @@ def create_structural_reforms_from_parameters(parameters, period):
abolish_payroll_tax,
reported_state_income_tax,
medicare_and_investment_tax_increase,
capital_gains_tax_increase,
]
reforms = tuple(filter(lambda x: x is not None, reforms))

Expand Down
Loading

0 comments on commit f53e96c

Please sign in to comment.