policyengine-us 1.358.1__py3-none-any.whl → 1.360.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of policyengine-us might be problematic. Click here for more details.

Files changed (96) hide show
  1. policyengine_us/parameters/gov/states/dc/dhs/gac/README.md +1 -0
  2. policyengine_us/parameters/gov/states/dc/dhs/gac/income_disregard/amount.yaml +12 -0
  3. policyengine_us/parameters/gov/states/dc/dhs/power/README.md +1 -0
  4. policyengine_us/parameters/gov/states/dc/dhs/power/age_threshold/older.yaml +11 -0
  5. policyengine_us/parameters/gov/states/dc/dhs/power/age_threshold/younger.yaml +11 -0
  6. policyengine_us/parameters/gov/states/dc/dhs/power/disqualifying_benefits.yaml +14 -0
  7. policyengine_us/parameters/gov/states/dc/dhs/qualified_noncitizen_statuses.yaml +21 -0
  8. policyengine_us/parameters/gov/states/dc/dhs/tanf/standard_payment/amount.yaml +1 -1
  9. policyengine_us/parameters/gov/states/dc/dhs/tanf/work_requirement/required_hours/single_parent/amount.yaml +20 -0
  10. policyengine_us/parameters/gov/states/dc/dhs/tanf/work_requirement/required_hours/single_parent/higher/amount.yaml +12 -0
  11. policyengine_us/parameters/gov/states/dc/dhs/tanf/work_requirement/required_hours/single_parent/lower/amount.yaml +12 -0
  12. policyengine_us/parameters/gov/states/dc/dhs/tanf/work_requirement/required_hours/single_parent/lower/young_child_age_threshold.yaml +11 -0
  13. policyengine_us/parameters/gov/states/dc/dhs/tanf/work_requirement/required_hours/two_parents/amount.yaml +12 -0
  14. policyengine_us/parameters/gov/states/dc/dhs/tanf/work_requirement/work_exempted/elderly_age_threshold.yaml +11 -0
  15. policyengine_us/parameters/gov/states/dc/dhs/tanf/work_requirement/work_exempted/infant_age_threshold.yaml +11 -0
  16. policyengine_us/parameters/gov/states/vt/tax/income/agi/retirement_income_exemption/military_retirement/amount.yaml +3 -1
  17. policyengine_us/parameters/gov/states/vt/tax/income/agi/retirement_income_exemption/military_retirement/full_exemption_threshold.yaml +11 -0
  18. policyengine_us/parameters/gov/states/vt/tax/income/agi/retirement_income_exemption/military_retirement/income_based_structure/in_effect.yaml +11 -0
  19. policyengine_us/parameters/gov/states/vt/tax/income/agi/retirement_income_exemption/military_retirement/partial_exemption_threshold.yaml +11 -0
  20. policyengine_us/parameters/gov/states/vt/tax/income/agi/retirement_income_exemption/social_security/reduction/end.yaml +7 -0
  21. policyengine_us/parameters/gov/states/vt/tax/income/agi/retirement_income_exemption/social_security/reduction/start.yaml +7 -0
  22. policyengine_us/parameters/gov/states/vt/tax/income/credits/ctc/age_limit.yaml +3 -0
  23. policyengine_us/parameters/gov/states/vt/tax/income/credits/eitc/enhanced_structure/in_effect.yaml +13 -0
  24. policyengine_us/parameters/gov/states/vt/tax/income/credits/eitc/enhanced_structure/rate.yaml +21 -0
  25. policyengine_us/parameters/gov/states/vt/tax/income/credits/refundable.yaml +8 -1
  26. policyengine_us/parameters/gov/states/vt/tax/income/credits/veteran/amount.yaml +11 -0
  27. policyengine_us/parameters/gov/states/vt/tax/income/credits/veteran/full_credit_threshold.yaml +11 -0
  28. policyengine_us/parameters/gov/states/vt/tax/income/credits/veteran/income_increment.yaml +11 -0
  29. policyengine_us/parameters/gov/states/vt/tax/income/credits/veteran/partial_credit_threshold.yaml +11 -0
  30. policyengine_us/parameters/gov/states/vt/tax/income/credits/veteran/reduction_per_increment.yaml +11 -0
  31. policyengine_us/tests/policy/baseline/gov/hhs/tanf/cash/integration.yaml +1 -0
  32. policyengine_us/tests/policy/baseline/gov/states/dc/dhs/dc_pap_eligible_child.yaml +47 -0
  33. policyengine_us/tests/policy/baseline/gov/states/dc/dhs/gac/dc_gac.yaml +86 -0
  34. policyengine_us/tests/policy/baseline/gov/states/dc/dhs/gac/dc_gac_standard_payment.yaml +39 -0
  35. policyengine_us/tests/policy/baseline/gov/states/dc/dhs/gac/eligibility/dc_gac_eligible.yaml +39 -0
  36. policyengine_us/tests/policy/baseline/gov/states/dc/dhs/gac/eligibility/dc_gac_eligible_child.yaml +58 -0
  37. policyengine_us/tests/policy/baseline/gov/states/dc/dhs/gac/eligibility/dc_gac_income_eligible.yaml +26 -0
  38. policyengine_us/tests/policy/baseline/gov/states/dc/dhs/gac/income/dc_gac_earned_income_after_disregard_person.yaml +32 -0
  39. policyengine_us/tests/policy/baseline/gov/states/dc/dhs/integration_tests.yaml +171 -0
  40. policyengine_us/tests/policy/baseline/gov/states/dc/dhs/power/dc_power.yaml +26 -0
  41. policyengine_us/tests/policy/baseline/gov/states/dc/dhs/power/dc_power_eligible.yaml +94 -0
  42. policyengine_us/tests/policy/baseline/gov/states/dc/dhs/power/dc_power_head_or_spouse_eligible.yaml +84 -0
  43. policyengine_us/tests/policy/baseline/gov/states/dc/dhs/tanf/dc_tanf_assistance_unit_size.yaml +17 -0
  44. policyengine_us/tests/policy/baseline/gov/states/dc/dhs/tanf/dc_tanf_standard_payment.yaml +5 -5
  45. policyengine_us/tests/policy/baseline/gov/states/dc/dhs/tanf/eligibility/dc_tanf_basic_eligibility_requirements.yaml +39 -0
  46. policyengine_us/tests/policy/baseline/gov/states/dc/dhs/tanf/eligibility/dc_tanf_demographic_eligible_person.yaml +11 -0
  47. policyengine_us/tests/policy/baseline/gov/states/dc/dhs/tanf/eligibility/dc_tanf_eligible.yaml +6 -6
  48. policyengine_us/tests/policy/baseline/gov/states/dc/dhs/tanf/eligibility/dc_tanf_immigration_status_eligible_person.yaml +0 -12
  49. policyengine_us/tests/policy/baseline/gov/states/dc/dhs/tanf/eligibility/dc_tanf_income_eligible.yaml +0 -2
  50. policyengine_us/tests/policy/baseline/gov/states/dc/dhs/tanf/integration.yaml +6 -2
  51. policyengine_us/tests/policy/baseline/gov/states/dc/dhs/tanf/work_requirement/dc_tanf_is_working.yaml +128 -0
  52. policyengine_us/tests/policy/baseline/gov/states/dc/dhs/tanf/work_requirement/dc_tanf_meets_work_requirements.yaml +53 -0
  53. policyengine_us/tests/policy/baseline/gov/states/dc/dhs/tanf/work_requirement/dc_tanf_work_requirement_exempt.yaml +81 -0
  54. policyengine_us/tests/policy/baseline/gov/states/vt/tax/income/agi/subtractions/vt_military_retirement_pay_exclusion.yaml +55 -0
  55. policyengine_us/tests/policy/baseline/gov/states/vt/tax/income/agi/subtractions/vt_retirement_income_exemption.yaml +53 -0
  56. policyengine_us/tests/policy/baseline/gov/states/vt/tax/income/credits/vt_ctc.yaml +37 -0
  57. policyengine_us/tests/policy/baseline/gov/states/vt/tax/income/credits/vt_veteran_tax_credit.yaml +151 -0
  58. policyengine_us/tests/policy/baseline/gov/states/vt/tax/income/vt_eitc.yaml +39 -0
  59. policyengine_us/tests/variables/gov/states/vt/tax/income/adjusted_gross_income/subtractions/retirement_income_exemption/vt_military_retirement_income_based_exemption.yaml +106 -0
  60. policyengine_us/tests/variables/gov/states/vt/tax/income/credits/vt_veteran_tax_credit.yaml +129 -0
  61. policyengine_us/tests/variables/gov/states/vt/tax/income/vt_eitc.yaml +100 -0
  62. policyengine_us/variables/gov/states/dc/dhs/dc_pap_eligible_child.py +23 -0
  63. policyengine_us/variables/gov/states/dc/dhs/gac/dc_gac.py +18 -0
  64. policyengine_us/variables/gov/states/dc/dhs/gac/dc_gac_assistance_unit_size.py +15 -0
  65. policyengine_us/variables/gov/states/dc/dhs/gac/dc_gac_standard_payment.py +19 -0
  66. policyengine_us/variables/gov/states/dc/dhs/gac/eligibility/dc_gac_eligible.py +20 -0
  67. policyengine_us/variables/gov/states/dc/dhs/gac/eligibility/dc_gac_eligible_child.py +15 -0
  68. policyengine_us/variables/gov/states/dc/dhs/gac/eligibility/dc_gac_income_eligible.py +19 -0
  69. policyengine_us/variables/gov/states/dc/dhs/gac/income/dc_gac_countable_income.py +18 -0
  70. policyengine_us/variables/gov/states/dc/dhs/gac/income/dc_gac_countable_unearned_income_person.py +17 -0
  71. policyengine_us/variables/gov/states/dc/dhs/gac/income/dc_gac_earned_income_after_disregard_person.py +28 -0
  72. policyengine_us/variables/gov/states/dc/dhs/power/dc_power.py +18 -0
  73. policyengine_us/variables/gov/states/dc/dhs/power/dc_power_eligible.py +30 -0
  74. policyengine_us/variables/gov/states/dc/dhs/power/dc_power_has_disqualifying_beneifts.py +14 -0
  75. policyengine_us/variables/gov/states/dc/dhs/power/dc_power_head_or_spouse_eligible.py +38 -0
  76. policyengine_us/variables/gov/states/dc/dhs/tanf/dc_tanf_assistance_unit_size.py +15 -0
  77. policyengine_us/variables/gov/states/dc/dhs/tanf/dc_tanf_standard_payment.py +1 -1
  78. policyengine_us/variables/gov/states/dc/dhs/tanf/eligibility/dc_tanf_basic_eligibility_requirements.py +18 -0
  79. policyengine_us/variables/gov/states/dc/dhs/tanf/eligibility/dc_tanf_demographic_eligible_person.py +10 -12
  80. policyengine_us/variables/gov/states/dc/dhs/tanf/eligibility/dc_tanf_eligible.py +5 -17
  81. policyengine_us/variables/gov/states/dc/dhs/tanf/eligibility/dc_tanf_immigration_status_eligible_person.py +6 -1
  82. policyengine_us/variables/gov/states/dc/dhs/tanf/income/dc_tanf_countable_income.py +6 -1
  83. policyengine_us/variables/gov/states/dc/dhs/tanf/work_requirement/dc_tanf_is_working.py +40 -0
  84. policyengine_us/variables/gov/states/dc/dhs/tanf/work_requirement/dc_tanf_meets_work_requirements.py +22 -0
  85. policyengine_us/variables/gov/states/dc/dhs/tanf/work_requirement/dc_tanf_work_requirement_exempt.py +39 -0
  86. policyengine_us/variables/gov/states/vt/tax/income/adjusted_gross_income/subtractions/retirement_income_exemption/vt_military_retirement_cap_based_exemption.py +25 -0
  87. policyengine_us/variables/gov/states/vt/tax/income/adjusted_gross_income/subtractions/retirement_income_exemption/vt_military_retirement_income_based_exemption.py +79 -0
  88. policyengine_us/variables/gov/states/vt/tax/income/adjusted_gross_income/subtractions/retirement_income_exemption/vt_military_retirement_pay_exclusion.py +19 -4
  89. policyengine_us/variables/gov/states/vt/tax/income/credits/vt_veteran_tax_credit.py +58 -0
  90. policyengine_us/variables/gov/states/vt/tax/income/vt_eitc.py +9 -1
  91. policyengine_us/variables/household/demographic/person/is_related_to_head_or_spouse.py +9 -0
  92. {policyengine_us-1.358.1.dist-info → policyengine_us-1.360.0.dist-info}/METADATA +1 -1
  93. {policyengine_us-1.358.1.dist-info → policyengine_us-1.360.0.dist-info}/RECORD +96 -29
  94. {policyengine_us-1.358.1.dist-info → policyengine_us-1.360.0.dist-info}/WHEEL +0 -0
  95. {policyengine_us-1.358.1.dist-info → policyengine_us-1.360.0.dist-info}/entry_points.txt +0 -0
  96. {policyengine_us-1.358.1.dist-info → policyengine_us-1.360.0.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,18 @@
1
+ from policyengine_us.model_api import *
2
+
3
+
4
+ class dc_tanf_basic_eligibility_requirements(Variable):
5
+ value_type = bool
6
+ entity = SPMUnit
7
+ label = "Basic eligibility requirements for DC Temporary Assistance for Needy Families (TANF)"
8
+ definition_period = MONTH
9
+ reference = "https://dhs.dc.gov/service/tanf-district-families"
10
+ defined_for = StateCode.DC
11
+
12
+ def formula(spm_unit, period, parameters):
13
+ demographic_eligible = (
14
+ add(spm_unit, period, ["dc_tanf_demographic_eligible_person"]) > 0
15
+ )
16
+ income_eligible = spm_unit("dc_tanf_income_eligible", period)
17
+ resources_eligible = spm_unit("dc_tanf_resources_eligible", period)
18
+ return demographic_eligible & income_eligible & resources_eligible
@@ -13,17 +13,15 @@ class dc_tanf_demographic_eligible_person(Variable):
13
13
  defined_for = StateCode.DC
14
14
 
15
15
  def formula(person, period, parameters):
16
- p = parameters(period).gov.states.dc.dhs.tanf.age_threshold
17
- age = person("monthly_age", period)
18
- dependent = person("is_tax_unit_dependent", period)
19
- minor_child = age < p.minor_child
20
- eligible_minor_child = minor_child & dependent
21
-
22
- student_dependent = age < p.student_dependent
23
- secondary_school_student = person("is_in_secondary_school", period)
24
- eligible_student_dependent = (
25
- secondary_school_student & student_dependent & dependent
16
+ pap_eligible_child = person("dc_pap_eligible_child", period)
17
+ related_to_head_or_spouse = person(
18
+ "is_related_to_head_or_spouse", period
26
19
  )
27
-
28
20
  pregnant = person("is_pregnant", period)
29
- return eligible_minor_child | eligible_student_dependent | pregnant
21
+ immigration_status_eligible = person(
22
+ "dc_tanf_immigration_status_eligible_person", period
23
+ )
24
+
25
+ return (pap_eligible_child & related_to_head_or_spouse) | (
26
+ pregnant & immigration_status_eligible
27
+ )
@@ -10,22 +10,10 @@ class dc_tanf_eligible(Variable):
10
10
  defined_for = StateCode.DC
11
11
 
12
12
  def formula(spm_unit, period, parameters):
13
- demographic_eligible = (
14
- add(spm_unit, period, ["dc_tanf_demographic_eligible_person"]) > 0
13
+ meets_basic_eligibility_requirements = spm_unit(
14
+ "dc_tanf_basic_eligibility_requirements", period
15
15
  )
16
- income_eligible = spm_unit("dc_tanf_income_eligible", period)
17
- resources_eligible = spm_unit("dc_tanf_resources_eligible", period)
18
- immigration_status_eligible = (
19
- add(
20
- spm_unit,
21
- period,
22
- ["dc_tanf_immigration_status_eligible_person"],
23
- )
24
- > 0
25
- )
26
- return (
27
- demographic_eligible
28
- & income_eligible
29
- & resources_eligible
30
- & immigration_status_eligible
16
+ meets_work_requirements = spm_unit(
17
+ "dc_tanf_meets_work_requirements", period
31
18
  )
19
+ return meets_basic_eligibility_requirements & meets_work_requirements
@@ -12,9 +12,14 @@ class dc_tanf_immigration_status_eligible_person(Variable):
12
12
  defined_for = StateCode.DC
13
13
 
14
14
  def formula(person, period, parameters):
15
- qualified_noncitizen = person("is_ssi_qualified_noncitizen", period)
15
+ p = parameters(period).gov.states.dc.dhs
16
16
  immigration_status = person("immigration_status", period)
17
+ immigration_status_str = immigration_status.decode_to_str()
17
18
  is_citizen = (
18
19
  immigration_status == immigration_status.possible_values.CITIZEN
19
20
  )
21
+ qualified_noncitizen = np.isin(
22
+ immigration_status_str,
23
+ p.qualified_noncitizen_statuses,
24
+ )
20
25
  return qualified_noncitizen | is_citizen
@@ -20,5 +20,10 @@ class dc_tanf_countable_income(Variable):
20
20
  "dc_tanf_countable_unearned_income",
21
21
  ],
22
22
  )
23
+ # Exclude income from GAC, this only applies when the child in household is unrelated to
24
+ # the head or spouse
25
+ gac_countable_income = spm_unit("dc_gac_countable_income", period)
23
26
  childcare_deduction = spm_unit("dc_tanf_childcare_deduction", period)
24
- return max_(income_sources - childcare_deduction, 0)
27
+ return max_(
28
+ income_sources - gac_countable_income - childcare_deduction, 0
29
+ )
@@ -0,0 +1,40 @@
1
+ from policyengine_us.model_api import *
2
+
3
+
4
+ class dc_tanf_is_working(Variable):
5
+ value_type = bool
6
+ entity = Person
7
+ label = "Person is working under the work requirement for DC Temporary Assistance for Needy Families (TANF)"
8
+ definition_period = MONTH
9
+ reference = (
10
+ "https://code.dccouncil.gov/us/dc/council/code/sections/4-205.19b"
11
+ )
12
+ defined_for = StateCode.DC
13
+
14
+ def formula(person, period, parameters):
15
+ p = parameters(
16
+ period
17
+ ).gov.states.dc.dhs.tanf.work_requirement.required_hours
18
+ weekly_hours_worked = person("weekly_hours_worked", period.this_year)
19
+ age = person("monthly_age", period)
20
+ # For single parent with a child under 6, work 20 hours pr week
21
+ # For single parent with a child at 6 or older, work 30 hours pr week
22
+ spm_unit = person.spm_unit
23
+ is_youngest_member = person.get_rank(spm_unit, age, spm_unit) == 0
24
+ youngest_age = spm_unit.sum(is_youngest_member * age)
25
+ single_parent_requirement = (
26
+ weekly_hours_worked >= p.single_parent.amount.calc(youngest_age)
27
+ )
28
+ # For 2-parent, work 35 hours pr week (combined)
29
+ # Or 55 hours per week if family receives federally-funded childcare and
30
+ # no adult has a disability (not modeled)
31
+ is_head_or_spouse = person("is_tax_unit_head_or_spouse", period)
32
+ parent_hours = where(is_head_or_spouse, weekly_hours_worked, 0)
33
+ combined_parent_hours = spm_unit.sum(parent_hours)
34
+ two_parent_requirement = combined_parent_hours >= p.two_parents.amount
35
+ is_two_parent_unit = spm_unit.sum(is_head_or_spouse) > 1
36
+ return where(
37
+ is_two_parent_unit,
38
+ two_parent_requirement,
39
+ single_parent_requirement,
40
+ )
@@ -0,0 +1,22 @@
1
+ from policyengine_us.model_api import *
2
+
3
+
4
+ class dc_tanf_meets_work_requirements(Variable):
5
+ value_type = bool
6
+ entity = SPMUnit
7
+ label = "Work requirement satisfied for DC Temporary Assistance for Needy Families (TANF)"
8
+ definition_period = MONTH
9
+ reference = (
10
+ "https://code.dccouncil.gov/us/dc/council/code/sections/4-205.19b",
11
+ "https://code.dccouncil.gov/us/dc/council/code/sections/4-205.19g",
12
+ )
13
+ defined_for = StateCode.DC
14
+
15
+ def formula(spm_unit, period, parameters):
16
+ person = spm_unit.members
17
+ is_working = person("dc_tanf_is_working", period)
18
+ work_requirement_exempt = person(
19
+ "dc_tanf_work_requirement_exempt", period
20
+ )
21
+ meets_work_requirements = is_working | work_requirement_exempt
22
+ return spm_unit.sum(~meets_work_requirements) == 0
@@ -0,0 +1,39 @@
1
+ from policyengine_us.model_api import *
2
+
3
+
4
+ class dc_tanf_work_requirement_exempt(Variable):
5
+ value_type = bool
6
+ entity = Person
7
+ definition_period = MONTH
8
+ label = "Exempted from working requirement for DC Temporary Assistance for Needy Families (TANF)"
9
+ reference = (
10
+ "https://code.dccouncil.gov/us/dc/council/code/sections/4-205.19g"
11
+ )
12
+ defined_for = StateCode.DC
13
+
14
+ def formula(person, period, parameters):
15
+ p = parameters(
16
+ period
17
+ ).gov.states.dc.dhs.tanf.work_requirement.work_exempted
18
+ age = person("monthly_age", period)
19
+ # (1) Eligible child who are not the head of an assistance unit can exempt
20
+ eligible_child = person("dc_pap_eligible_child", period)
21
+ # (2) Single parent works more than 30 hours per week (modeled in work requirements)
22
+ # (3) Two-parent work more than 35 hours per week (modeled in work requirements)
23
+ # (4) Single parent can exempt with infant less than 1 years old can exempt
24
+ filing_status = person.tax_unit("filing_status", period)
25
+ joint = filing_status == filing_status.possible_values.JOINT
26
+ has_infant = person.spm_unit.any(age < p.infant_age_threshold)
27
+ is_head = person("is_tax_unit_head", period)
28
+ single_parent_exempt = ~joint & has_infant & is_head
29
+ # (5) Person older than 60 can exempt
30
+ elderly = age > p.elderly_age_threshold
31
+ # (6) Individuals who are enrolled in post-secondary educational institutions
32
+ is_college_student = person("is_full_time_college_student", period)
33
+
34
+ return (
35
+ eligible_child
36
+ | single_parent_exempt
37
+ | elderly
38
+ | is_college_student
39
+ )
@@ -0,0 +1,25 @@
1
+ from policyengine_us.model_api import *
2
+
3
+
4
+ class vt_military_retirement_cap_based_exemption(Variable):
5
+ value_type = float
6
+ entity = TaxUnit
7
+ definition_period = YEAR
8
+ label = "Vermont military retirement cap-based exemption"
9
+ reference = "https://tax.vermont.gov/sites/tax/files/documents/IN-112-Instr-2024.pdf#page=2"
10
+ unit = USD
11
+ defined_for = StateCode.VT
12
+ documentation = "Vermont military retirement benefits exempt from Vermont taxation up to cap amount (pre-2025)."
13
+
14
+ def formula(tax_unit, period, parameters):
15
+ p = parameters(
16
+ period
17
+ ).gov.states.vt.tax.income.agi.retirement_income_exemption.military_retirement
18
+
19
+ # Get retirement amount from military retirement system
20
+ tax_unit_military_retirement_pay = add(
21
+ tax_unit, period, ["military_retirement_pay"]
22
+ )
23
+
24
+ # Cap exemption at the specified amount
25
+ return min_(tax_unit_military_retirement_pay, p.amount)
@@ -0,0 +1,79 @@
1
+ from policyengine_us.model_api import *
2
+ import numpy as np
3
+
4
+
5
+ class vt_military_retirement_income_based_exemption(Variable):
6
+ value_type = float
7
+ entity = TaxUnit
8
+ definition_period = YEAR
9
+ label = "Vermont military retirement income-based exemption"
10
+ reference = "https://legislature.vermont.gov/Documents/2026/Docs/BILLS/S-0051/S-0051%20As%20Passed%20by%20Both%20House%20and%20Senate%20Official.pdf#page=10"
11
+ unit = USD
12
+ defined_for = StateCode.VT
13
+ documentation = "Vermont military retirement benefits exempt from Vermont taxation based on AGI thresholds (2025+)."
14
+
15
+ def formula(tax_unit, period, parameters):
16
+ p = parameters(
17
+ period
18
+ ).gov.states.vt.tax.income.agi.retirement_income_exemption.military_retirement
19
+
20
+ # Get retirement amount from military retirement system
21
+ tax_unit_military_retirement_pay = add(
22
+ tax_unit, period, ["military_retirement_pay"]
23
+ )
24
+
25
+ agi = tax_unit("adjusted_gross_income", period)
26
+
27
+ # Check if thresholds are finite (feature is active)
28
+ thresholds_are_finite = ~np.isinf(
29
+ p.full_exemption_threshold
30
+ ) & ~np.isinf(p.partial_exemption_threshold)
31
+
32
+ # Full exemption if below the threshold AND thresholds are finite
33
+ eligible_for_full_exemption = thresholds_are_finite & (
34
+ agi < p.full_exemption_threshold
35
+ )
36
+
37
+ # Partial exemption if between the thresholds AND thresholds are finite
38
+ eligible_for_partial_exemption = (
39
+ thresholds_are_finite
40
+ & (agi >= p.full_exemption_threshold)
41
+ & (agi <= p.partial_exemption_threshold)
42
+ )
43
+
44
+ # Calculate partial exemption amount (linear phaseout)
45
+ threshold_difference = (
46
+ p.partial_exemption_threshold - p.full_exemption_threshold
47
+ )
48
+ agi_below_threshold = max_(p.partial_exemption_threshold - agi, 0)
49
+
50
+ # Use mask to avoid division by zero
51
+ valid_threshold_difference = threshold_difference != 0
52
+ partial_exemption_amount = where(
53
+ valid_threshold_difference,
54
+ tax_unit_military_retirement_pay
55
+ * agi_below_threshold
56
+ / threshold_difference,
57
+ 0,
58
+ )
59
+
60
+ # Calculate exemption amounts for each case
61
+ full_exemption_amount = tax_unit_military_retirement_pay
62
+ partial_exemption_amount_capped = max_(partial_exemption_amount, 0)
63
+ no_exemption_amount = 0
64
+
65
+ # First determine if partial or no exemption
66
+ partial_or_no_exemption = where(
67
+ eligible_for_partial_exemption,
68
+ partial_exemption_amount_capped,
69
+ no_exemption_amount,
70
+ )
71
+
72
+ # Then determine final exemption amount
73
+ exemption_amount = where(
74
+ eligible_for_full_exemption,
75
+ full_exemption_amount,
76
+ partial_or_no_exemption,
77
+ )
78
+
79
+ return exemption_amount
@@ -17,7 +17,6 @@ class vt_military_retirement_pay_exclusion(Variable):
17
17
  )
18
18
 
19
19
  def formula(tax_unit, period, parameters):
20
- person = tax_unit.members
21
20
  p = parameters(
22
21
  period
23
22
  ).gov.states.vt.tax.income.agi.retirement_income_exemption
@@ -25,7 +24,23 @@ class vt_military_retirement_pay_exclusion(Variable):
25
24
  tax_unit_military_retirement_pay = add(
26
25
  tax_unit, period, ["military_retirement_pay"]
27
26
  )
28
- # Retirement income from systems other than social security have maximum amount.
29
- return min_(
30
- tax_unit_military_retirement_pay, p.military_retirement.amount
27
+
28
+ # S.51 (2025): Income-based military pension exemption
29
+ is_income_based_system = (
30
+ p.military_retirement.income_based_structure.in_effect
31
+ )
32
+ agi = tax_unit("adjusted_gross_income", period)
33
+
34
+ # Calculate exemption based on system type
35
+ income_based_exemption = tax_unit(
36
+ "vt_military_retirement_income_based_exemption", period
37
+ )
38
+ cap_based_exemption = tax_unit(
39
+ "vt_military_retirement_cap_based_exemption", period
40
+ )
41
+
42
+ return where(
43
+ is_income_based_system,
44
+ income_based_exemption,
45
+ cap_based_exemption,
31
46
  )
@@ -0,0 +1,58 @@
1
+ from policyengine_us.model_api import *
2
+
3
+
4
+ class vt_veteran_tax_credit(Variable):
5
+ value_type = float
6
+ entity = TaxUnit
7
+ label = "Vermont veteran tax credit"
8
+ definition_period = YEAR
9
+ unit = USD
10
+ reference = [
11
+ "https://vtdigger.org/2025/06/25/gov-phil-scott-signs-13-5-million-tax-credit-package-benefiting-low-income-workers-families-retirees-and-veterans/"
12
+ ]
13
+ defined_for = StateCode.VT
14
+ documentation = "Vermont veteran tax credit providing $250 refundable credit for low-income veterans as part of S.51 (2025) tax relief package."
15
+
16
+ def formula(tax_unit, period, parameters):
17
+ # Check if anyone in tax unit is a veteran
18
+ person = tax_unit.members
19
+ is_veteran = person("is_veteran", period)
20
+ veteran_present = tax_unit.any(is_veteran)
21
+
22
+ # Get parameters for veteran credit
23
+ p = parameters(period).gov.states.vt.tax.income.credits.veteran
24
+
25
+ # Get adjusted gross income for phaseout
26
+ agi = tax_unit("adjusted_gross_income", period)
27
+
28
+ # Full credit for households under $25k AGI
29
+ # Partial credit for households under $30k AGI
30
+
31
+ # Calculate credit amount based on veteran status and income
32
+ eligible_for_full_credit = veteran_present & (
33
+ agi < p.full_credit_threshold
34
+ )
35
+ eligible_for_partial_credit = (
36
+ veteran_present
37
+ & (agi >= p.full_credit_threshold)
38
+ & (agi < p.partial_credit_threshold)
39
+ )
40
+
41
+ # Calculate partial credit amount based on parameterized reduction structure
42
+ excess_income = agi - p.full_credit_threshold
43
+ # Number of income increments (rounded up)
44
+ income_increments = np.ceil(excess_income / p.income_increment)
45
+ # Reduction per increment
46
+ reduction_amount = income_increments * p.reduction_per_increment
47
+ # Calculate partial credit (minimum of 0)
48
+ partial_credit_amount = max_(p.amount - reduction_amount, 0)
49
+
50
+ return where(
51
+ eligible_for_full_credit,
52
+ p.amount,
53
+ where(
54
+ eligible_for_partial_credit,
55
+ partial_credit_amount,
56
+ 0,
57
+ ),
58
+ )
@@ -12,5 +12,13 @@ class vt_eitc(Variable):
12
12
 
13
13
  def formula(tax_unit, period, parameters):
14
14
  federal_eitc = tax_unit("eitc", period)
15
- rate = parameters(period).gov.states.vt.tax.income.credits.eitc.match
15
+ p = parameters(period).gov.states.vt.tax.income.credits.eitc
16
+ child_dependents = tax_unit("tax_unit_child_dependents", period)
17
+
18
+ rate = where(
19
+ p.enhanced_structure.in_effect,
20
+ p.enhanced_structure.rate.calc(child_dependents),
21
+ p.match,
22
+ )
23
+
16
24
  return federal_eitc * rate
@@ -0,0 +1,9 @@
1
+ from policyengine_us.model_api import *
2
+
3
+
4
+ class is_related_to_head_or_spouse(Variable):
5
+ value_type = bool
6
+ entity = Person
7
+ label = "Person is related to head or spouse"
8
+ definition_period = YEAR
9
+ default_value = True
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: policyengine-us
3
- Version: 1.358.1
3
+ Version: 1.360.0
4
4
  Summary: Add your description here.
5
5
  Author-email: PolicyEngine <hello@policyengine.org>
6
6
  License-File: LICENSE