PolicyEngine / policyengine-uk

The UK's only open-source static tax-benefit microsimulation model.
https://policyengine.github.io/policyengine-uk/
GNU Affero General Public License v3.0
27 stars 27 forks source link

Correctly calculate Personal Allowance / Dividend Allowance interaction effects #906

Closed anth-volk closed 1 month ago

anth-volk commented 1 month ago

Fixes #896 Fixes #899

This PR introduces changes to correctly calculate income tax when an individual's dividend income is partly or completely covered by the Personal Allowance, as opposed to the Dividend Allowance. Unlike the previous PR, it does not rename or recalibrate how the standard personal_allowance or dividend_allowance variables work, instead creating a separate set to enable calculation.

I'll open this PR as a draft because I'm unsure on how to properly calculate the adds feature of the allowances variable. At the moment, it appears it would be best to leave it personal_allowance (i.e., the max value available to an individual) as part of that variable, instead of received_personal_allowance (i.e., the Personal Allowance amount an individual receives, equal to income if the person makes less than the Personal Allowance threshold in a given year). The total value of allowances is subtracted from earned_taxable_income, hence the value is an important one. I'd love clarity on that before moving forward.

anth-volk commented 1 month ago

May toss this in favor of changes made within #907.

anth-volk commented 1 month ago

Closing in favor of #907.