diff --git a/policyengine_us/parameters/gov/territories/pr/READme.md b/policyengine_us/parameters/gov/territories/pr/READme.md new file mode 100644 index 00000000000..b26e4fd6a7d --- /dev/null +++ b/policyengine_us/parameters/gov/territories/pr/READme.md @@ -0,0 +1 @@ +# Puerto Rico \ No newline at end of file diff --git a/policyengine_us/parameters/gov/territories/pr/tax/income/credits/low_income/additional/amount.yaml b/policyengine_us/parameters/gov/territories/pr/tax/income/credits/low_income/additional/amount.yaml new file mode 100644 index 00000000000..39e5f5a33a9 --- /dev/null +++ b/policyengine_us/parameters/gov/territories/pr/tax/income/credits/low_income/additional/amount.yaml @@ -0,0 +1,14 @@ +description: Puerto Rico provides the following compensatory tax credit amount for low-income pensioners. + +values: + 2011-01-01: 300 + +metadata: + unit: currency-USD + period: year + label: Puerto Rico compensatory tax credit for low-income pensioners + reference: + - title: P.R. Laws tit. 13, § 30212 (b) + href: https://casetext.com/statute/laws-of-puerto-rico/title-thirteen-taxation-and-finance/subtitle-17-internal-revenue-code-of-2011/part-ii-income-taxes/chapter-1007-credits-against-tax/subchapter-b-refundable-credits/30212-credit-for-low-income-individuals-older-than-sixty-five-65-years-of-age + - title: Gov. of Puerto Rico Form 481.10 2023 + href: https://hacienda.pr.gov/sites/default/files/documentos/481.10_2023_informative.pdf#page=4 diff --git a/policyengine_us/parameters/gov/territories/pr/tax/income/credits/low_income/additional/income_limit.yaml b/policyengine_us/parameters/gov/territories/pr/tax/income/credits/low_income/additional/income_limit.yaml new file mode 100644 index 00000000000..6fcb2293099 --- /dev/null +++ b/policyengine_us/parameters/gov/territories/pr/tax/income/credits/low_income/additional/income_limit.yaml @@ -0,0 +1,14 @@ +description: Puerto Rico limits the compensatory tax credit for low-income pensioners to filers with pension income below this limit. + +values: + 2011-01-01: 4_800 + +metadata: + unit: currency-USD + period: year + label: Puerto Rico compensatory tax credit for low-income pensioners income limit + reference: + - title: P.R. Laws tit. 13, § 30212 (b) + href: https://casetext.com/statute/laws-of-puerto-rico/title-thirteen-taxation-and-finance/subtitle-17-internal-revenue-code-of-2011/part-ii-income-taxes/chapter-1007-credits-against-tax/subchapter-b-refundable-credits/30212-credit-for-low-income-individuals-older-than-sixty-five-65-years-of-age + - title: Gov. of Puerto Rico Form 481.10 2023 + href: https://hacienda.pr.gov/sites/default/files/documentos/481.10_2023_informative.pdf#page=4 diff --git a/policyengine_us/parameters/gov/territories/pr/tax/income/credits/low_income/age_threshold.yaml b/policyengine_us/parameters/gov/territories/pr/tax/income/credits/low_income/age_threshold.yaml new file mode 100644 index 00000000000..5497d77f2c2 --- /dev/null +++ b/policyengine_us/parameters/gov/territories/pr/tax/income/credits/low_income/age_threshold.yaml @@ -0,0 +1,14 @@ +description: Puerto Rico limits the low income tax credit to filers below this age threshold. + +values: + 2011-01-01: 65 + +metadata: + unit: year + period: year + label: Puerto Rico low income tax credit age threshold + reference: + - title: P.R. Laws tit. 13, § 30212 (a) + href: https://casetext.com/statute/laws-of-puerto-rico/title-thirteen-taxation-and-finance/subtitle-17-internal-revenue-code-of-2011/part-ii-income-taxes/chapter-1007-credits-against-tax/subchapter-b-refundable-credits/30212-credit-for-low-income-individuals-older-than-sixty-five-65-years-of-age + - title: Gov. of Puerto Rico Form 481.10 2023 + href: https://hacienda.pr.gov/sites/default/files/documentos/481.10_2023_informative.pdf#page=4 diff --git a/policyengine_us/parameters/gov/territories/pr/tax/income/credits/low_income/amount.yaml b/policyengine_us/parameters/gov/territories/pr/tax/income/credits/low_income/amount.yaml new file mode 100644 index 00000000000..a7a879c511a --- /dev/null +++ b/policyengine_us/parameters/gov/territories/pr/tax/income/credits/low_income/amount.yaml @@ -0,0 +1,14 @@ +description: Puerto Rico provides the following low income tax credit amount. + +values: + 2011-01-01: 400 + +metadata: + unit: currency-USD + period: year + label: Puerto Rico low income tax credit amount + reference: + - title: P.R. Laws tit. 13, § 30212 (a) + href: https://casetext.com/statute/laws-of-puerto-rico/title-thirteen-taxation-and-finance/subtitle-17-internal-revenue-code-of-2011/part-ii-income-taxes/chapter-1007-credits-against-tax/subchapter-b-refundable-credits/30212-credit-for-low-income-individuals-older-than-sixty-five-65-years-of-age + - title: Gov. of Puerto Rico Form 481.10 2023 + href: https://hacienda.pr.gov/sites/default/files/documentos/481.10_2023_informative.pdf#page=4 diff --git a/policyengine_us/parameters/gov/territories/pr/tax/income/credits/low_income/income_limit/one_eligible_person.yaml b/policyengine_us/parameters/gov/territories/pr/tax/income/credits/low_income/income_limit/one_eligible_person.yaml new file mode 100644 index 00000000000..d7bf3ea5448 --- /dev/null +++ b/policyengine_us/parameters/gov/territories/pr/tax/income/credits/low_income/income_limit/one_eligible_person.yaml @@ -0,0 +1,14 @@ +description: Puerto Rico limits the low income tax credit to filers below this income limit, for tax units with one eligible person. + +values: + 2011-01-01: 15_000 + +metadata: + unit: currency-USD + period: year + label: Puerto Rico low income tax credit income limit one eligible person + reference: + - title: P.R. Laws tit. 13, § 30212 (a) + href: https://casetext.com/statute/laws-of-puerto-rico/title-thirteen-taxation-and-finance/subtitle-17-internal-revenue-code-of-2011/part-ii-income-taxes/chapter-1007-credits-against-tax/subchapter-b-refundable-credits/30212-credit-for-low-income-individuals-older-than-sixty-five-65-years-of-age + - title: Gov. of Puerto Rico Form 481.10 2023 + href: https://hacienda.pr.gov/sites/default/files/documentos/481.10_2023_informative.pdf#page=4 diff --git a/policyengine_us/parameters/gov/territories/pr/tax/income/credits/low_income/income_limit/two_eligible_people.yaml b/policyengine_us/parameters/gov/territories/pr/tax/income/credits/low_income/income_limit/two_eligible_people.yaml new file mode 100644 index 00000000000..70852b34596 --- /dev/null +++ b/policyengine_us/parameters/gov/territories/pr/tax/income/credits/low_income/income_limit/two_eligible_people.yaml @@ -0,0 +1,14 @@ +description: Puerto Rico limits the low income tax credit to filers below this income limit, for tax units with two eligible people. + +values: + 2011-01-01: 30_000 + +metadata: + unit: currency-USD + period: year + label: Puerto Rico low income tax credit income limit two eligible people + reference: + - title: P.R. Laws tit. 13, § 30212 (a) + href: https://casetext.com/statute/laws-of-puerto-rico/title-thirteen-taxation-and-finance/subtitle-17-internal-revenue-code-of-2011/part-ii-income-taxes/chapter-1007-credits-against-tax/subchapter-b-refundable-credits/30212-credit-for-low-income-individuals-older-than-sixty-five-65-years-of-age + - title: Gov. of Puerto Rico Form 481.10 2023 + href: https://hacienda.pr.gov/sites/default/files/documentos/481.10_2023_informative.pdf#page=4 diff --git a/policyengine_us/tests/policy/baseline/gov/territories/pr/tax/income/credits/low_income/pr_low_income_credit.yaml b/policyengine_us/tests/policy/baseline/gov/territories/pr/tax/income/credits/low_income/pr_low_income_credit.yaml new file mode 100644 index 00000000000..1b38142d5cf --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/territories/pr/tax/income/credits/low_income/pr_low_income_credit.yaml @@ -0,0 +1,65 @@ +- name: Two eligible people + absolute_error_margin: 0.01 + period: 2024 + input: + people: + person1: + pr_low_income_credit_eligible_person: true + person2: + pr_low_income_credit_eligible_person: true + tax_units: + tax_unit: + members: [person1, person2] + pr_low_income_credit_eligible: true + output: + pr_low_income_credit: 800 + +- name: Ineligible household + absolute_error_margin: 0.01 + period: 2024 + input: + people: + person1: + pr_low_income_credit_eligible_person: true + person2: + pr_low_income_credit_eligible_person: true + tax_units: + tax_unit: + members: [person1, person2] + pr_low_income_credit_eligible: false + output: + pr_low_income_credit: 0 + +- name: One eligible person + absolute_error_margin: 0.01 + period: 2024 + input: + people: + person1: + pr_low_income_credit_eligible_person: true + person2: + pr_low_income_credit_eligible_person: false + tax_units: + tax_unit: + members: [person1, person2] + pr_low_income_credit_eligible: true + output: + pr_low_income_credit: 400 + +- name: One eligible person, two ineligible + absolute_error_margin: 0.01 + period: 2023 + input: + people: + person1: + pr_low_income_credit_eligible_person: true + person2: + pr_low_income_credit_eligible_person: false + person3: + pr_low_income_credit_eligible_person: false + tax_units: + tax_unit: + members: [person1, person2, person3] + pr_low_income_credit_eligible: true + output: + pr_low_income_credit: 400 diff --git a/policyengine_us/tests/policy/baseline/gov/territories/pr/tax/income/credits/low_income/pr_low_income_credit_eligible.yaml b/policyengine_us/tests/policy/baseline/gov/territories/pr/tax/income/credits/low_income/pr_low_income_credit_eligible.yaml new file mode 100644 index 00000000000..2fcc6fcae33 --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/territories/pr/tax/income/credits/low_income/pr_low_income_credit_eligible.yaml @@ -0,0 +1,63 @@ +- name: Two eligible people + absolute_error_margin: 0.01 + period: 2024 + input: + people: + person1: + pr_low_income_credit_eligible_person: true + person2: + pr_low_income_credit_eligible_person: true + tax_units: + tax_unit: + members: [person1, person2] + pr_gross_income: 29_000 + output: + pr_low_income_credit_eligible: true + +- name: Two ineligible people + absolute_error_margin: 0.01 + period: 2024 + input: + people: + person1: + pr_low_income_credit_eligible_person: false + person2: + pr_low_income_credit_eligible_person: false + tax_units: + tax_unit: + members: [person1, person2] + pr_gross_income: 32_000 + output: + pr_low_income_credit_eligible: false + +- name: One person eligible + absolute_error_margin: 0.01 + period: 2024 + input: + people: + person1: + pr_low_income_credit_eligible_person: true + person2: + pr_low_income_credit_eligible_person: false + tax_units: + tax_unit: + members: [person1, person2] + pr_gross_income: 15_000 + output: + pr_low_income_credit_eligible: true + +- name: One person age eligible but income ineligible + absolute_error_margin: 0.01 + period: 2024 + input: + people: + person1: + pr_low_income_credit_eligible_person: true + person2: + pr_low_income_credit_eligible_person: false + tax_units: + tax_unit: + members: [person1, person2] + pr_gross_income: 15_001 + output: + pr_low_income_credit_eligible: false diff --git a/policyengine_us/tests/policy/baseline/gov/territories/pr/tax/income/credits/low_income/pr_low_income_credit_eligible_person.yaml b/policyengine_us/tests/policy/baseline/gov/territories/pr/tax/income/credits/low_income/pr_low_income_credit_eligible_person.yaml new file mode 100644 index 00000000000..11868cbcc36 --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/territories/pr/tax/income/credits/low_income/pr_low_income_credit_eligible_person.yaml @@ -0,0 +1,23 @@ +- name: Eligible person + period: 2024 + input: + age: 65 + is_tax_unit_head_or_spouse: true + output: + pr_low_income_credit_eligible_person: true + +- name: Age ineligible person + period: 2024 + input: + age: 64 + is_tax_unit_head_or_spouse: true + output: + pr_low_income_credit_eligible_person: false + +- name: Not head or spouse + period: 2024 + input: + age: 65 + is_tax_unit_head_or_spouse: false + output: + pr_low_income_credit_eligible_person: false diff --git a/policyengine_us/variables/gov/territories/pr/tax/income/credits/low_income/pr_compensatory_low_income_credit.py b/policyengine_us/variables/gov/territories/pr/tax/income/credits/low_income/pr_compensatory_low_income_credit.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/policyengine_us/variables/gov/territories/pr/tax/income/credits/low_income/pr_compensatory_low_income_credit_eligible.py b/policyengine_us/variables/gov/territories/pr/tax/income/credits/low_income/pr_compensatory_low_income_credit_eligible.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/policyengine_us/variables/gov/territories/pr/tax/income/credits/low_income/pr_low_income_credit.py b/policyengine_us/variables/gov/territories/pr/tax/income/credits/low_income/pr_low_income_credit.py new file mode 100644 index 00000000000..9c5a51f9de0 --- /dev/null +++ b/policyengine_us/variables/gov/territories/pr/tax/income/credits/low_income/pr_low_income_credit.py @@ -0,0 +1,18 @@ +from policyengine_us.model_api import * + + +class pr_low_income_credit(Variable): + value_type = float + entity = TaxUnit + label = "Puerto Rico low income credit" + unit = USD + definition_period = YEAR + reference = "https://casetext.com/statute/laws-of-puerto-rico/title-thirteen-taxation-and-finance/subtitle-17-internal-revenue-code-of-2011/part-ii-income-taxes/chapter-1007-credits-against-tax/subchapter-b-refundable-credits/30212-credit-for-low-income-individuals-older-than-sixty-five-65-years-of-age" + defined_for = "pr_low_income_credit_eligible" + + def formula(tax_unit, period, parameters): + p = parameters(period).gov.territories.pr.tax.income.credits.low_income + person = tax_unit.members + eligible_person = person("pr_low_income_credit_eligible_person", period) + eligible_people = tax_unit.sum(eligible_person) + return p.amount * eligible_people diff --git a/policyengine_us/variables/gov/territories/pr/tax/income/credits/low_income/pr_low_income_credit_eligible.py b/policyengine_us/variables/gov/territories/pr/tax/income/credits/low_income/pr_low_income_credit_eligible.py new file mode 100644 index 00000000000..867183b43c9 --- /dev/null +++ b/policyengine_us/variables/gov/territories/pr/tax/income/credits/low_income/pr_low_income_credit_eligible.py @@ -0,0 +1,27 @@ +from policyengine_us.model_api import * + + +class pr_low_income_credit_eligible(Variable): + value_type = bool + entity = TaxUnit + label = "Eligible unit for the Puerto Rico low income credit" + definition_period = YEAR + reference = "https://casetext.com/statute/laws-of-puerto-rico/title-thirteen-taxation-and-finance/subtitle-17-internal-revenue-code-of-2011/part-ii-income-taxes/chapter-1007-credits-against-tax/subchapter-b-refundable-credits/30212-credit-for-low-income-individuals-older-than-sixty-five-65-years-of-age" + + def formula(tax_unit, period, parameters): + p = parameters(period).gov.territories.pr.tax.income.credits.low_income.income_limit + eligible_person = tax_unit.members("pr_low_income_credit_eligible_person", period) + eligible_people = tax_unit.sum(eligible_person) + income = tax_unit("pr_gross_income", period) + income_limit = select( + [ + eligible_people == 1, + eligible_people == 2, + ], + [ + p.one_eligible_person, + p.two_eligible_people, + ], + default = 0 + ) + return where(eligible_people > 0, income <= income_limit, False) diff --git a/policyengine_us/variables/gov/territories/pr/tax/income/credits/low_income/pr_low_income_credit_eligible_person.py b/policyengine_us/variables/gov/territories/pr/tax/income/credits/low_income/pr_low_income_credit_eligible_person.py new file mode 100644 index 00000000000..fe5cf27917f --- /dev/null +++ b/policyengine_us/variables/gov/territories/pr/tax/income/credits/low_income/pr_low_income_credit_eligible_person.py @@ -0,0 +1,16 @@ +from policyengine_us.model_api import * + + +class pr_low_income_credit_eligible_person(Variable): + value_type = bool + entity = Person + label = "Eligible person for the Puerto Rico low income credit" + definition_period = YEAR + reference = "https://casetext.com/statute/laws-of-puerto-rico/title-thirteen-taxation-and-finance/subtitle-17-internal-revenue-code-of-2011/part-ii-income-taxes/chapter-1007-credits-against-tax/subchapter-b-refundable-credits/30212-credit-for-low-income-individuals-older-than-sixty-five-65-years-of-age" + + def formula(person, period, parameters): + age = person("age", period) + p = parameters(period).gov.territories.pr.tax.income.credits.low_income + head_or_spouse = person("is_tax_unit_head_or_spouse", period) + age_eligible = age >= p.age_threshold + return head_or_spouse & age_eligible diff --git a/policyengine_us/variables/gov/territories/pr/tax/income/pr_gross_income.py b/policyengine_us/variables/gov/territories/pr/tax/income/pr_gross_income.py new file mode 100644 index 00000000000..4d962915dde --- /dev/null +++ b/policyengine_us/variables/gov/territories/pr/tax/income/pr_gross_income.py @@ -0,0 +1,10 @@ +from policyengine_us.model_api import * + + +class pr_gross_income(Variable): + value_type = float + entity = TaxUnit + label = "Puerto Rico gross income" + unit = USD + definition_period = YEAR + reference = "https://casetext.com/statute/laws-of-puerto-rico/title-thirteen-taxation-and-finance/subtitle-17-internal-revenue-code-of-2011/part-ii-income-taxes/chapter-1005-computation-of-taxable-income/subchapter-a-determination-of-net-income-general-concepts/30101-gross-income"