Open martinholmer opened 2 years ago
The test in issue #1279 is still failing because, even though some 2021 AMT parameters were added recently in pull request #1457, at least one AMT parameter has not been updated for years after 2019: policyengine_us/parameters/gov/irs/income/amt/exemption/phase_out/start.yaml
.
Thanks @martinholmer - I updated all AMT parameters, and added this test to #1468, but it's still failing. Any ideas?
income_tax@2021: [96554.] differs from 85538.0 with an absolute margin [11016.] > 0.01
@MaxGhenis said in issue #1279:
I updated all AMT parameters, and added this test [from issue #1279] to pull request #1468, but it's still failing [with the following results]. Any ideas?
income_tax@2021: [96554.] differs from 85538.0 with an absolute margin [11016.] > 0.01
Seems as if my original guess that incorrect 2021 AMT parameter values were the root cause of the tax difference with TAXSIM35 was wrong. Your addition of the 2021 AMT parameters caused only a slight change in PolicyEngine's US income_tax
for this test case.
I've confirmed that my USI-Tax-Analyzer model produces the same results for this test case as does TAXSIM35. Both those models produce a zero AMT for this test case, while PolicyEngine produces an AMT amount of $11,016. That accounts for all the income tax difference between the models.
Looking at the alternative_minimum_tax.py
code does not indicate anything obvious (because the code is quite long and directly lifted from taxcalc
). It would seem as if the cause of this AMT difference goes back to last spring when the alternative_minimum_tax.py
code was first added to the model.
As far as what priority fixing this bug should have, let me point out that the CPS has all the income variables used in this test case (employment_income
and long-term capital gains
), and therefore, this bug is likely to be affecting the CPS results shown on the PolicyEngine website.
In the past when facing similar situations, bugs were identified and corrected when @nikhilwoodruff rewrote the relevant function from the legislation (rather than relying on copied taxcalc
code). This approach has resulted in large taxcalc
functions being replaced by several finer-grained functions that make tracing and debugging much easier.
Let's try this integration test again now that we've merged #3907
Issue #1225 has already pointed out that the US AMT parameters have not been specified for the years after 2019. This test case illustrates the consequences of this problem: the case is simulated to have a positive AMT in 2021 ($4054) when neither TAXSIM35 nor USI-Tax-Analyzer generate a positive AMT amount and those two models generate the same US income tax liability of $85,538.
Here is the YAML test file, below which are the test results:
The above YAML test file generates the following results: