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

Refactor the `regular_tax_before_credits` variable and add unit tests

Open Mshuning opened this issue 1 year ago • 2 comments

Fixes #4817

Mshuning avatar Sep 06 '24 03:09 Mshuning

2017 Instructions for Schedule D image 2023 Instructions for Schedule D image @PavelMakarchuk The differences between the 2017 form and the 2023 form are from step 19 in 2017 to steps 19-21 in 2023.

Mshuning avatar Sep 19 '24 13:09 Mshuning

https://www.irs.gov/pub/irs-prior/i1040sd--2017.pdf#page=15 Line 26 says:

  1. Add lines 19 and 20.

https://github.com/PolicyEngine/policyengine-us/blob/master/policyengine_us/variables/gov/irs/tax/federal_income/alternative_minimum_tax/regular_tax_before_credits.py While the old code:

dwks26 = min_(dwks19, dwks20)

Mshuning avatar Sep 26 '24 13:09 Mshuning