Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Puerto Rico Earned Income Credit #5479

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
llennemann marked this conversation as resolved.
Show resolved Hide resolved
llennemann marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
description:
values:
2010-12-31: 2_200
metadata:
unit: currency-USD
label:
period: year
reference:
- title:
href:
Copy link
Collaborator

@PavelMakarchuk PavelMakarchuk Jan 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets make three new files (both marginal rate parameters):
phase_in_rate.yaml - 3.5 to 6%
max_credit.yaml : $600 (maybe changes by year)

phase_out_rate.yaml marginal_rate parameter

brackets:
  - threshold:
      0000-01-01: 0
    rate:
      2022-01-01: 0
  - threshold:
      2022-01-01: 10_000
    rate:
      2022-01-01: 0.02
  - threshold:
      2022-01-01: 35_000
    rate:
      2022-01-01: 0

For the computation of the credit:

  1. Calculate credit amount pre phase out
    Income * phase_in_rate capped at max_credit
  2. Calculate the phase_out
    p.phase_out_rate.calc(income)
  3. Calculate final value
    credit - phase_out

Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
description:
values:
2010-12-31: 3.5
llennemann marked this conversation as resolved.
Show resolved Hide resolved
2011-12-31: 4
2012-12-31: 4.5
2013-12-31: 5
2014-12-31: 5.5
2015-12-31: 6

metadata:
unit: percent
llennemann marked this conversation as resolved.
Show resolved Hide resolved
label:
period: year
reference:
- title:
href:
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
description:
values:
2010-12-31: 2

metadata:
unit: percent
label:
period: year
reference:
- title:
href:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably dont need this as it is mathematically derived

Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
description:
values:
2010-12-31: 22_500
2011-12-31: 25_000
2012-12-31: 27_500
2013-12-31: 30_000
2014-12-31: 32_500
2015-12-31: 35_000

metadata:
unit: currency-USD
label:
period: year
reference:
- title:
href:
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
description:
values:
2010-12-31: 10_000

metadata:
unit: currency-USD
label:
period: year
reference:
- title:
href:
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
from policyengine_us.model_api import *


class pr_earned_income_credit_eligible(Variable):
value_type = bool
unit = USD
llennemann marked this conversation as resolved.
Show resolved Hide resolved
entity = Person
label = ""
definition_period = YEAR
reference = ""

def formula(person, period, parameters):
p = parameters(
period
).gov.territories.pr.tax.income.credits.earned_income
head_or_spouse = person("is_tax_unit_head_or_spouse", period)
net_income = person("") # if net_income (interest, child care payments etc.)

return head_or_spouse & net_income < p.net_income_limit
Loading