From 090b6ddaf1f2da4b4b33b17e3dd046c34fa8b23e Mon Sep 17 00:00:00 2001 From: Ruby Ren <38923159+YichunRen@users.noreply.github.com> Date: Wed, 6 Mar 2024 04:15:34 +0000 Subject: [PATCH 1/4] Remove CPS_2023 Fixes #4032 copilot:all --- changelog_entry.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/changelog_entry.yaml b/changelog_entry.yaml index e69de29bb2d..99e2c0b7b18 100644 --- a/changelog_entry.yaml +++ b/changelog_entry.yaml @@ -0,0 +1,4 @@ +- bump: minor + changes: + added: + - Remove CPS_2023 \ No newline at end of file From 3ffbf04d26503e168002d48b72c53bec76aa0f8f Mon Sep 17 00:00:00 2001 From: Ruby Ren <38923159+YichunRen@users.noreply.github.com> Date: Wed, 2 Oct 2024 22:43:54 +0000 Subject: [PATCH 2/4] update changelog --- changelog_entry.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog_entry.yaml b/changelog_entry.yaml index 99e2c0b7b18..74c82e797ac 100644 --- a/changelog_entry.yaml +++ b/changelog_entry.yaml @@ -1,4 +1,4 @@ - bump: minor changes: added: - - Remove CPS_2023 \ No newline at end of file + - Partial Rhode Island EITC refundability pre-2015 \ No newline at end of file From 44213488f0319edc086c7e94d22d38a29a03a0b5 Mon Sep 17 00:00:00 2001 From: Ruby Ren <38923159+YichunRen@users.noreply.github.com> Date: Thu, 17 Oct 2024 19:29:28 +0000 Subject: [PATCH 3/4] ri_refundable_eitc --- .../tax/income/credits/eitc/refundable.yaml | 14 +++++++++++++ .../ri/tax/income/credits/refundable.yaml | 4 ++-- .../income/credits/eitc/ri_refundable_eitc.py | 21 +++++++++++++++++++ 3 files changed, 37 insertions(+), 2 deletions(-) create mode 100644 policyengine_us/parameters/gov/states/ri/tax/income/credits/eitc/refundable.yaml create mode 100644 policyengine_us/variables/gov/states/ri/tax/income/credits/eitc/ri_refundable_eitc.py diff --git a/policyengine_us/parameters/gov/states/ri/tax/income/credits/eitc/refundable.yaml b/policyengine_us/parameters/gov/states/ri/tax/income/credits/eitc/refundable.yaml new file mode 100644 index 00000000000..03c7cb55d48 --- /dev/null +++ b/policyengine_us/parameters/gov/states/ri/tax/income/credits/eitc/refundable.yaml @@ -0,0 +1,14 @@ +description: Rhode Island provide this percent of refundable earned-income credit +values: + 2011-01-01: 0.15 + 2015-01-01: 1 +metadata: + unit: /1 + label: Rhode Island refundable EITC + reference: + - title: 44-30-2.6. Rhode Island taxable income — Rate of tax. (N)(2) + href: https://webserver.rilegislature.gov/Statutes/TITLE44/44-30/44-I/44-30-2.6.htm + - title: 2011 Form RI-1040 - RI SCHEDULE EIC + href: https://tax.ri.gov/sites/g/files/xkgbur541/files/forms/2011/Income/2011-Resident-Booklet-FINAL.pdf#page=4 + - title: 2015 Form RI-1040 - RI SCHEDULE EIC + href: https://tax.ri.gov/sites/g/files/xkgbur541/files/forms/2015/Income/2015-1040_hhh.pdf#page=2 diff --git a/policyengine_us/parameters/gov/states/ri/tax/income/credits/refundable.yaml b/policyengine_us/parameters/gov/states/ri/tax/income/credits/refundable.yaml index c879eabec8e..4db5000555c 100644 --- a/policyengine_us/parameters/gov/states/ri/tax/income/credits/refundable.yaml +++ b/policyengine_us/parameters/gov/states/ri/tax/income/credits/refundable.yaml @@ -1,10 +1,10 @@ description: Rhode Island provides these refundable income tax credits. values: 2021-01-01: - - ri_eitc + - ri_refundable_eitc - ri_property_tax_credit 2022-01-01: - - ri_eitc + - ri_refundable_eitc - ri_property_tax_credit - ri_child_tax_rebate diff --git a/policyengine_us/variables/gov/states/ri/tax/income/credits/eitc/ri_refundable_eitc.py b/policyengine_us/variables/gov/states/ri/tax/income/credits/eitc/ri_refundable_eitc.py new file mode 100644 index 00000000000..d113d29fcb8 --- /dev/null +++ b/policyengine_us/variables/gov/states/ri/tax/income/credits/eitc/ri_refundable_eitc.py @@ -0,0 +1,21 @@ +from policyengine_us.model_api import * + + +class ri_refundable_eitc(Variable): + value_type = float + entity = TaxUnit + label = "Rhode Island refundable earned income tax credit" + unit = USD + documentation = ( + "44-30-2.6. Rhode Island taxable income — Rate of tax. (N)(2)" + ) + definition_period = YEAR + reference = "https://webserver.rilegislature.gov/Statutes/TITLE44/44-30/44-I/44-30-2.6.htm" + defined_for = StateCode.RI + + def formula(tax_unit, period, parameters): + ri_eitc = tax_unit("ri_eitc", period) + ri_income_tax_before_refundable_credits = tax_unit("ri_income_tax_before_refundable_credits", period) + p = parameters(period).gov.states.ri.tax.income.credits.eitc + + return max(0, p.refundable * (ri_eitc - min(ri_eitc, ri_income_tax_before_refundable_credits))) From 5cc4fe2ebc06bfe2228fa796d4470d75dbc10a9e Mon Sep 17 00:00:00 2001 From: Ruby Ren <38923159+YichunRen@users.noreply.github.com> Date: Thu, 17 Oct 2024 20:04:48 +0000 Subject: [PATCH 4/4] add unit tests --- changelog_entry.yaml | 2 +- .../credits/eitc/ri_refundable_eitc.yaml | 37 +++++++++++++++++++ .../income/credits/eitc/ri_refundable_eitc.py | 30 ++++++++++++--- 3 files changed, 62 insertions(+), 7 deletions(-) create mode 100644 policyengine_us/tests/policy/baseline/gov/states/ri/tax/income/credits/eitc/ri_refundable_eitc.yaml diff --git a/changelog_entry.yaml b/changelog_entry.yaml index 74c82e797ac..bb9125eb5a6 100644 --- a/changelog_entry.yaml +++ b/changelog_entry.yaml @@ -1,4 +1,4 @@ - bump: minor changes: added: - - Partial Rhode Island EITC refundability pre-2015 \ No newline at end of file + - Partial Rhode Island EITC refundability pre-2015 diff --git a/policyengine_us/tests/policy/baseline/gov/states/ri/tax/income/credits/eitc/ri_refundable_eitc.yaml b/policyengine_us/tests/policy/baseline/gov/states/ri/tax/income/credits/eitc/ri_refundable_eitc.yaml new file mode 100644 index 00000000000..3f89e590032 --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/ri/tax/income/credits/eitc/ri_refundable_eitc.yaml @@ -0,0 +1,37 @@ +- name: 2014 Refundable EITC + period: 2014 + input: + state_code: RI + ri_eitc: 500 + ri_income_tax_before_refundable_credits: 600 + output: + ri_refundable_eitc: 0 # 500 < 600 + +- name: 2014 Refundable EITC 2 + period: 2014 + input: + state_code: RI + ri_eitc: 600 + ri_income_tax_before_refundable_credits: 500 + output: + ri_refundable_eitc: 15 #((600 - 500) * 0.15) + +- name: 2015 Refundable EITC + period: 2015 + input: + state_code: RI + ri_eitc: 500 + ri_income_tax_before_refundable_credits: 600 + output: + ri_refundable_eitc: 0 # 500 < 600 + +- name: 2015 Refundable EITC 2 + period: 2015 + input: + state_code: RI + ri_eitc: 600 + ri_income_tax_before_refundable_credits: 500 + output: + ri_refundable_eitc: 100 #((600 - 500) * 1) + + diff --git a/policyengine_us/variables/gov/states/ri/tax/income/credits/eitc/ri_refundable_eitc.py b/policyengine_us/variables/gov/states/ri/tax/income/credits/eitc/ri_refundable_eitc.py index d113d29fcb8..04ebab314ba 100644 --- a/policyengine_us/variables/gov/states/ri/tax/income/credits/eitc/ri_refundable_eitc.py +++ b/policyengine_us/variables/gov/states/ri/tax/income/credits/eitc/ri_refundable_eitc.py @@ -6,16 +6,34 @@ class ri_refundable_eitc(Variable): entity = TaxUnit label = "Rhode Island refundable earned income tax credit" unit = USD - documentation = ( - "44-30-2.6. Rhode Island taxable income — Rate of tax. (N)(2)" - ) + definition_period = YEAR - reference = "https://webserver.rilegislature.gov/Statutes/TITLE44/44-30/44-I/44-30-2.6.htm" + reference = ( + "https://tax.ri.gov/sites/g/files/xkgbur541/files/forms/2014/Income/2014-1040_h.pdf" # Calculation see RI SCHEDULE EIC + "https://webserver.rilegislature.gov/Statutes/TITLE44/44-30/44-I/44-30-2.6.htm" + ) defined_for = StateCode.RI def formula(tax_unit, period, parameters): ri_eitc = tax_unit("ri_eitc", period) - ri_income_tax_before_refundable_credits = tax_unit("ri_income_tax_before_refundable_credits", period) + ri_income_tax_before_refundable_credits = tax_unit( + "ri_income_tax_before_refundable_credits", period + ) p = parameters(period).gov.states.ri.tax.income.credits.eitc + # refundable earned-income credit is the percent of the amount by which the Rhode Island earned-income credit exceeds the Rhode Island income tax. + return max( + 0, + p.refundable + * ( + ri_eitc - min(ri_eitc, ri_income_tax_before_refundable_credits) + ), + ) - return max(0, p.refundable * (ri_eitc - min(ri_eitc, ri_income_tax_before_refundable_credits))) + # + # return max( + # 0, + # p.refundable + # * ( + # ri_eitc - min(ri_eitc, ri_income_tax_before_refundable_credits) + # ), + # ) + min(ri_eitc, ri_income_tax_before_refundable_credits)