Skip to content

Commit

Permalink
upstream master
Browse files Browse the repository at this point in the history
Merge branch 'master' of https://github.com/PolicyEngine/policyengine-us into hua7450/issue5109
  • Loading branch information
hua7450 authored Dec 5, 2024
2 parents 6c19cef + fd16a8b commit 58aed6a
Show file tree
Hide file tree
Showing 16 changed files with 153 additions and 20 deletions.
29 changes: 29 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,31 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.156.0] - 2024-12-04 21:38:01

### Added

- Apply the TCJA mortgage value limits under the mortgage interest deduction.

## [1.155.1] - 2024-12-04 19:11:45

### Fixed

- Remove the SNAP child support deduction from the net income computation if applied to gross income.

## [1.155.0] - 2024-12-03 20:23:24

### Added

- Add the Arizona charitable contributions credit to the net income tree.

## [1.154.2] - 2024-12-03 20:14:27

### Changed

- Upgraded minimum policyengine-core version
- Allowed more flexibility in policyengine-us-data version

## [1.154.1] - 2024-12-01 16:39:30

### Fixed
Expand Down Expand Up @@ -10328,6 +10353,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0



[1.156.0]: https://github.com/PolicyEngine/policyengine-us/compare/1.155.1...1.156.0
[1.155.1]: https://github.com/PolicyEngine/policyengine-us/compare/1.155.0...1.155.1
[1.155.0]: https://github.com/PolicyEngine/policyengine-us/compare/1.154.2...1.155.0
[1.154.2]: https://github.com/PolicyEngine/policyengine-us/compare/1.154.1...1.154.2
[1.154.1]: https://github.com/PolicyEngine/policyengine-us/compare/1.154.0...1.154.1
[1.154.0]: https://github.com/PolicyEngine/policyengine-us/compare/1.153.0...1.154.0
[1.153.0]: https://github.com/PolicyEngine/policyengine-us/compare/1.152.0...1.153.0
Expand Down
22 changes: 22 additions & 0 deletions changelog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8756,3 +8756,25 @@
fixed:
- Arkansas 2023 low income tax table parameters.
date: 2024-12-01 16:39:30
- bump: patch
changes:
changed:
- Upgraded minimum policyengine-core version
- Allowed more flexibility in policyengine-us-data version
date: 2024-12-03 20:14:27
- bump: minor
changes:
added:
- Add the Arizona charitable contributions credit to the net income tree.
date: 2024-12-03 20:23:24
- bump: patch
changes:
fixed:
- Remove the SNAP child support deduction from the net income computation if applied
to gross income.
date: 2024-12-04 19:11:45
- bump: minor
changes:
added:
- Apply the TCJA mortgage value limits under the mortgage interest deduction.
date: 2024-12-04 21:38:01
Original file line number Diff line number Diff line change
@@ -1,21 +1,33 @@
description: IRS limits the total home mortgage interest deduction to this amount, based on filing status.
description: The IRS allows an itemized deduction for interest paid on mortgages up to this amount, based on filing status.
SINGLE:
2018-01-01: 1_000_000
2017-01-01: 1_000_000
2018-01-01: 750_000
2026-01-01: 1_000_000
JOINT:
2018-01-01: 1_000_000
2017-01-01: 1_000_000
2018-01-01: 750_000
2026-01-01: 1_000_000
SEPARATE:
2018-01-01: 500_000
2017-01-01: 500_000
2018-01-01: 375_000
2026-01-01: 500_000
HEAD_OF_HOUSEHOLD:
2018-01-01: 1_000_000
2017-01-01: 1_000_000
2018-01-01: 750_000
2026-01-01: 1_000_000
SURVIVING_SPOUSE:
2018-01-01: 1_000_000
2017-01-01: 1_000_000
2018-01-01: 750_000
2026-01-01: 1_000_000
metadata:
breakdown: filing_status
unit: currency-USD
label: IRS home mortgage interest deduction amount cap
period: year
label: IRS home mortgage value cap
reference:
# Hawaii applies this AGI threshold in the state itemized deductions computation
- title: Hawaii Income Tax Law, Chapter 235, Section 235-2.4, (j)(3)
href: https://files.hawaii.gov/tax/legal/hrs/hrs_235.pdf#page=10
- title: 26 U.S. Code § 163 - Interest, (h)(3)(F)
# TCJA adjustemnts described in (h)(3)(F)(i)(II)
- title: 26 U.S. Code § 163 - Interest, (h)(3)(b)(ii)
href: https://www.law.cornell.edu/uscode/text/26/163
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ values:
2019-01-01:
- az_dependent_tax_credit
- az_family_tax_credit
2021-01-01:
- az_charitable_contributions_credit
- az_dependent_tax_credit
- az_family_tax_credit
metadata:
unit: list
period: year
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@
taxable_private_pension_income: 4000
social_security_retirement: 12000
real_estate_taxes: 2000
mortgage_interest: 1000
deductible_mortgage_interest: 1000
self_employment_income: 121010
business_is_qualified: true
business_is_sstb: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
rental_income: 1005
taxable_private_pension_income: 2500
real_estate_taxes: 4000
mortgage_interest: 36000
deductible_mortgage_interest: 36000
self_employment_income: 127010
business_is_qualified: true
business_is_sstb: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -275,11 +275,11 @@
person1:
age: 50
employment_income: 80_000
mortgage_interest: 3_000
deductible_mortgage_interest: 3_000
person2:
age: 50
employment_income: 20_000
mortgage_interest: 3_000
deductible_mortgage_interest: 3_000
tax_units:
tax_unit:
members: [person1, person2]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
period: 2021
input:
real_estate_taxes: 12_000
mortgage_interest: 36_000
deductible_mortgage_interest: 36_000
state_fips: 28 # MS
output: # expected results from filling out 2021 MS form 80-108
ms_itemized_deductions_unit: 46_000
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
filing_status: JOINT
adjusted_gross_income: 364_695
state_and_local_sales_or_income_tax: 19_956
mortgage_interest: 36_000
deductible_mortgage_interest: 36_000
state_code: VA
output:
va_reduced_itemized_deductions: 35_282
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
long_term_capital_gains: 1005.0
rental_income: 2505.0
real_estate_taxes: 24000
mortgage_interest: 14000
deductible_mortgage_interest: 14000
self_employment_income: 141010
business_is_qualified: true
business_is_sstb: false
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
- name: 0 out if gross income deduction is present
period: 2022
input:
child_support_expense: 500
snap_child_support_gross_income_deduction: 500
output:
snap_child_support_deduction: 0

- name: Otherwise, full deduction
period: 2022
input:
child_support_expense: 500
snap_child_support_gross_income_deduction: 0
output:
snap_child_support_deduction: 500
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,33 @@
state_group: CONTIGUOUS_US
output:
snap_net_income: 428.5 * 12

- name: SNAP child support deduction integration test
period: 2024
absolute_error_margin: 0.01
input:
people:
person_1:
age: 30
child_support_expense: 500
person_2:
age: 10
spm_units:
spm_unit:
snap_earned_income: 2_000
snap_unearned_income: 0
members: [person_1, person_2]
snap_standard_deduction: 0
snap_earned_income_deduction: 0
snap_excess_medical_expense_deduction: 0
snap_excess_shelter_expense_deduction: 0
snap_dependent_care_deduction: 0
households:
household:
state_code: DC
output:
snap_child_support_gross_income_deduction: 500
snap_gross_income: 1_500
snap_child_support_deduction: 0
snap_deductions: 0
snap_net_income: 1_500
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,11 @@ class snap_child_support_deduction(Variable):
definition_period = MONTH
reference = "https://www.law.cornell.edu/uscode/text/7/2014#e_4"

adds = ["child_support_expense"]
# Excluding deduction for child support, which is applies to the gross income
# calculation
def formula(spm_unit, period, parameters):
child_support = add(spm_unit, period, ["child_support_expense"])
gross_income_deduction = spm_unit(
"snap_child_support_gross_income_deduction", period
)
return max_(child_support - gross_income_deduction, 0)
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
from policyengine_us.model_api import *


class deductible_mortgage_interest(Variable):
value_type = float
entity = Person
label = "Deductible mortgage interest"
documentation = "Under the interest deduction, the US caps the mortgage value to which interest is applied which based on the year of purchase not tax year."
unit = USD
definition_period = YEAR

# This is a placeholder variable until we can implement the full mortgage interest deduction logic
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ class interest_expense(Variable):
label = "Interest paid on all loans"
unit = USD
definition_period = YEAR
adds = ["mortgage_interest", "non_mortgage_interest"]

adds = ["deductible_mortgage_interest", "non_mortgage_interest"]
7 changes: 4 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

setup(
name="policyengine-us",
version="1.154.1",
version="1.156.0",
author="PolicyEngine",
author_email="[email protected]",
long_description=readme,
Expand All @@ -34,8 +34,9 @@
),
],
install_requires=[
"policyengine-core>=3.10.0",
"policyengine-us-data==1.13.0",
"policyengine-core>=3.14.1",
# Removing the > portion of the below will cause circular dep issues in -us-data
"policyengine-us-data>=1.13.0",
"microdf-python>=0.4.3",
"tqdm",
],
Expand Down

0 comments on commit 58aed6a

Please sign in to comment.