Repository navigation
Conversation
az_property_tax_credit_income added capital_gains_excluded_from_taxable_income on top of federal AGI. That variable is the part of federal taxable income taxed at the capital gains rates; when taxable income is zero it is the whole net capital gain plus qualified dividends. Federal AGI already holds those amounts, so they counted twice, mostly for the low-income seniors the credit is for. ARS 43-1072(H)(6)(b) adds "the amount of capital gains excluded from adjusted gross income". A.A.C. R15-2C-502(C)(3), ITR 12-1 item (7) and the 2021-2025 Form 140PTC instructions (Part 1 line D) count each member's net gains and losses from sales or exchanges of property, which federal AGI holds. The model has no gain excluded from federal AGI, so the entry is removed. Adds Form 140PTC line-by-line YAML tests and seeded property tests (differential against a line A-J reference, counted once, independence from the preferential-rate amount, credit monotone in gains). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review r1b: federal AGI (irs_gross_income) leaves out every tax-unit dependent's income. The removed preferential-rate amount summed all members' gains and qualified dividends, so it had been counting a dependent's gains; without it a claimant whose child had $3,000 of gains got $502 instead of $412. A.A.C. R15-2C-502(A)(2) and (B) count every household member's income whether or not the member is a dependent, so az_property_tax_credit_dependent_income adds dependents' income from the same federal gross income sources, without Social Security (ARS 43-1072(I)). Also corrects the zero-taxable-income description: the preferential-rate amount is then the adjusted net capital gain. Adds dependent YAML cases and dependents to the sampled property tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… line J A.A.C. R15-2C-502(C)(3), ITR 12-1 item (7) and the Form 140PTC line D instructions (2021-2025) limit each household member's net capital loss to $1,500. az_property_tax_credit_agi used federal AGI's capital gains and losses instead: non-dependents' net gains less a capital loss limited to $3,000 per return. It now swaps those for each non-dependent member's line D amount (new az_property_tax_credit_capital_gains, parameter capital_loss_limit). Dependents' line D amounts move into az_property_tax_credit_dependent_income with the same limit, in place of their gains floored at zero. The line J note in the instructions lets household income go negative and uses zero for the Schedule 1 and 2 amounts. az_property_tax_credit_agi no longer floors at zero; az_property_tax_credit floors income at the schedule lookup, where a single-amount scale would otherwise return 0 below its first threshold. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The 2021 and 2022 instructions have no negative household income note; the floor at the schedule lookup applies in every year because the schedules start at zero. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #9770 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 4 5 +1
Lines 76 84 +8
Branches 2 2
=========================================
+ Hits 76 84 +8
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…it income Review r2: federal AGI deducts every member's losses, dependents' included, but az_property_tax_credit_agi floored at zero before dependents' income was added, so a loss counted only against the claimant's or spouse's own income. A claimant with no income whose dependent had $3,000 of wages and a $1,000 capital loss got household income of $3,000 instead of $2,000. az_property_tax_credit_agi is no longer floored. Form 140PTC line J can be negative, and az_property_tax_credit uses zero for the Schedule 1 and 2 lookup (the same change as in #9770, so that PR rebases cleanly). Adds regressions for a loss on the dependent, on the claimant, a rental loss and a negative line J; the property sample now includes dependents' losses, raises a dependent's gains, and states its actual domain. Notes that the federal source list is not Arizona's (unemployment by paying state, estate income, strike benefits, nontaxable alimony). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ains fix Folds az-ptc-line-d-loss-limit (0450a28) into fix-az-ptc-capital-gains. Conflicts resolved as in the #9762 session's staged merge: #9770's income_sources comment, #9770's AGI capital-component swap, both sides' YAML cases and property tests, and dependents' sources added with their sign now that #9647 keeps dependents' losses out of loss_ald. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review r1 of #9770 found that az_property_tax_credit_agi added back limited_capital_loss even when federal AGI never deducted it (a reform that drops loss_ald from the above-the-line list, or loss_ald set to zero), manufacturing income. The swap now takes out only the positive capital gains irs_gross_income puts in AGI (per gross income source list) and the capital loss deduction loss_ald actually contains, then adds each non-dependent's line D. Gains a reform leaves out of AGI still count, as ARS 43-1072(H)(6)(b) adds them back. Line D now combines capital gain distributions reported without Schedule D with the member's other gains and losses before the $1,500 limit: they are long-term capital gains (26 U.S.C. 852(b)(3)(B)), and R15-2C-502(C)(3) nets each member's capital gains and losses. The dependent loop skips them so they count once. Tests: YAML cases for the two reforms, a zero loss_ald input, distributions for a claimant and a dependent, the three r3 finding-1 households (losses beyond $1,500 with tax-exempt income), and r3's estate/rental case, now right on main since #9633. Property sample adds distributions and signed rental income (dependents too) to the Form 140PTC oracle, uses only non-dependents' losses in the federal coverage check (#9647), and compares the preferential-rate mutation with an unmodified run (r1 nit). Corrects the spouse-netting comment (r1 nit). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Folded into #9762 (head 21cb189): merge commit c47e4ae brings this branch in, and 7d69e82 fixes this PR's r1 blocking finding (the AGI swap now removes only the capital amounts federal AGI actually holds: membership guards plus min(limited_capital_loss, loss_ald)) and adds capital gain distributions to line D. All 31 income cases and the widened property tests pass there. Axiom parity is tracked on TheAxiomFoundation/rulespec-us#1483 (companion tests K-M added). Closing as folded. |
Preserve the folded #9770 loss-limit work and current federal loss tests. The merge is conflict-free; existing carryover input semantics remain unchanged.
Preserve the verified dependent mutation coverage and folded #9770. Include main's supplied-role handling and California/New York changes without conflicts or policy changes in the repair.
* Count capital gains once in Arizona property tax credit income az_property_tax_credit_income added capital_gains_excluded_from_taxable_income on top of federal AGI. That variable is the part of federal taxable income taxed at the capital gains rates; when taxable income is zero it is the whole net capital gain plus qualified dividends. Federal AGI already holds those amounts, so they counted twice, mostly for the low-income seniors the credit is for. ARS 43-1072(H)(6)(b) adds "the amount of capital gains excluded from adjusted gross income". A.A.C. R15-2C-502(C)(3), ITR 12-1 item (7) and the 2021-2025 Form 140PTC instructions (Part 1 line D) count each member's net gains and losses from sales or exchanges of property, which federal AGI holds. The model has no gain excluded from federal AGI, so the entry is removed. Adds Form 140PTC line-by-line YAML tests and seeded property tests (differential against a line A-J reference, counted once, independence from the preferential-rate amount, credit monotone in gains). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Count dependents' income in Arizona property tax credit income Review r1b: federal AGI (irs_gross_income) leaves out every tax-unit dependent's income. The removed preferential-rate amount summed all members' gains and qualified dividends, so it had been counting a dependent's gains; without it a claimant whose child had $3,000 of gains got $502 instead of $412. A.A.C. R15-2C-502(A)(2) and (B) count every household member's income whether or not the member is a dependent, so az_property_tax_credit_dependent_income adds dependents' income from the same federal gross income sources, without Social Security (ARS 43-1072(I)). Also corrects the zero-taxable-income description: the preferential-rate amount is then the adjusted net capital gain. Adds dependent YAML cases and dependents to the sampled property tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Apply Arizona's $1,500 member capital loss limit and allow a negative line J A.A.C. R15-2C-502(C)(3), ITR 12-1 item (7) and the Form 140PTC line D instructions (2021-2025) limit each household member's net capital loss to $1,500. az_property_tax_credit_agi used federal AGI's capital gains and losses instead: non-dependents' net gains less a capital loss limited to $3,000 per return. It now swaps those for each non-dependent member's line D amount (new az_property_tax_credit_capital_gains, parameter capital_loss_limit). Dependents' line D amounts move into az_property_tax_credit_dependent_income with the same limit, in place of their gains floored at zero. The line J note in the instructions lets household income go negative and uses zero for the Schedule 1 and 2 amounts. az_property_tax_credit_agi no longer floors at zero; az_property_tax_credit floors income at the schedule lookup, where a single-amount scale would otherwise return 0 below its first threshold. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Cite the line J note where it appears: 2023-2025 instructions, page 5 The 2021 and 2022 instructions have no negative household income note; the floor at the schedule lookup applies in every year because the schedules start at zero. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Combine members' income before any floor in Arizona property tax credit income Review r2: federal AGI deducts every member's losses, dependents' included, but az_property_tax_credit_agi floored at zero before dependents' income was added, so a loss counted only against the claimant's or spouse's own income. A claimant with no income whose dependent had $3,000 of wages and a $1,000 capital loss got household income of $3,000 instead of $2,000. az_property_tax_credit_agi is no longer floored. Form 140PTC line J can be negative, and az_property_tax_credit uses zero for the Schedule 1 and 2 lookup (the same change as in #9770, so that PR rebases cleanly). Adds regressions for a loss on the dependent, on the claimant, a rental loss and a negative line J; the property sample now includes dependents' losses, raises a dependent's gains, and states its actual domain. Notes that the federal source list is not Arizona's (unemployment by paying state, estate income, strike benefits, nontaxable alimony). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Swap only the capital amounts federal AGI holds for Arizona line D Review r1 of #9770 found that az_property_tax_credit_agi added back limited_capital_loss even when federal AGI never deducted it (a reform that drops loss_ald from the above-the-line list, or loss_ald set to zero), manufacturing income. The swap now takes out only the positive capital gains irs_gross_income puts in AGI (per gross income source list) and the capital loss deduction loss_ald actually contains, then adds each non-dependent's line D. Gains a reform leaves out of AGI still count, as ARS 43-1072(H)(6)(b) adds them back. Line D now combines capital gain distributions reported without Schedule D with the member's other gains and losses before the $1,500 limit: they are long-term capital gains (26 U.S.C. 852(b)(3)(B)), and R15-2C-502(C)(3) nets each member's capital gains and losses. The dependent loop skips them so they count once. Tests: YAML cases for the two reforms, a zero loss_ald input, distributions for a claimant and a dependent, the three r3 finding-1 households (losses beyond $1,500 with tax-exempt income), and r3's estate/rental case, now right on main since #9633. Property sample adds distributions and signed rental income (dependents too) to the Form 140PTC oracle, uses only non-dependents' losses in the federal coverage check (#9647), and compares the preferential-rate mutation with an unmodified run (r1 nit). Corrects the spouse-netting comment (r1 nit). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Add back only loss_ald's capital part in Arizona household income Review r1 of the fold (GPT-6.1 Sol, 21cb189) found that min(limited_capital_loss, loss_ald) cannot tell loss_ald's capital part from its business part: a reform or supplied loss_ald that holds only a rental loss was reversed as a capital deduction ($2,500 / $323 instead of the form's $1,500 / $502). loss_ald's section 461(l) business part moves, unchanged, into a new limited_business_loss variable, and loss_ald adds limited_business_loss and limited_capital_loss (identical federal results). Arizona now adds back loss_ald less limited_business_loss, clipped to [0, limited_capital_loss]. Tests: a loss_ald case pins both parts; Arizona cases for a rental and capital loss together and for a supplied rental-only loss_ald; a pytest with a Reform whose loss_ald holds only rental losses. Both Arizona tests fail on 21cb189's formula. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Add the dependent IRA household now that #9801 is on main Delta review r2 asked for the r1 household as a regression once #9801 (keep dependents' above-the-line deductions off the filer's AGI) was in this branch. Claimant aged 70 with a 4,000 long-term gain; dependent with 1,600 wages and a 200 traditional IRA contribution: federal AGI 4,000, line J 5,600, no credit (Schedule 2 limit 5,501). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Leave the prior-year long-term carryover out of Arizona line D Delta review r3 (Sol, 2ea9d6b): #9841 added long_term_capital_loss_carryover, a memo amount that long_term_capital_gains already includes as a loss (Schedule D line 15). ITR 12-1 item (7) bars a prior-year carryover from reducing the year's gains for household income, so line D adds the carryover back before the $1,500 member limit. Federal AGI keeps it. Tests: three YAML cases (a carryover netting a gain, a carryover making the whole net loss, a dependent's carryover); the property sample draws carryovers with long_term_capital_gains net of them and the Form 140PTC oracle adds them back. All fail on the previous formula (3 YAML, 4 property). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Cover dependent Arizona capital-gain changes (#9762) Preserve all 80 original sampled households and their independent line-D oracle. Add dependent gain and loss perturbations for the 26 households with dependents in the same simulations, preserving member loss floors and filer/dependent accounting. Use the educator deduction variable introduced on main in the test that removes loss_ald from the federal deduction list. Expected outputs and public carryover inputs remain unchanged. * Clarify Arizona capital input convention and consolidate release notes * Test bounded whole-dollar parity of federal loss extraction * Test bounded whole-dollar parity of federal loss extraction * Pin d1107 terminating-trust carryover treatment for Arizona credit --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Summary
Stacked on #9762. The first two commits are #9762's; this PR's change is the last two. I'll rebase onto
mainonce #9762 merges. This fixes the two departures from Arizona's household income rules that #9762 left under "Not changed here".az_property_tax_credit_agitook capital gains and losses from federal AGI: non-dependents' net gains less a capital loss limited to $3,000 per return. Arizona limits each household member's net loss to $1,500 (A.A.C. R15-2C-502(C)(3), ITR 12-1 item (7), Form 140PTC line D). The federal amounts are now replaced by each member's line D amount.az_property_tax_credit_agifloored federal AGI less taxable Social Security at 0 before the tax-exempt interest and pensions were added, so a loss could not offset them. The 2023-2025 instructions let line J go negative and use zero only for the Schedule 1 and 2 lookup. The floor now sits at that lookup.2025, Arizona renters aged 70 paying $5,000 rent (the YAML cases below):
The credit can fall (a loss beyond $1,500 no longer lowers household income) or rise (a loss now offsets tax-exempt income).
What Arizona counts
ITR 12-1 items (3) to (5) also count business, farm, rental and K-1 losses in the year they occur, so line J can be negative for reasons other than line D. The model lets any negative total through and floors only at the schedules.
Changes
gov.states.az.tax.income.credits.property_tax.capital_loss_limit: $1,500, citing R15-2C-502(C)(3), ITR 12-1 and the 2021-2025 line D instructions.az_property_tax_credit_capital_gains(line D for one member):max(capital_gains, -capital_loss_limit). The model has no capital loss carryover variable, so line D's no-carryover rule holds.az_property_tax_credit_agi: subtracts federal AGI's capital component (non-dependents'max(0, capital_gains)fromirs_gross_income, lesslimited_capital_lossfromloss_ald), adds non-dependents' line D amounts, and is no longer floored at 0.az_property_tax_credit_dependent_income: skips thecapital_gainsgross income source (each source was floored at 0) and adds dependents' line D amounts instead.az_property_tax_credit: passesmax(income, 0)to the Schedule 1 and 2 scales. This floor is needed: policyengine-core'sSingleAmountTaxScale.calc(3.32.12) pads the amounts with a 0 below the first threshold, so a negative income passed straight tocalcreturns a $0 credit. Run against Count capital gains once in Arizona property tax credit income #9762, the new credit test returns 0 instead of 502. The variable now cites ARS 43-1072(B) and the 2025 instructions, page 5.income_sources.yamland the variable documentation say where line D is counted and that line J can be negative.Dependents
Line D and R15-2C-502(C)(3) apply "for each member of the household", and #9762 already counts every member's income whether or not a dependent. So a dependent's net capital loss counts, limited to $1,500 for that dependent, as it does for the claimant and spouse. Dependents' line D amounts sit in
az_property_tax_credit_dependent_incomewith the rest of their income, and non-dependents' inaz_property_tax_credit_agi, matching who federal AGI covers. Before this PR a dependent's gain counted (floored at 0), and a dependent's loss reduced household income in full through federallimited_capital_loss, which sumscapital_lossesover every tax unit member. That second behavior also lowers the filer's federal AGI, a separate federal-model issue (see "Not changed here").Tests
YAML, with Form 140PTC line comments:
az_property_tax_credit_income.yaml: six cases. They cover a single filer with wages $4,000 and a net loss of $2,000 (line J $2,500), a couple with each spouse at -$1,500, one spouse's loss over the limit next to the other's gain, a line D loss offsetting a tax-exempt pension, a negative line J with a tax-exempt pension, and a dependent's loss.az_property_tax_credit_capital_gains.yaml(new): line D for a gain, a loss within, at and over the limit, 2021, and outside Arizona.az_property_tax_credit_agi.yaml: "Capped at zero when Social Security exceeds other income" becomes "Negative when losses leave other income below taxable Social Security" (-$1,000). Two new cases cover the federal $3,000 limit being replaced and a dependent's loss moving to dependent income.az_property_tax_credit.yaml: a negative household income gets the zero-income amount.Nine of these fail on #9762's head. The tenth, each spouse at -$1,500, passes there, because the $3,000 federal limit happens to agree; it stays as a regression guard. The Arizona folders (baseline and contrib) pass: 525 cases. Code-health, parameter and property tests: 133 pass.
Invariants
test_az_property_tax_credit_income.pychecks a seeded sample of 80 Arizona tax units: 27 couples, 31 with a dependent who has income, 32 members whose net gain is below -$1,500 (3 of them dependents), and 10 units whose line J is negative.az_property_tax_credit_incomeequals an independent Form 140PTC line A + B + D + E sum over every member. Social Security is excluded and each member's line D is floored at -$1,500.capital_gains_excluded_from_taxable_income.On #9762's head, 1 to 5 fail (the differential misses on 29 of 80 units). On this branch all pass.
Microsimulation
Default dataset (
populace_us_2024.h5@populace-us-2024-spm-20260909), policyengine-core 3.32.12, one process per year. Compared per tax unit (79,729) with #9762's head (7b5013b) on the same dataset and core:az_property_tax_creditThe data holds no net capital losses:
limited_capital_lossis $0 for every tax unit in both years, and no Arizona tax unit has a negative line D. So the $1,500 member limit moves nothing in the default data. The 8 records move because the floor came off: their above-the-line deductions exceed their income other than Social Security. None is eligible for the credit, so no credit changes. Dependent income is unchanged. Peak memory was 9.0 GB (2025) and 9.2 GB (2026).Not changed here
amount/cohabitating.yamlstarts each band at 2,500, 2,650, ..., 5,500. So income of exactly $2,500 gets $479 and $5,500 gets $0 instead of $56. The tests here avoid those edges.loss_aldandlimited_capital_losssum every tax unit member, whileirs_gross_incomeleaves out dependents' income.az_property_tax_credit_dependent_incomefloors each of a dependent's other income sources at 0, while R15-2C-502(C)(1)-(2) and ITR 12-1 items (3) to (5) count business, farm, rental and K-1 losses.axiom: TheAxiomFoundation/rulespec-us#1483 queued (extended for the $1,500 member limit and negative household income)
🤖 Generated with Claude Code