-
Notifications
You must be signed in to change notification settings - Fork 201
Update Missouri 2025 tax law #6898
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #6898 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 2 4 +2
Lines 39 68 +29
=========================================
+ Hits 39 68 +29
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
I ran Although all the Missouri tests passed, I need notice the following two issues generating warnings about filing status "MARRIED". Do those need to be changed to "JOINT"? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a few tests for the Capital Gains subtraction. I will fix the filing status issues in a separate PR. Thank you!
policyengine_us/variables/gov/states/mo/tax/income/subtractions/mo_capital_gains_subtraction.py
Outdated
Show resolved
Hide resolved
...gine_us/variables/gov/states/mo/tax/income/adjusted_gross_income/mo_adjusted_gross_income.py
Outdated
Show resolved
Hide resolved
|
Filing status fix here: #6901 |
| capped_stcg = min_(0, stcg) | ||
| net_cg = max_(0, ltcg + capped_stcg) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| capped_stcg = min_(0, stcg) | |
| net_cg = max_(0, ltcg + capped_stcg) | |
| net_cg = max_(0, ltcg + stcg) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This canceled out any positive short-term capital gains, thus making the test fail.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@DTrim99. I am trying to verify what is the correct policy in the law. The original code in the PolicyEngine-US MO variables was the ltcg + capped_stcg. I will verify what the previous years' law says (e.g., 2024). I have currently updated the test so that it calculates the capital gains as ltcg + capped_stcg, which currently passes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@DTrim99. I have verified that the Missouri policy is to take the federal definition of capital gains. The original tax logic shown above is correct. But the cleaner, more direct approach is what I have now done in the mo_capital_gains_subtraction.py file using net_capital_gain = max_(0, tax_unit("net_capital_gain", period)) instead of the logic above. But the answer is the same.
...sts/policy/baseline/gov/states/mo/tax/income/deductions/mo_federal_income_tax_deduction.yaml
Outdated
Show resolved
Hide resolved
PavelMakarchuk
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the PR, some suggestions here
...gine_us/variables/gov/states/mo/tax/income/adjusted_gross_income/mo_adjusted_gross_income.py
Outdated
Show resolved
Hide resolved
| 0000-01-01: 0.00 | ||
| 2025-01-01: 1.00 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 0000-01-01: 0.00 | |
| 2025-01-01: 1.00 | |
| 2025-01-01: 1 |
Won't need this if we have the list parameter with an empty list entry pre 2025 ([])
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@PavelMakarchuk. I am happy to change this from "1.00" to "1". Can you tell me what is the material reason that you prefer "1" over "1.00"? My intuition is that two decimal points is a nice baseline convention for rates.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@PavelMakarchuk. Done. And I moved this net_capital_gain parameter folder to the subtractions folder rather than the deductions folder.
policyengine_us/parameters/gov/states/mo/tax/income/subtractions/net_capital_gain/rate.yaml
Show resolved
Hide resolved
…der to subtractions folder
|
@PavelMakarchuk @DTrim99. I have responded to all of your comments. This is now passing all tests. Ready for review. Some of the major updates are:
|
- Create mo_capital_gains_subtraction_person to allocate the tax unit capital gains subtraction proportionally by each person's share of long-term capital gains - Change mo_agi_subtractions from TaxUnit to Person entity level - Update agi_subtractions.yaml to reference person-level variable - Update mo_adjusted_gross_income.py to use person-level subtractions - Add multi-person tax unit tests to verify correct allocation This prevents overcounting where each person in a tax unit would previously receive the full tax unit subtraction (2x for married couples). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Fix: Entity-level mismatch in MO capital gains subtractionI reviewed the PR and found an entity-level mismatch that would cause overcounting of the capital gains subtraction in multi-person tax units. The Problem
This meant in subtractions = tax_unit("mo_agi_subtractions", period) # TaxUnit-level
return max_(0, fed_agi - subtractions) # Applied to each Person!For a married couple with $10,000 in long-term capital gains, each spouse would subtract $10,000 from their personal MO AGI, resulting in a $20,000 total subtraction instead of $10,000. The Fix
Test Results✅ All 167 Missouri tests pass |
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
Sorry @rickecon for asking you to switch the entity from person to tax_unit. @PavelMakarchuk and I decided that we should keep everything at the person level after a discussion. |
|
@DTrim99. I can update the uv.lock as I have done in the past. But are there any substantial changes that you still want me to make in this? You already added the commits you wanted. |
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
I think we should be good now. I've requested @PavelMakarchuk's review. Thank you for your help with these updates! |
This PR:
parameters/gov/states/mo/tax/income/rates.yamlmo_capital_gains_subtraction.pyand the parameterparameters/gov/states/mo/tax/income/deductions/net_capital_gain/rate.yamlfor the 2025 inclusion a full deductibility of capital gains in calculating Missouri adjusted gross income. I added this variable to themo_adjusted_gross_income.pycalculation.parameters/gov/states/mo/tax/income/minimum_taxable_income.yamlparameter with the new 2025 value.cc: @MaxGhenis