PolicyEngine / policyengine-us

The PolicyEngine US Python package contains a rules engine of the US tax-benefit system, and microdata generation for microsimulation analysis.
https://policyengine.org/us
GNU Affero General Public License v3.0
103 stars 176 forks source link

Child/dependent care credit should be refundable in 2021 #1571

Closed martinholmer closed 1 year ago

martinholmer commented 1 year ago

According to the 2021 IRS Publication 503, the CDCC was refundable in 2021. It does not seem as if PolicyEngineUS incorporates this one-year feature. But because TAXSIM35 does make the CDCC refundable in 2021, the following test case has a $5000 difference in the US income tax liability.

- name: Tax unit with taxsimid 80649 in r21.its.csv and r21.ots.csv
  absolute_error_margin: 0.01
  period: 2021
  input:
    people:
      person1:
        is_tax_unit_head: true
        age: 58
        employment_income: 21_010
        taxable_interest_income: 1_010
        social_security: 23_000
        real_estate_taxes: 14_000
        interest_expense: 22_000
        ssi: 0  # not in TAXSIM35
        state_supplement: 0  # not in TAXSIM35
        wic: 0  # not in TAXSIM35
      person2:
        age: 11
        ssi: 0  # not in TAXSIM35
        state_supplement: 0  # not in TAXSIM35
        wic: 0  # not in TAXSIM35
      person3:
        age: 11
        ssi: 0  # not in TAXSIM35
        state_supplement: 0  # not in TAXSIM35
        wic: 0  # not in TAXSIM35
    spm_units:
      spm_unit:
        members: [person1, person2, person3]
        snap: 0  # not in TAXSIM35
        tanf: 0  # not in TAXSIM35
    tax_units:
      tax_unit:
        members: [person1, person2, person3]
        tax_unit_childcare_expenses: 10_000
        premium_tax_credit: 0  # not in TAXSIM35
    households:
      household:
        members: [person1, person2, person3]
        state_code: TX  # no state income tax
  output:  # expected results from TAXSIM35 12/08/22 version
    taxsim_tfica: 1_607.26
    income_tax: -19_756.34

Here is the test result:

================================= FAILURES ===================================
_______________________________ test session _________________________________
/Users/mrh/work/Policy-Engine-US/US/r21-id80649.yaml:
  Test 'Tax unit with taxsimid 80649 in r21.its.csv and r21.ots.csv':
    income_tax@2021: [-14756.344] differs from -19756.33984375 
                                  with an absolute margin [4999.996] > 0.01
========================= short test summary info ============================
FAILED r21-id80649.yaml::
============================ 1 failed in 1.53s ===============================

The two models agree on AGI, itemized deductions, taxable income (zero), and on the CTC and EITC and RRC amounts. But TAXSIM35 gives this household a $5,000 refundable CDCC, while PolicyEngineUS does not (evidently because it thinks the CDCC was a non-refundable credit in 2021).

MaxGhenis commented 1 year ago

Interesting, we do put cdcc in the correct parameter files for 2021, need to look more

https://github.com/PolicyEngine/policyengine-us/blob/master/policyengine_us/parameters/gov/irs/credits/non_refundable.yaml

https://github.com/PolicyEngine/policyengine-us/blob/master/policyengine_us/parameters/gov/irs/credits/refundable.yaml

Here's this case in taxsim.app

martinholmer commented 1 year ago

Two weeks ago in issue #1571, @MaxGhenis said:

Interesting, we do put cdcc in the correct parameter files for 2021 ...

Yes, but PR #1547 removed references to those two time-varying parameter lists, and thus introduced the bug document in this issue.

MaxGhenis commented 1 year ago

Ah right, I think we should first fix https://github.com/PolicyEngine/policyengine-core/issues/68 in that case. If we merge #1624, we'll lose the drill-down capabilities in the net income screen, which only works with adds and subtracts, not sum_of_variables.

martinholmer commented 1 year ago

@MaxGhenis said:

Ah right, I think we should first fix https://github.com/PolicyEngine/policyengine-core/issues/68 in that case. If we merge https://github.com/PolicyEngine/policyengine-us/pull/1624, we'll lose the drill-down capabilities in the net income screen, which only works with adds and subtracts, not sum_of_variables.

OK, when will PolicyEngine-Core be fixed? It has been almost a week since you raised the issue.

MaxGhenis commented 1 year ago

Core now supports parameters in adds/subtracts

martinholmer commented 1 year ago

@MaxGhenis said:

Core now supports parameters in adds/subtracts

Great! Do you want to prepare the PR that fixes issue #1571 using the add with parameters?