Closed martinholmer closed 1 year ago
Thanks @martinholmer for narrowing down this issue, which also confused me a bit. For some context, the cause is a new feature/improvement we added: the computation tree now shows the branch of the simulation (the itemized/non-itemized loops are included as their own subtrees to aid debugging). But it looks like there's some leakage, because when I look at the computation tree, I see three places SALT is calculated (in order):
I'll give it a proper go at a fix on Monday.
Merging pull request #1523 fixed the bug reported in issue #1465.
@nikhilwoodruff, Thanks for getting the itemized deduction logic working again!
Since the switch from OpenFisca-Core to PolicyEngine-Core, the US income tax calculations for those with itemized expenses have changed from what they were before the switch, and are now different from what TAXSIM35 produces. Below is a simple test case that illustrates the problem. After presenting the YAML test file and the test results, I show the TAXSIM35 results for this case.
Here is the YAML test file:
Here are the test results, which show a $3200 difference in US income tax liability:
Notice that the $3200 difference is equal to the product of the tax unit's MTR (32%) and the tax unit's allowable real estate tax deduction ($10,000). The test trace output shows the the value of the
tax_liability_if_itemizing
variable is computed correctly at $33,947, but theincome tax
variable does not reflect that value for some reason (even though thetax_unit_itemizes
variable is true).And here are the TAXSIM35 results for this test case: