Closed martinholmer closed 1 year ago
Hmm we do have some logic for the supplemental tax, maybe it's not getting hooked up to the main tax result?
@MaxGhenis said in issue #1483:
we do have some logic for the supplemental tax, maybe it's not getting hooked up to the main tax result?
It is "hooked up", but the supplemental parameters are all for 2022 and the supplemental variable's formula is for 2022 and following years only:
from policyengine_us.model_api import *
from policyengine_core.taxscales import MarginalRateTaxScale
class ny_supplemental_tax(Variable):
value_type = float
entity = TaxUnit
label = "NY supplemental income tax"
unit = USD
definition_period = YEAR
defined_for = StateCode.NY
def formula_2022(tax_unit, period, parameters):
ny_taxable_income = tax_unit("ny_taxable_income", period)
ny_agi = tax_unit("ny_agi", period)
tax = parameters(period).gov.states.ny.tax.income
sup_tax = tax.supplemental
---{SNIP]---
On further investigation, NY state legislation Section 601: Imposition of tax contains the supplemental parameters for several years:
Although I did not study closely the legislative language of these three subsections, a cursory glance suggested that maybe the 2021 and 2022 supplemental parameters are the same.
When comparing 2021 NY income taxes produced by PolicyEngine-US 0.176.0 versus TAXSIM35 10/24/22 version, we get many differences even for simple tax units.
One problem is that the tax calculation logic for tax units with NY AGI of more than $107,650 is missing from PolicyEngine. Going to the URL cited in the NY income tax parameters section of PolicyEngine, we see this:
What is missing in PolicyEngine (and present in TAXSIM35) is the tax calculation worksheet logic on pages 52 through 57. Given this, there are many 2021 NY state income tax differences between the two models.
Here is the test case showing the difference between the two models:
The results for the above test case are: