policyengine-us icon indicating copy to clipboard operation
policyengine-us copied to clipboard

Simplify the `ny_supplemental_tax` variable formula

Open PavelMakarchuk opened this issue 5 months ago • 0 comments

We should break up the formula into multiple variables and use a select for the rate calculation:

        rates = tax.main
        single = rates.single
        joint = rates.joint
        hoh = rates.head_of_household
        widow = rates.widow
        separate = rates.separate
        scales = [single, joint, hoh, widow, separate]

        previous_agi_threshold = select(
            in_each_status,
            [
                get_previous_threshold(ny_taxable_income, scale.thresholds)
                for scale in scales
            ],
        )

PavelMakarchuk avatar Aug 29 '24 22:08 PavelMakarchuk