From bc0e425032caadff7a839076f5135533bb7f217a Mon Sep 17 00:00:00 2001 From: Pinyan <129036923+pxu12@users.noreply.github.com> Date: Mon, 9 Sep 2024 05:58:14 +0000 Subject: [PATCH 1/6] Nebraska Military Retirement Benefit Exclusion 2022 Fixes #5011 --- changelog_entry.yaml | 1 + .../military_retirement/fraction.yaml | 13 ++++++++++++ .../ne_military_retirement_subtraction.yaml | 19 ++++++++++++++++++ .../ne_military_retirement_substraction.py | 20 +++++++++++++++++++ 4 files changed, 53 insertions(+) create mode 100644 policyengine_us/parameters/gov/states/ne/tax/income/agi/subtractions/military_retirement/fraction.yaml create mode 100644 policyengine_us/tests/policy/baseline/gov/states/ne/tax/income/adjusted_gross_income/ne_military_retirement_subtraction.yaml create mode 100644 policyengine_us/variables/gov/states/ne/tax/income/adjusted_gross_income/subtractions/ne_military_retirement_substraction.py diff --git a/changelog_entry.yaml b/changelog_entry.yaml index e69de29bb2d..8b137891791 100644 --- a/changelog_entry.yaml +++ b/changelog_entry.yaml @@ -0,0 +1 @@ + diff --git a/policyengine_us/parameters/gov/states/ne/tax/income/agi/subtractions/military_retirement/fraction.yaml b/policyengine_us/parameters/gov/states/ne/tax/income/agi/subtractions/military_retirement/fraction.yaml new file mode 100644 index 00000000000..9e761661c52 --- /dev/null +++ b/policyengine_us/parameters/gov/states/ne/tax/income/agi/subtractions/military_retirement/fraction.yaml @@ -0,0 +1,13 @@ +description: Fraction of military retirement benefits allowed as NE AGI subtraction when federal AGI is above threshold (fraction is 1.0 for others). +values: + 2022-01-01: 1 + +metadata: + label: fraction of military retirement benefits allowed as NE AGI subtraction when federal AGI is above threshold (fraction is 1.0 for others) + unit: /1 + period: year + reference: + - title: 2022 NE income tax form and instruction booklet + href: https://revenue.nebraska.gov/sites/revenue.nebraska.gov/files/doc/2022_Ne_Individual_Income_Tax_Booklet_8-307-2022_final_8.pdf#page=3 + - title: Legislative Bill 387 + href: https://revenue.nebraska.gov/sites/revenue.nebraska.gov/files/doc/info/legislation/2021/LB387.pdf diff --git a/policyengine_us/tests/policy/baseline/gov/states/ne/tax/income/adjusted_gross_income/ne_military_retirement_subtraction.yaml b/policyengine_us/tests/policy/baseline/gov/states/ne/tax/income/adjusted_gross_income/ne_military_retirement_subtraction.yaml new file mode 100644 index 00000000000..cc018be0c99 --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/ne/tax/income/adjusted_gross_income/ne_military_retirement_subtraction.yaml @@ -0,0 +1,19 @@ +- name: Test 1, less than agi, for 2022 + absolute_error_margin: 0.01 + period: 2022 + input: + adjusted_gross_income: 200_000 + military_retirement_pay: 30_000 + state_code: NE + output: + ne_military_retirement_subtraction: 30_000 + +- name: Test 2, more than agi, for 2022 + absolute_error_margin: 0.01 + period: 2022 + input: + adjusted_gross_income: 20_000 + military_retirement_pay: 30_000 + state_code: NE + output: + ne_military_retirement_subtraction: 20_000 diff --git a/policyengine_us/variables/gov/states/ne/tax/income/adjusted_gross_income/subtractions/ne_military_retirement_substraction.py b/policyengine_us/variables/gov/states/ne/tax/income/adjusted_gross_income/subtractions/ne_military_retirement_substraction.py new file mode 100644 index 00000000000..b58f53fb709 --- /dev/null +++ b/policyengine_us/variables/gov/states/ne/tax/income/adjusted_gross_income/subtractions/ne_military_retirement_substraction.py @@ -0,0 +1,20 @@ +from policyengine_us.model_api import * + + +class ne_military_retirement_subtraction(Variable): + value_type = float + entity = TaxUnit + label = "Nebraska military retirement subtraction" + unit = USD + definition_period = YEAR + defined_for = StateCode.NE + + def formula(tax_unit, period, parameters): + fagi = tax_unit("adjusted_gross_income", period) + p = parameters( + period + ).gov.states.ne.tax.income.agi.subtractions.military_retirement + military_retirement_benefits = add( + tax_unit, period, ["military_retirement_pay"] + ) + return min_(military_retirement_benefits * p.fraction, fagi) From 75531114ba3b79dd22f9f237fa0e5eb2dec70762 Mon Sep 17 00:00:00 2001 From: Pinyan <129036923+pxu12@users.noreply.github.com> Date: Mon, 9 Sep 2024 06:00:47 +0000 Subject: [PATCH 2/6] minor change --- .../income/agi/subtractions/military_retirement/fraction.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/policyengine_us/parameters/gov/states/ne/tax/income/agi/subtractions/military_retirement/fraction.yaml b/policyengine_us/parameters/gov/states/ne/tax/income/agi/subtractions/military_retirement/fraction.yaml index 9e761661c52..4cfae8b021a 100644 --- a/policyengine_us/parameters/gov/states/ne/tax/income/agi/subtractions/military_retirement/fraction.yaml +++ b/policyengine_us/parameters/gov/states/ne/tax/income/agi/subtractions/military_retirement/fraction.yaml @@ -1,9 +1,9 @@ -description: Fraction of military retirement benefits allowed as NE AGI subtraction when federal AGI is above threshold (fraction is 1.0 for others). +description: Fraction of military retirement benefits allowed as NE AGI subtraction. values: 2022-01-01: 1 metadata: - label: fraction of military retirement benefits allowed as NE AGI subtraction when federal AGI is above threshold (fraction is 1.0 for others) + label: fraction of military retirement benefits allowed as NE AGI subtraction unit: /1 period: year reference: From 47a4f1e026587dbb7b4c0859790ddb9198728efc Mon Sep 17 00:00:00 2001 From: Pinyan <129036923+pxu12@users.noreply.github.com> Date: Mon, 9 Sep 2024 09:50:10 +0000 Subject: [PATCH 3/6] add changelog --- changelog_entry.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/changelog_entry.yaml b/changelog_entry.yaml index 8b137891791..77cfbd61493 100644 --- a/changelog_entry.yaml +++ b/changelog_entry.yaml @@ -1 +1,4 @@ - +- bump: minor + changes: + added: + - 2022 Nebraska military retirement benefit exclusion. From 190ca6ffb474c2b1c14dbc445f2292826a5cc506 Mon Sep 17 00:00:00 2001 From: Pinyan <129036923+pxu12@users.noreply.github.com> Date: Thu, 12 Sep 2024 03:00:51 +0000 Subject: [PATCH 4/6] add 2021 value and tax forms --- .../subtractions/military_retirement/fraction.yaml | 11 +++++++++-- .../ne_military_retirement_subtraction.yaml | 11 +---------- .../ne_military_retirement_substraction.py | 3 +-- 3 files changed, 11 insertions(+), 14 deletions(-) diff --git a/policyengine_us/parameters/gov/states/ne/tax/income/agi/subtractions/military_retirement/fraction.yaml b/policyengine_us/parameters/gov/states/ne/tax/income/agi/subtractions/military_retirement/fraction.yaml index 4cfae8b021a..6217631406b 100644 --- a/policyengine_us/parameters/gov/states/ne/tax/income/agi/subtractions/military_retirement/fraction.yaml +++ b/policyengine_us/parameters/gov/states/ne/tax/income/agi/subtractions/military_retirement/fraction.yaml @@ -1,13 +1,20 @@ -description: Fraction of military retirement benefits allowed as NE AGI subtraction. +description: Nebraska subtracts this fraction of military retirement benefits from federal adjusted gross income. values: + 2021-01-01: 0.4 2022-01-01: 1 metadata: - label: fraction of military retirement benefits allowed as NE AGI subtraction + label: Nebraska military retirement subtraction fraction unit: /1 period: year reference: + - title: 2021 Nebraska Individual Income Tax Booklet + href: https://revenue.nebraska.gov/sites/revenue.nebraska.gov/files/doc/f_1040n_booklet.pdf#page=16 - title: 2022 NE income tax form and instruction booklet href: https://revenue.nebraska.gov/sites/revenue.nebraska.gov/files/doc/2022_Ne_Individual_Income_Tax_Booklet_8-307-2022_final_8.pdf#page=3 + - title: 2023 Nebraska Individual Income Tax Booklet + href: https://revenue.nebraska.gov/sites/revenue.nebraska.gov/files/doc/tax-forms/2023/incometax/f_1040n_booklet_2023_Final.pdf#page=19 + - title: Nebraska Revised Statute 77-2716(15) + href: https://nebraskalegislature.gov/laws/statutes.php?statute=77-2716 - title: Legislative Bill 387 href: https://revenue.nebraska.gov/sites/revenue.nebraska.gov/files/doc/info/legislation/2021/LB387.pdf diff --git a/policyengine_us/tests/policy/baseline/gov/states/ne/tax/income/adjusted_gross_income/ne_military_retirement_subtraction.yaml b/policyengine_us/tests/policy/baseline/gov/states/ne/tax/income/adjusted_gross_income/ne_military_retirement_subtraction.yaml index cc018be0c99..7b6d8151360 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/ne/tax/income/adjusted_gross_income/ne_military_retirement_subtraction.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/ne/tax/income/adjusted_gross_income/ne_military_retirement_subtraction.yaml @@ -2,18 +2,9 @@ absolute_error_margin: 0.01 period: 2022 input: - adjusted_gross_income: 200_000 military_retirement_pay: 30_000 state_code: NE output: ne_military_retirement_subtraction: 30_000 -- name: Test 2, more than agi, for 2022 - absolute_error_margin: 0.01 - period: 2022 - input: - adjusted_gross_income: 20_000 - military_retirement_pay: 30_000 - state_code: NE - output: - ne_military_retirement_subtraction: 20_000 + diff --git a/policyengine_us/variables/gov/states/ne/tax/income/adjusted_gross_income/subtractions/ne_military_retirement_substraction.py b/policyengine_us/variables/gov/states/ne/tax/income/adjusted_gross_income/subtractions/ne_military_retirement_substraction.py index b58f53fb709..2c5803d038b 100644 --- a/policyengine_us/variables/gov/states/ne/tax/income/adjusted_gross_income/subtractions/ne_military_retirement_substraction.py +++ b/policyengine_us/variables/gov/states/ne/tax/income/adjusted_gross_income/subtractions/ne_military_retirement_substraction.py @@ -10,11 +10,10 @@ class ne_military_retirement_subtraction(Variable): defined_for = StateCode.NE def formula(tax_unit, period, parameters): - fagi = tax_unit("adjusted_gross_income", period) p = parameters( period ).gov.states.ne.tax.income.agi.subtractions.military_retirement military_retirement_benefits = add( tax_unit, period, ["military_retirement_pay"] ) - return min_(military_retirement_benefits * p.fraction, fagi) + return military_retirement_benefits * p.fraction From 90a257c22a9b82c28312db91b4948ae330ac26d9 Mon Sep 17 00:00:00 2001 From: Pinyan <129036923+pxu12@users.noreply.github.com> Date: Thu, 12 Sep 2024 03:06:20 +0000 Subject: [PATCH 5/6] add to ne substractions --- .../gov/states/ne/tax/income/agi/subtractions/subtractions.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/policyengine_us/parameters/gov/states/ne/tax/income/agi/subtractions/subtractions.yaml b/policyengine_us/parameters/gov/states/ne/tax/income/agi/subtractions/subtractions.yaml index bbaf5b84e5e..3fcee98c20a 100644 --- a/policyengine_us/parameters/gov/states/ne/tax/income/agi/subtractions/subtractions.yaml +++ b/policyengine_us/parameters/gov/states/ne/tax/income/agi/subtractions/subtractions.yaml @@ -5,6 +5,7 @@ values: 2024-01-01: - ne_social_security_subtraction - taxable_public_pension_income + - ne_military_retirement_subtraction metadata: From e8b080a5caa19c34c064dab798f50c2d8d000886 Mon Sep 17 00:00:00 2001 From: Pinyan <129036923+pxu12@users.noreply.github.com> Date: Sat, 14 Sep 2024 01:20:14 +0000 Subject: [PATCH 6/6] minor change --- .../subtractions/military_retirement/fraction.yaml | 3 +-- .../ne/tax/income/agi/subtractions/subtractions.yaml | 1 + .../ne_military_retirement_subtraction.yaml | 11 ++++++++++- .../ne_military_retirement_substraction.py | 1 + 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/policyengine_us/parameters/gov/states/ne/tax/income/agi/subtractions/military_retirement/fraction.yaml b/policyengine_us/parameters/gov/states/ne/tax/income/agi/subtractions/military_retirement/fraction.yaml index 6217631406b..912f4d10821 100644 --- a/policyengine_us/parameters/gov/states/ne/tax/income/agi/subtractions/military_retirement/fraction.yaml +++ b/policyengine_us/parameters/gov/states/ne/tax/income/agi/subtractions/military_retirement/fraction.yaml @@ -16,5 +16,4 @@ metadata: href: https://revenue.nebraska.gov/sites/revenue.nebraska.gov/files/doc/tax-forms/2023/incometax/f_1040n_booklet_2023_Final.pdf#page=19 - title: Nebraska Revised Statute 77-2716(15) href: https://nebraskalegislature.gov/laws/statutes.php?statute=77-2716 - - title: Legislative Bill 387 - href: https://revenue.nebraska.gov/sites/revenue.nebraska.gov/files/doc/info/legislation/2021/LB387.pdf + diff --git a/policyengine_us/parameters/gov/states/ne/tax/income/agi/subtractions/subtractions.yaml b/policyengine_us/parameters/gov/states/ne/tax/income/agi/subtractions/subtractions.yaml index 3fcee98c20a..36805de55a8 100644 --- a/policyengine_us/parameters/gov/states/ne/tax/income/agi/subtractions/subtractions.yaml +++ b/policyengine_us/parameters/gov/states/ne/tax/income/agi/subtractions/subtractions.yaml @@ -2,6 +2,7 @@ description: Nebraska subtracts these sources from adjusted gross income. values: 2021-01-01: - ne_social_security_subtraction + - ne_military_retirement_subtraction 2024-01-01: - ne_social_security_subtraction - taxable_public_pension_income diff --git a/policyengine_us/tests/policy/baseline/gov/states/ne/tax/income/adjusted_gross_income/ne_military_retirement_subtraction.yaml b/policyengine_us/tests/policy/baseline/gov/states/ne/tax/income/adjusted_gross_income/ne_military_retirement_subtraction.yaml index 7b6d8151360..37479df0dbc 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/ne/tax/income/adjusted_gross_income/ne_military_retirement_subtraction.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/ne/tax/income/adjusted_gross_income/ne_military_retirement_subtraction.yaml @@ -1,4 +1,4 @@ -- name: Test 1, less than agi, for 2022 +- name: Test 1, for 2022 absolute_error_margin: 0.01 period: 2022 input: @@ -7,4 +7,13 @@ output: ne_military_retirement_subtraction: 30_000 +- name: Test 2, for 2021 + absolute_error_margin: 0.01 + period: 2021 + input: + military_retirement_pay: 30_000 + state_code: NE + output: + ne_military_retirement_subtraction: 12_000 + diff --git a/policyengine_us/variables/gov/states/ne/tax/income/adjusted_gross_income/subtractions/ne_military_retirement_substraction.py b/policyengine_us/variables/gov/states/ne/tax/income/adjusted_gross_income/subtractions/ne_military_retirement_substraction.py index 2c5803d038b..dc27aa4c71f 100644 --- a/policyengine_us/variables/gov/states/ne/tax/income/adjusted_gross_income/subtractions/ne_military_retirement_substraction.py +++ b/policyengine_us/variables/gov/states/ne/tax/income/adjusted_gross_income/subtractions/ne_military_retirement_substraction.py @@ -16,4 +16,5 @@ def formula(tax_unit, period, parameters): military_retirement_benefits = add( tax_unit, period, ["military_retirement_pay"] ) + # From 2015 to 2021, the tax filer may elect to exclude 40% of the military retirement benefit income for 7 consecutive years or elect to receive 15% exclusion for all tax years after age 67. return military_retirement_benefits * p.fraction