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

TAXSIM-35 Validation, "c" files #2708

Merged
merged 12 commits into from
Mar 12, 2024
Merged

Conversation

jdebacker
Copy link
Member

@jdebacker jdebacker commented Jan 16, 2024

This PR works through the validation of the "c" files in the TAXSIM-35 validation suite.

To validate:

  • 2017
  • 2018
  • 2019
  • 2020
  • 2021

@jdebacker
Copy link
Member Author

@bodiyang Differences in the "c" file set that are not already documented in the "a" and "b" validation include:

  • c04470, itemized deductions above the phaseout
    • This variable appears to always be zero in TAXSIM-35
  • c07180, non-refundable CDCC
    • This may have to do with differences we've noted in how the two calculators output refundable credits vs not (and the correction to make them more similar in 2021 in process_tc_output.py)

Copy link

codecov bot commented Jan 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.54%. Comparing base (39f7502) to head (a2173ff).
Report is 1 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2708   +/-   ##
=======================================
  Coverage   98.54%   98.54%           
=======================================
  Files          14       14           
  Lines        2616     2616           
=======================================
  Hits         2578     2578           
  Misses         38       38           
Flag Coverage Δ
unittests 98.54% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

@bodiyang
Copy link
Contributor

bodiyang commented Jan 19, 2024

For c04470 itemized deduction after phase out, I have conducted manual calculations upon number of records showing differences. I am followingForm 1040 SchA. My manual calculation matches with the Tax-Calculator.

Here are some example records:
(1)
taxsimid 2 year 2021 state mstat 1 page 33 sage depx 0 dep13 0 dep17 0 dep18 0 pwages 51000 swages psemp 223 ssemp 0 dividends 15000 intrec 2000 stcg -9000 ltcg 5000 otherprop 0 nonprop 29000 pensions 39000 gssi 47000 pui 0 sui 7000 transfers rentpaid proptax 7000 otheritem 10000 childcare 0 mortgage 3000 scorp 350000 pbusinc 78000 pprofinc sbusinc sprofinc idtl

c04470 itemized deduction after phase out: Tax-Calculator 13000; Taxsim35 0; Manual Calculation 13000

(2)
taxsimid 30 year 2021 state mstat 2 page 65 sage 72 depx 3 dep13 1 dep17 1 dep18 1 pwages 21000 swages 10000 psemp 216 ssemp 43 dividends 3000 intrec 1000 stcg -9000 ltcg 10000 otherprop 27000 nonprop 20000 pensions 45000 gssi 33000 pui 6000 sui 3000 transfers rentpaid proptax 25000 otheritem 6000 childcare 8000 mortgage 11000 scorp 121000 pbusinc 202000 pprofinc sbusinc 55000 sprofinc idtl

c04470 itemized deduction after phase out: Tax-Calculator 21000; Taxsim35 0; Manual Calculation 21000

(3)
taxsimid 11 year 2018 state mstat 2 page 58 sage 56 depx 4 dep13 2 dep17 2 dep18 2 pwages 27000 swages 82000 psemp 297 ssemp 123 dividends 20000 intrec 11000 stcg -4000 ltcg 5000 otherprop 19000 nonprop 11000 pensions 1000 gssi 17000 pui 0 sui 0 ransfers rentpaid proptax 26000 otheritem 1000 childcare 2000 mortgage 12000 scorp 144000 pbusinc 71000 pprofinc sbusinc 331000 sprofinc idtl

c04470 itemized deduction after phase out: Tax-Calculator 22000; Taxsim35 0; Manual Calculation 22000

My manual calculation for the above records is in c04470.zip

It is unclear why Taxsim35 showing 0 for the amount of itemized deduction. Looks like there is some phase out setting that zero out the itemized deduction for these records

@bodiyang
Copy link
Contributor

For c07180, differences are mostly eliminated in this PR to change the mapping variables for CDCC

Only the year 2021 is showing some differences. The reason of this is that the CDCC calculation is dependent on the value of AGI. As can be seen from Form 2441, line 8 to calculate the phase out rate will call for the AGI value.

I have manually calculated some records, adopting the Tax-Calculator AGI value, and the result of my manual calculation matches with Tax-Calculator's CDCC calculation.

Example record:

example record in c21:
taxsimid 151 year 2021 state mstat 2 page 51 sage 45 depx 4 dep13 3 dep17 3 dep18 3 pwages 2000 swages 148000 psemp 298 ssemp 10 dividends 6000 intrec 11000 stcg -10000 ltcg -1000 otherprop 6000 nonprop 2000 pensions 20000 gssi 42000 pui 8000 sui 1000 transfers 0 rentpaid 0 proptax 28000 otheritem 1000 childcare 9000 mortgage 26000 scorp 163000 pbusinc 12000 pprofinc 0 sbusinc 18000 sprofinc

Tax-Calculator's c07180 CDCC is 499.59
manual calculation

@bodiyang
Copy link
Contributor

@jdebacker c04470 and c07180 are all explained. I think that may conclude the file c validation.

@feenberg
Copy link
Contributor

feenberg commented Mar 1, 2024 via email

@jdebacker jdebacker marked this pull request as ready for review March 12, 2024 00:45
@jdebacker jdebacker merged commit 598f1d6 into PSLmodels:master Mar 12, 2024
9 checks passed
@jdebacker jdebacker deleted the taxsim_c_set branch March 12, 2024 10:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants