diff --git a/changelog.d/fix-breakdown-parameter-uprating.fixed.md b/changelog.d/fix-breakdown-parameter-uprating.fixed.md new file mode 100644 index 00000000000..9ee47ae9d2c --- /dev/null +++ b/changelog.d/fix-breakdown-parameter-uprating.fixed.md @@ -0,0 +1,2 @@ +Activated filing-status parameter uprating for Colorado's CollegeInvest subtraction, legacy personal exemption phaseout thresholds, and the Biden FY2025 capital gains proposal, and added Colorado's published 2026 limits. +Corrected the 2032 head-of-household exemption phaseout threshold to match CBO's January 2025 forecast. diff --git a/policyengine_us/parameters/gov/contrib/biden/budget_2025/capital_gains/income_threshold.yaml b/policyengine_us/parameters/gov/contrib/biden/budget_2025/capital_gains/income_threshold.yaml index 183952a3ca7..9b93fa57f60 100644 --- a/policyengine_us/parameters/gov/contrib/biden/budget_2025/capital_gains/income_threshold.yaml +++ b/policyengine_us/parameters/gov/contrib/biden/budget_2025/capital_gains/income_threshold.yaml @@ -6,6 +6,9 @@ metadata: label: Threshold above which capital income is taxed as ordinary income unit: currency-USD period: year + propagate_metadata_to_children: true + # Treasury proposes indexing these thresholds after 2024 without specifying an index + # or rounding interval; use the existing IRS inflation index for projections. uprating: gov.irs.uprating breakdown: diff --git a/policyengine_us/parameters/gov/irs/income/exemption/phase_out/start.yaml b/policyengine_us/parameters/gov/irs/income/exemption/phase_out/start.yaml index ec4a2083852..5a0fb2dfad7 100644 --- a/policyengine_us/parameters/gov/irs/income/exemption/phase_out/start.yaml +++ b/policyengine_us/parameters/gov/irs/income/exemption/phase_out/start.yaml @@ -4,16 +4,21 @@ metadata: breakdown: - filing_status unit: currency-USD - # This parent uprating remains inactive pending selective propagation in PolicyEngine/policyengine-core#537. + # Keep CBO's legacy forecasts for counterfactual reforms; personal exemptions + # remain suspended under current law. Project from the final forecast year. + # Under historical section 68(b), round down to $50 before halving the + # joint amount for separate filers. Set child rounding to preserve that order. uprating: gov.irs.uprating reference: - title: 26 U.S. Code § 151 - Allowance of deductions for personal exemptions (d)(3)(B) href: https://www.law.cornell.edu/uscode/text/26/151#d_3_B - - title: 26 U.S. Code § 68 - Overall limitation on itemized deductions (b)(1) - href: https://www.law.cornell.edu/uscode/text/26/68#b_1 + - title: 26 U.S.C. 68(b) (2024 edition), applicable amount and inflation adjustment + href: https://www.govinfo.gov/content/pkg/USCODE-2024-title26/html/USCODE-2024-title26-subtitleA-chap1-subchapB-partI-sec68.htm - title: CBO Tax Parameters and Effective Marginal Tax Rates | Jan 2025 # 1. Tax Parameters. href: https://www.cbo.gov/data/budget-economic-data + - title: CBO January 2025 tax parameter forecasts + href: https://raw.githubusercontent.com/US-CBO/cbo-data/main/data/budget/tax_parameters/annual_cy_2025-01.csv JOINT: values: @@ -36,6 +41,11 @@ JOINT: 2035-01-01: 487_400 metadata: unit: currency-USD + uprating: + parameter: gov.irs.uprating + rounding: + type: downwards + interval: 50 SINGLE: values: 2013-01-01: 250_000 @@ -57,6 +67,11 @@ SINGLE: 2035-01-01: 406_200 metadata: unit: currency-USD + uprating: + parameter: gov.irs.uprating + rounding: + type: downwards + interval: 50 SEPARATE: values: 2013-01-01: 150_000 @@ -78,6 +93,11 @@ SEPARATE: 2035-01-01: 243_700 metadata: unit: currency-USD + uprating: + parameter: gov.irs.uprating + rounding: + type: downwards + interval: 25 HEAD_OF_HOUSEHOLD: values: 2013-01-01: 275_000 @@ -93,12 +113,17 @@ HEAD_OF_HOUSEHOLD: 2029-01-01: 397_200 2030-01-01: 405_000 2031-01-01: 413_050 - 2032-01-01: 421_050 + 2032-01-01: 421_200 2033-01-01: 429_550 2034-01-01: 438_100 2035-01-01: 446_800 metadata: unit: currency-USD + uprating: + parameter: gov.irs.uprating + rounding: + type: downwards + interval: 50 SURVIVING_SPOUSE: values: 2013-01-01: 300_000 @@ -120,3 +145,8 @@ SURVIVING_SPOUSE: 2035-01-01: 487_400 metadata: unit: currency-USD + uprating: + parameter: gov.irs.uprating + rounding: + type: downwards + interval: 50 diff --git a/policyengine_us/parameters/gov/states/co/tax/income/rate.yaml b/policyengine_us/parameters/gov/states/co/tax/income/rate.yaml index e69f5b6aa02..c06f52733ec 100644 --- a/policyengine_us/parameters/gov/states/co/tax/income/rate.yaml +++ b/policyengine_us/parameters/gov/states/co/tax/income/rate.yaml @@ -6,9 +6,9 @@ metadata: # THE FOLLOWING THREE REFERENCES JOINTLY DETERMINE THE TAX RATE ON THE FORM reference: - title: Colorado Legislation, C.R.S. 39-22-104 (1.5), (1.7) (a), (b) - href: https://law.justia.com/codes/colorado/2022/title-39/article-22/part-1/section-39-22-104/ + href: https://content.leg.colorado.gov/sites/default/files/images/olls/crs2024-title-39.pdf#page=387 - title: Colorado Constitution, Article 10, Taxpayer's Bill of Rights (TABOR) - href: https://law.justia.com/constitution/colorado/cnart10.html + href: https://content.leg.colorado.gov/sites/default/files/images/olls/crs2024-title-00.pdf#page=102 - title: Colorado Proposition 121, passed by the electorate in November 2022 href: https://leg.colorado.gov/sites/default/files/initiative%2520referendum_proposition%20121%20final%20lc%20packet.pdf#page=1 - title: 2021 Colorado Individual Income Tax Filing Guide, 104 Book diff --git a/policyengine_us/parameters/gov/states/co/tax/income/subtractions/collegeinvest_contribution/max_amount.yaml b/policyengine_us/parameters/gov/states/co/tax/income/subtractions/collegeinvest_contribution/max_amount.yaml index 74ec81f366f..3e1cdfe3b8e 100644 --- a/policyengine_us/parameters/gov/states/co/tax/income/subtractions/collegeinvest_contribution/max_amount.yaml +++ b/policyengine_us/parameters/gov/states/co/tax/income/subtractions/collegeinvest_contribution/max_amount.yaml @@ -5,22 +5,29 @@ metadata: label: Colorado CollegeInvest contribution subtraction max amount breakdown: - filing_status - # This parent uprating remains inactive pending selective propagation in PolicyEngine/policyengine-core#537. + propagate_metadata_to_children: true + # Project beyond published limits with the IRS inflation index as a proxy. + # Under C.R.S. 39-22-104(4)(i)(II)(C), the Department of Higher Education + # supplies annual tuition, room and board cost changes for state colleges. + # The Department of Revenue may round limits to the nearest $100. uprating: parameter: gov.irs.uprating rounding: type: nearest interval: 100 -# Rounded to $100 per C.R.S. 39-22-104(4)(j)(II)(C), this approximates the true uprating for college tuition, room, and board. reference: - - title: C.R.S. 39-22-104(4)(j)(II)(B) - href: https://law.justia.com/codes/colorado/2022/title-39/article-22/part-1/section-39-22-104/ + - title: "C.R.S. 39-22-104(4)(i)(II)(B)-(C) #page 392-393" + href: https://content.leg.colorado.gov/sites/default/files/images/olls/crs2024-title-39.pdf#page=392 - title: 2023 Colorado Individual Tax Filing Guide 104 Book - Subtractions Line 10 href: https://tax.colorado.gov/sites/tax/files/documents/Book0104_2023.pdf#page=13 - title: 2024 Colorado Individual Tax Filing Guide 104 Book - Subtractions Line 10 href: https://tax.colorado.gov/sites/tax/files/documents/DR0104_book_2024.pdf#page=20 - title: 2025 Colorado Individual Tax Filing Guide 104 Book, Subtractions Line 10 href: https://tax.colorado.gov/sites/tax/files/documents/Book104_2025.pdf#page=20 + - title: Colorado Department of Revenue - CollegeInvest Contribution Subtraction, Per-Beneficiary Limits + href: https://tax.colorado.gov/income-tax-topics-collegeinvest-contribution-subtraction + - title: Colorado Department of Revenue - CollegeInvest Contribution Subtraction, November 2026 + href: https://tax.colorado.gov/sites/default/files/2026-11/ITT_CollegeInvest_Contribution_Subtraction_Nov_2026.pdf#page=2 HEAD_OF_HOUSEHOLD: values: @@ -29,6 +36,7 @@ HEAD_OF_HOUSEHOLD: 2023-01-01: 20_700 2024-01-01: 22_700 2025-01-01: 25_400 + 2026-01-01: 26_200 metadata: unit: currency-USD period: year @@ -39,6 +47,7 @@ JOINT: 2023-01-01: 31_000 2024-01-01: 34_000 2025-01-01: 38_100 + 2026-01-01: 39_200 metadata: unit: currency-USD period: year @@ -49,6 +58,7 @@ SEPARATE: 2023-01-01: 20_700 2024-01-01: 22_700 2025-01-01: 25_400 + 2026-01-01: 26_200 metadata: unit: currency-USD period: year @@ -59,6 +69,7 @@ SINGLE: 2023-01-01: 20_700 2024-01-01: 22_700 2025-01-01: 25_400 + 2026-01-01: 26_200 metadata: unit: currency-USD period: year @@ -69,6 +80,7 @@ SURVIVING_SPOUSE: 2023-01-01: 20_700 2024-01-01: 22_700 2025-01-01: 25_400 + 2026-01-01: 26_200 metadata: unit: currency-USD period: year diff --git a/policyengine_us/tests/code_health/test_uprating_placement.py b/policyengine_us/tests/code_health/test_uprating_placement.py index 5b82e900d1d..be9dec71cf9 100644 --- a/policyengine_us/tests/code_health/test_uprating_placement.py +++ b/policyengine_us/tests/code_health/test_uprating_placement.py @@ -1,6 +1,10 @@ +import pytest import yaml +from policyengine_core.parameters import Parameter, ParameterNode +from policyengine_core.parameters.operations import propagate_parameter_metadata from policyengine_us.model_api import REPO +from policyengine_us.system import system PARAMETERS_ROOT = REPO / "parameters" @@ -92,3 +96,68 @@ def test_no_uprating_block_is_a_sibling_of_values(): " parameter: ...\n" "Offending nodes:\n" + "\n".join(violations) ) + + +def _find_unapplied_breakdown_uprating(root): + """Find parent uprating that reaches no metadata on some scalar leaves.""" + violations = {} + for node in root.get_descendants(): + if not isinstance(node, ParameterNode): + continue + if not node.metadata.get("breakdown"): + continue + if node.metadata.get("uprating") is None: + continue + missing = [ + leaf.name + for leaf in node.get_descendants() + if isinstance(leaf, Parameter) and leaf.metadata.get("uprating") is None + ] + if missing: + violations[node.name] = missing + return violations + + +def test_parent_uprating_reaches_breakdown_leaves(): + violations = _find_unapplied_breakdown_uprating(system.parameters) + assert not violations, ( + "The built parameter system omits uprating from leaves below parents " + "that declare both breakdown and uprating metadata. Add uprating to " + "each leaf, enable metadata propagation, or remove unsupported parent " + "uprating:\n" + + "\n".join( + f"{parent}: {', '.join(leaves)}" + for parent, leaves in sorted(violations.items()) + ) + ) + + +@pytest.mark.parametrize( + "propagation, leaf_uprating, missing", + [ + (None, (), ("SINGLE", "JOINT")), + (True, (), ()), + (False, (), ("SINGLE", "JOINT")), + (False, ("SINGLE", "JOINT"), ()), + (False, ("SINGLE",), ("JOINT",)), + ], +) +def test_detect_unapplied_parent_uprating(propagation, leaf_uprating, missing): + metadata = { + "breakdown": ["filing_status"], + "uprating": "price_index", + } + if propagation is not None: + metadata["propagate_metadata_to_children"] = propagation + threshold = {"metadata": metadata} + for status in ("SINGLE", "JOINT"): + threshold[status] = {"values": {"2024-01-01": 100}} + if status in leaf_uprating: + threshold[status]["metadata"] = {"uprating": "price_index"} + root = ParameterNode("", data={"threshold": threshold}) + propagate_parameter_metadata(root) + + expected = ( + {"threshold": [f"threshold.{status}" for status in missing]} if missing else {} + ) + assert _find_unapplied_breakdown_uprating(root) == expected diff --git a/policyengine_us/tests/core/test_breakdown_parameter_uprating.py b/policyengine_us/tests/core/test_breakdown_parameter_uprating.py new file mode 100644 index 00000000000..03d5afa24ab --- /dev/null +++ b/policyengine_us/tests/core/test_breakdown_parameter_uprating.py @@ -0,0 +1,169 @@ +"""Check Core's uprating of filing-status parameter children. + +Household YAML tests cannot read parameter values directly. These tests reuse +the built system to check projections, rounding and preservation of authored +values without constructing another model or household simulation. +""" + +from pathlib import Path + +import pytest +import yaml +from hypothesis import example, given, settings +from hypothesis import strategies as st +from policyengine_core.parameters import get_parameter + +from policyengine_us.system import system + + +STATUSES = ( + "SINGLE", + "SEPARATE", + "JOINT", + "HEAD_OF_HOUSEHOLD", + "SURVIVING_SPOUSE", +) +CO_PATH = "gov.states.co.tax.income.subtractions.collegeinvest_contribution.max_amount" +PEP_PATH = "gov.irs.income.exemption.phase_out.start" +BIDEN_PATH = "gov.contrib.biden.budget_2025.capital_gains.income_threshold" +PEP_ANCHORS = { + "SINGLE": 406_200, + "SEPARATE": 243_700, + "JOINT": 487_400, + "HEAD_OF_HOUSEHOLD": 446_800, + "SURVIVING_SPOUSE": 487_400, +} +PARAMETER_ROOT = Path(__file__).resolve().parents[2] / "parameters" +PROPERTY_SETTINGS = { + "max_examples": 20, + "deadline": None, + "derandomize": True, + "database": None, +} + + +def _value(path, status, year): + return get_parameter(system.parameters, f"{path}.{status}")(f"{year}-01-01") + + +def _irs_factor(year, anchor_year): + index = system.parameters.gov.irs.uprating + return index(f"{year}-01-01") / index(f"{anchor_year}-01-01") + + +def _authored_values(): + cases = [] + for path in (CO_PATH, PEP_PATH, BIDEN_PATH): + filename = PARAMETER_ROOT / f"{path.replace('.', '/')}.yaml" + data = yaml.safe_load(filename.read_text()) + for status in STATUSES: + for date, entry in data[status]["values"].items(): + value = entry["value"] if isinstance(entry, dict) else entry + cases.append((path, status, str(date), value)) + return tuple(cases) + + +AUTHORED_VALUES = _authored_values() + + +@pytest.mark.parametrize("status", STATUSES) +def test_colorado_2027_projects_from_published_2026_limit(status): + # Colorado publishes $39,200 for joint filers and $26,200 otherwise. + # The retained IRS-index proxy rounds the projected amount to $100. + # 26,200 * 181.97958333333335 / 176.71308333333332 = 26,980.8267 -> 27,000. + # 39,200 * 181.97958333333335 / 176.71308333333332 = 40,368.2598 -> 40,400. + anchor = 39_200 if status == "JOINT" else 26_200 + expected = 40_400 if status == "JOINT" else 27_000 + assert _value(CO_PATH, status, 2027) == expected + assert expected > anchor + + +@pytest.mark.parametrize("status", STATUSES) +def test_personal_exemption_2036_projects_after_last_cbo_forecast(status): + # Use CBO's 2035 forecasts as anchors. Under historical IRC 68(b), round + # down to $50; separate filers receive half the joint amount. + # Multiply by 217.05 / 212.85, then round down: + # single: 406,200 * factor = 414,215.222 -> 414,200; + # separate: 243,700 * factor = 248,508.739 -> 248,500; + # joint/surviving spouse: 487,400 * factor = 497,017.477 -> 497,000; + # head of household: 446,800 * factor = 455,616.350 -> 455,600. + expected = { + "SINGLE": 414_200, + "SEPARATE": 248_500, + "JOINT": 497_000, + "HEAD_OF_HOUSEHOLD": 455_600, + "SURVIVING_SPOUSE": 497_000, + }[status] + assert _value(PEP_PATH, status, 2036) == expected + assert expected > PEP_ANCHORS[status] + + +@pytest.mark.parametrize("status", STATUSES) +def test_biden_2025_projects_from_proposed_2024_threshold(status): + # Treasury proposes indexing $1 million ($500,000 for separate filers) + # after 2024 in its FY2025 proposal, without specifying a rounding interval. + # 1,000,000 * 172.797 / 167.95475 = 1,028,830.6820735942; + # separate filers receive half: 514,415.3410367971. + anchor = 500_000 if status == "SEPARATE" else 1_000_000 + expected = 514_415.3410367971 if status == "SEPARATE" else 1_028_830.6820735942 + assert _value(BIDEN_PATH, status, 2025) == pytest.approx( + expected, rel=1e-12, abs=1e-8 + ) + assert expected > anchor + + +@settings(**PROPERTY_SETTINGS) +@given(year=st.integers(2027, 2100), status=st.sampled_from(STATUSES)) +@example(year=2100, status="SEPARATE") +def test_colorado_projection_rounding_bounds_and_order(year, status): + anchor = 39_200 if status == "JOINT" else 26_200 + value = _value(CO_PATH, status, year) + unrounded = anchor * _irs_factor(year, 2026) + assert value % 100 == 0 + assert abs(value - unrounded) <= 50 + assert value >= _value(CO_PATH, status, year - 1) + assert value > anchor + assert _value(CO_PATH, "SURVIVING_SPOUSE", year) == _value(CO_PATH, "SINGLE", year) + + +@settings(**PROPERTY_SETTINGS) +@given(year=st.integers(2036, 2100), status=st.sampled_from(STATUSES)) +@example(year=2100, status="SEPARATE") +@example(year=2043, status="SEPARATE") +def test_personal_exemption_projection_rounding_bounds_and_order(year, status): + assert system.parameters.gov.irs.income.exemption.suspended(f"{year}-01-01") + value = _value(PEP_PATH, status, year) + interval = 25 if status == "SEPARATE" else 50 + unrounded = PEP_ANCHORS[status] * _irs_factor(year, 2035) + assert value % interval == 0 + assert 0 <= unrounded - value < interval + assert value >= _value(PEP_PATH, status, year - 1) + assert value > PEP_ANCHORS[status] + joint = _value(PEP_PATH, "JOINT", year) + assert _value(PEP_PATH, "SEPARATE", year) == joint / 2 + assert _value(PEP_PATH, "SURVIVING_SPOUSE", year) == joint + + +@settings(**PROPERTY_SETTINGS) +@given(year=st.integers(2025, 2100), status=st.sampled_from(STATUSES)) +@example(year=2100, status="SEPARATE") +def test_biden_projection_tracks_index_and_filing_status_ratios(year, status): + assert not system.parameters.gov.contrib.biden.budget_2025.capital_gains.active( + f"{year}-01-01" + ) + anchor = 500_000 if status == "SEPARATE" else 1_000_000 + value = _value(BIDEN_PATH, status, year) + assert value / anchor == pytest.approx(_irs_factor(year, 2024), rel=1e-12) + assert value >= _value(BIDEN_PATH, status, year - 1) + assert value > anchor + joint = _value(BIDEN_PATH, "JOINT", year) + assert _value(BIDEN_PATH, "SEPARATE", year) == pytest.approx(joint / 2, rel=1e-12) + for same_threshold in ("SINGLE", "HEAD_OF_HOUSEHOLD", "SURVIVING_SPOUSE"): + assert _value(BIDEN_PATH, same_threshold, year) == joint + + +@pytest.mark.parametrize("case", AUTHORED_VALUES) +def test_uprating_preserves_authored_values(case): + path, status, date, expected = case + actual = get_parameter(system.parameters, f"{path}.{status}")(date) + assert actual == expected diff --git a/policyengine_us/tests/policy/baseline/gov/irs/income/taxable_income/exemptions/exemptions.yaml b/policyengine_us/tests/policy/baseline/gov/irs/income/taxable_income/exemptions/exemptions.yaml index 62cf0ec1fe3..168aafa2028 100644 --- a/policyengine_us/tests/policy/baseline/gov/irs/income/taxable_income/exemptions/exemptions.yaml +++ b/policyengine_us/tests/policy/baseline/gov/irs/income/taxable_income/exemptions/exemptions.yaml @@ -196,3 +196,80 @@ exemptions_count: 2 output: exemptions: 0 + +# Congress keeps personal exemptions suspended after 2017. +- name: Personal exemptions remain zero under current law after 2035 + period: 2036 + input: + exemptions_count: [1, 1, 1, 1, 1] + adjusted_gross_income: [0, 414_199, 414_200, 414_201, 1_000_000] + filing_status: [SINGLE, SINGLE, SINGLE, SINGLE, SINGLE] + output: + exemptions: [0, 0, 0, 0, 0] + +# Isolate the legacy threshold in a counterfactual with a $1,000 exemption. +# 406,200 * 217.05 / 212.85 = 414,215.22199, rounded down to $50 = 414,200. +# Filers lose 2% for each $2,500, or fraction of $2,500, of AGI above the +# threshold (IRC 151(d)(3)(B)): $1 and $2,500 above it each make one step. +# One step phases out 2% * $1,000 = $20. +- name: A restored exemption uses the projected single phaseout threshold + period: 2036 + absolute_error_margin: 0.001 + input: + gov.irs.income.exemption.suspended: false + gov.irs.income.exemption.amount: 1_000 + exemptions_count: [1, 1, 1, 1] + adjusted_gross_income: [414_199, 414_200, 414_201, 416_700] + filing_status: [SINGLE, SINGLE, SINGLE, SINGLE] + output: + exemptions: [1_000, 1_000, 980, 980] + +# CBO gives the 2032 head-of-household threshold as $421,200 in its January 2025 CSV: +# https://raw.githubusercontent.com/US-CBO/cbo-data/main/data/budget/tax_parameters/annual_cy_2025-01.csv +# At $421,200, excess AGI = $0. At $421,201, $1 / $2,500 rounds up to 1 step; +# at $423,700, $2,500 / $2,500 = 1 step. +# $1,000 * (1 - 1 * 0.02) = $980 after one step. +- name: A restored exemption uses CBO's 2032 head-of-household threshold + period: 2032 + absolute_error_margin: 0.001 + input: + gov.irs.income.exemption.suspended: false + gov.irs.income.exemption.amount: 1_000 + exemptions_count: [1, 1, 1, 1] + adjusted_gross_income: [421_199, 421_200, 421_201, 423_700] + filing_status: [HEAD_OF_HOUSEHOLD, HEAD_OF_HOUSEHOLD, HEAD_OF_HOUSEHOLD, HEAD_OF_HOUSEHOLD] + output: + exemptions: [1_000, 1_000, 980, 980] + +# 243,700 * 217.05 / 212.85 = 248,508.73855 -> 248,500 (down to $25). +# Separate filers lose 2% for each $1,250, or fraction of $1,250, above the +# threshold: $1 and $1,250 above it each phase out 2% * $1,000 = $20. +- name: A restored exemption uses half the joint threshold for separate filers + period: 2036 + absolute_error_margin: 0.001 + input: + gov.irs.income.exemption.suspended: false + gov.irs.income.exemption.amount: 1_000 + exemptions_count: [1, 1, 1, 1] + adjusted_gross_income: [248_499, 248_500, 248_501, 249_750] + filing_status: [SEPARATE, SEPARATE, SEPARATE, SEPARATE] + output: + exemptions: [1_000, 1_000, 980, 980] + +# 487,400 * (217.05 / 212.85)^3 = 516,825.49806 in 2038. +# Round down to $50 = $516,800; rounding to nearest would give $516,850. +# At $516,801, ($516,801 - $516,800) / $2,500 rounds up to 1 step, so the +# exemption falls to $1,000 * (1 - 1 * 0.02) = $980. A $516,850 threshold +# would leave $1,000. +# At $519,300, ($519,300 - $516,800) / $2,500 = 1 step: $980. +- name: A restored exemption rounds the projected joint threshold down + period: 2038 + absolute_error_margin: 0.001 + input: + gov.irs.income.exemption.suspended: false + gov.irs.income.exemption.amount: 1_000 + exemptions_count: [1, 1, 1, 1] + adjusted_gross_income: [516_799, 516_800, 516_801, 519_300] + filing_status: [JOINT, JOINT, JOINT, JOINT] + output: + exemptions: [1_000, 1_000, 980, 980] diff --git a/policyengine_us/tests/policy/baseline/gov/states/co/tax/income/subtractions/collegeinvest_contribution/co_collegeinvest_contribution.yaml b/policyengine_us/tests/policy/baseline/gov/states/co/tax/income/subtractions/collegeinvest_contribution/co_collegeinvest_contribution.yaml index ef9bdf73d0a..5c5f136496f 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/co/tax/income/subtractions/collegeinvest_contribution/co_collegeinvest_contribution.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/co/tax/income/subtractions/collegeinvest_contribution/co_collegeinvest_contribution.yaml @@ -37,3 +37,62 @@ output: co_collegeinvest_subtraction: 25_000 # below capped amount + +# Colorado DOR publishes 2026 limits of $26,200 and $39,200. +# Subtract min(contribution, filing-status limit), including at either side. +- name: Single filers subtract contributions up to the published 2026 limit + period: 2026 + input: + investment_in_529_plan: [26_199, 26_200, 26_201] + filing_status: [SINGLE, SINGLE, SINGLE] + state_code: [CO, CO, CO] + output: + co_collegeinvest_subtraction: [26_199, 26_200, 26_200] + +- name: Joint filers subtract contributions up to the published 2026 limit + period: 2026 + input: + investment_in_529_plan: [39_199, 39_200, 39_201] + filing_status: [JOINT, JOINT, JOINT] + state_code: [CO, CO, CO] + output: + co_collegeinvest_subtraction: [39_199, 39_200, 39_200] + +- name: Other filing statuses use the published 2026 single limit + period: 2026 + input: + investment_in_529_plan: [50_000, 50_000, 50_000] + filing_status: [SEPARATE, HEAD_OF_HOUSEHOLD, SURVIVING_SPOUSE] + state_code: [CO, CO, CO] + output: + co_collegeinvest_subtraction: [26_200, 26_200, 26_200] + +# Project the 2026 actuals with the existing IRS inflation proxy: +# 26,200 * 181.97958333333335 / 176.71308333333332 = 26,980.8267 -> 27,000. +# 39,200 * the same ratio = 40,368.2598 -> 40,400 (nearest $100). +- name: Single filers use the projected cap after the last published year + period: 2027 + input: + investment_in_529_plan: [26_999, 27_000, 27_001] + filing_status: [SINGLE, SINGLE, SINGLE] + state_code: [CO, CO, CO] + output: + co_collegeinvest_subtraction: [26_999, 27_000, 27_000] + +- name: Joint filers use the projected cap after the last published year + period: 2027 + input: + investment_in_529_plan: [40_399, 40_400, 40_401] + filing_status: [JOINT, JOINT, JOINT] + state_code: [CO, CO, CO] + output: + co_collegeinvest_subtraction: [40_399, 40_400, 40_400] + +- name: Other states do not receive Colorado's subtraction + period: 2027 + input: + investment_in_529_plan: 50_000 + filing_status: SINGLE + state_code: CA + output: + co_collegeinvest_subtraction: 0 diff --git a/policyengine_us/tests/policy/contrib/biden/budget_2025/capital_gains_tax_increase.yaml b/policyengine_us/tests/policy/contrib/biden/budget_2025/capital_gains_tax_increase.yaml index 2e452539778..af5a15e336a 100644 --- a/policyengine_us/tests/policy/contrib/biden/budget_2025/capital_gains_tax_increase.yaml +++ b/policyengine_us/tests/policy/contrib/biden/budget_2025/capital_gains_tax_increase.yaml @@ -57,3 +57,33 @@ taxable_income: 48_475 income_tax_main_rates: 5_563.50 capital_gains_tax: 15 + +# Treasury indexes the 2024 $1m threshold after 2024. With the IRS proxy, +# $1m * 172.797 / 167.95475 = $1,028,830.6820735942 in 2025. +# Set taxable income directly to isolate the threshold. All $100,000 of gains +# otherwise face 20%; the excess faces 37%, adding 17% of the excess. +- name: The proposal indexes the single threshold before taxing excess gains + period: 2025 + absolute_error_margin: 0.01 + reforms: policyengine_us.reforms.biden.budget_2025.capital_gains_tax_increase.capital_gains_tax_increase + input: + gov.contrib.biden.budget_2025.capital_gains.active: true + filing_status: [SINGLE, SINGLE, SINGLE] + taxable_income: [1_028_830, 1_028_830.6820735942, 1_028_832] + long_term_capital_gains: [100_000, 100_000, 100_000] + output: + capital_gains_tax: [20_000, 20_000, 20_000.2240475] + +# Separate: $500,000 * 172.797 / 167.95475 = $514,415.3410367971. +# At $514,417, tax = $20,000 + ($514,417 - $514,415.3410367971) * 17%. +- name: The proposal indexes half the threshold for separate filers + period: 2025 + absolute_error_margin: 0.01 + reforms: policyengine_us.reforms.biden.budget_2025.capital_gains_tax_increase.capital_gains_tax_increase + input: + gov.contrib.biden.budget_2025.capital_gains.active: true + filing_status: [SEPARATE, SEPARATE, SEPARATE] + taxable_income: [514_415, 514_415.3410367971, 514_417] + long_term_capital_gains: [100_000, 100_000, 100_000] + output: + capital_gains_tax: [20_000, 20_000, 20_000.2820237] diff --git a/policyengine_us/variables/gov/states/co/tax/income/subtractions/collegeinvest_contribution/co_collegeinvest_subtraction.py b/policyengine_us/variables/gov/states/co/tax/income/subtractions/collegeinvest_contribution/co_collegeinvest_subtraction.py index 7da893f2fd4..15e7f591dec 100644 --- a/policyengine_us/variables/gov/states/co/tax/income/subtractions/collegeinvest_contribution/co_collegeinvest_subtraction.py +++ b/policyengine_us/variables/gov/states/co/tax/income/subtractions/collegeinvest_contribution/co_collegeinvest_subtraction.py @@ -10,8 +10,8 @@ class co_collegeinvest_subtraction(Variable): reference = ( "https://tax.colorado.gov/sites/tax/files/documents/DR0104AD_2022.pdf#page=1", "https://tax.colorado.gov/sites/tax/files/documents/DR_104_Book_2022.pdf#page=12", - "https://law.justia.com/codes/colorado/2022/title-39/article-22/part-1/section-39-22-104/", - # C.R.S. 39-22-104(4)(i)(II)(B) + # C.R.S. 39-22-104(4)(i)(II)(B)-(C), PDF pages 392-393. + "https://content.leg.colorado.gov/sites/default/files/images/olls/crs2024-title-39.pdf#page=392", ) defined_for = StateCode.CO