Skip to content

Apply the Form 4684 $100 per-casualty reduction and drop dependents' losses in the federal, NY, AL and HI casualty deductions - #9912

Open
MaxGhenis wants to merge 9 commits into
mainfrom
fix-casualty-loss-165h-reduction
Open

MaxGhenis wants to merge 9 commits into
mainfrom
fix-casualty-loss-165h-reduction

Conversation

@MaxGhenis

@MaxGhenis MaxGhenis commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Stacked on #9888, which is stacked on #9877. It reuses #9888's gov.irs.deductions.itemized.casualty.per_casualty_reduction (2008: 100, 2009: 500, 2010: 100) instead of adding a duplicate. Until both merge, this diff includes their commits; the change reviewed here is the two commits after #9888's head (266f3e2, 43eed2a). Merge #9877 and #9888 first.

The bugs

PolicyEngine has four copies of the Form 4684 casualty-loss computation outside Montana and Arkansas. All four had the same two errors:

  1. No $100 per-casualty reduction. They took loss − 10% × AGI. 26 U.S.C. 165(h)(1) allows a personal casualty loss only "to the extent that the amount of the loss to such individual arising from each casualty, or from each theft, exceeds $500 ($100 for taxable years beginning after December 31, 2009)". 165(h)(3)(B) applies that before the 10% floor of 165(h)(2)(A). On 2017 Form 4684 this is line 11, "Enter $100", before line 17's "10% of your adjusted gross income".
  2. Dependents' losses on the filer's return. They summed casualty_loss over every tax-unit member. A dependent's loss belongs on the dependent's own return, as the dependent's income already does: irs_gross_income leaves it out of AGI. IRS Publication 547 (2017), PDF p. 10 says "If two or more individuals (other than a husband and wife filing a joint return) have losses from the same casualty or theft, the $100 rule applies separately to each individual". PDF p. 4 requires proof "That you were the owner of the property".
Variable Live in baseline? Effect
casualty_loss_deduction (federal) TY2015–2017 only; active is false from 2018 (PE's first modeled year is 2015) Also any reform that switches active on
ny_casualty_loss_deduction Every year Was $100 too high for every NY itemizer with a loss
al_casualty_loss_deduction Every year (now gated; see below)
hi_casualty_loss_deduction Every year (now gated from 2026; see below)

The rule, by jurisdiction

Federal. Pub. 547 (2017, PDF p. 10): "If you and your spouse file a joint return, you are treated as one individual in applying the $100 rule" (165(h)(4)(B)). "If you and your spouse have a casualty or theft loss and you file separate returns, each of you must reduce your loss by $100." P.L. 119-108 (Sept. 11, 2026; TY2025+) rewrote (h)(1) as "$100 ($500 in the case of any qualified disaster-related personal casualty losses …)", so $100 remains the amount for every loss PE models.

New York. 2025 IT-196 instructions, line 20 (PDF p. 3): "Your New York itemized deduction for casualty and theft losses is calculated using the federal rules that applied to tax year 2017." The deduction is allowed only to the extent "the amount of each separate casualty or theft loss is more than $100, and … the total amount of all losses during the year (reduced by the $100 limit in number 1 above) is more than 10% of the amount on Form IT-201, line 19". In the worksheet (PDF p. 4), line 11 is a preprinted 100 and line 17 is "10% of your federal AGI from Form IT-201, line 19". NY Tax Law § 615(a) freezes federal itemized deductions "as such deductions existed immediately prior to the enactment of Public Law 115-97", so NY is not limited to declared disasters. The 2024 instructions are the same.

Alabama. Ala. Code § 40-18-15(a)(6) allows the loss "as determined in accordance with subsections (c)(3) and (h) of 26 U.S.C. § 165". § 40-18-1.1(b) defines "26 U.S.C." as the Code "as in effect from time to time". The 2025 Form 40 instructions (PDF p. 20) say "A casualty or theft loss is determined in the same manner as on your federal return" except for the timing rule and the floor of "10% of the Alabama adjusted gross income". They also say each separate loss must be "more than $100". Schedule A line 19a takes Form 4684 line 15 or 16, which comes after the $100 (line 11) and, from 2018, after the limit to declared-disaster losses (line 14). The Department of Revenue's OBBBA Executive Summary (PDF p. 8) lists 165(h)(5) as "Tied to Federal: Yes" through § 40-18-15(a)(6) for TY2026 on. For 2018–2025 the limit follows from rolling conformity and that form flow.

Hawaii. HRS § 235-2.4(l) (DOTAX compilation, PDF p. 12) makes § 165 operative except that "(1) The amount prescribed by section 165(h)(1) … shall be a $100 limitation per casualty" and "(3) Section 165(h)(5) … shall not be operative". 2025 N-11 instructions, Worksheet A-5 (PDF p. 34): line 19 is the 2017 Form 4684 line 16 (after the $100), line 21 is 10% of Hawaii AGI ("If zero or less, enter zero"), and line 22 is the difference, not below zero. Act 35, SLH 2026 (HB 2329 CD1, signed May 26, 2026) strikes (l)(3) for taxable years beginning after December 31, 2025. DOTAX Announcement 2026-06 (PDF p. 2): "Hawaiʻi will conform to IRC section 165(h)(5), which disallows personal casualty loss deductions, except those attributable to federal or state declared disasters."

The fix

All four now compute max(max(non-dependent loss − $100, 0) − 10% × AGI, 0), using tax_unit_non_dep_add (as #9888 does for Montana):

  • Federal: federal AGI (positive_agi), times active.
  • New York: federal AGI (IT-201 line 19), ungated by the federal suspension. References now cite the 2024 and 2025 IT-196 instructions.
  • Alabama: Alabama AGI floored at zero, times the federal active. With no input that distinguishes disaster losses, PE treats Alabama like the federal deduction and Montana (Count a Montana casualty loss once per joint return and only for the spouse who had it #9888): no personal casualty loss from 2018 unless a reform switches active on, and then Alabama follows.
  • Hawaii: new gov.states.hi.tax.income.deductions.itemized.casualty_loss.per_casualty_reduction (100, HRS § 235-2.4(l)(1)), and …casualty_loss.non_disaster_losses_allowed (true from 2018, false from 2026, Act 35). The floor uses Hawaii AGI floored at zero. The URLs move from documentation to reference.

Methodology notes and choices for the reviewer

  • One casualty per return. PE records one loss per person and no event count, so a return's losses are treated as one casualty and the $100 applies once per return. Count a Montana casualty loss once per joint return and only for the spouse who had it #9888 and ar_casualty_loss_deduction_* do the same. This under-reduces only for filers with more than one casualty in a year.
  • Separate filers. filing_status is SEPARATE only through is_separated, which also clears is_tax_unit_spouse, so a formula-built SEPARATE unit holds one spouse. A tax-unit-level $100 and floor are then that spouse's own, as Pub. 547 requires. No SEPARATE branch was added.
  • A Hawaii parameter, not the federal one. HRS § 235-2.4(l)(1) fixes Hawaii's amount at $100 whatever the IRC says. The two differ for 2009 ($500 federal) and for qualified disaster losses. A reform to the federal parameter should not move Hawaii, as with Arkansas's own exclusion. Values match for every year PE models Hawaii itemized deductions (2018+). If you would rather Hawaii read Count a Montana casualty loss once per joint return and only for the spouse who had it #9888's federal parameter, it is a one-line change.
  • Alabama negative AGI. The Alabama form is silent on a negative AGI. The floor is clamped at zero, like the federal positive_agi and Hawaii's Worksheet A-5, so the deduction never exceeds the reduced loss.
    • Main's max_(0, loss - al_agi * floor) added 10% of a negative AGI to the loss.
    • It also gave every Alabama filer with negative AGI a "casualty deduction" of 10% of |AGI| with no loss at all: 1,000 at AGI −10,000. Case 12 pins that to 0.
  • Not modeled (no input): qualified disaster losses ($500, no floor, § 63(b)(8) for non-itemizers under P.L. 119-108), declared-disaster attribution, and personal casualty gains.

Invariants

For every input, for each of the four copies:

  1. Reference: deduction = gate × max(max(L − 100, 0) − 10% × max(AGI, 0), 0), where L is the head's and spouse's losses. The gate is active for federal and Alabama, 1 for New York, and non_disaster_losses_allowed for Hawaii.
  2. Bounds: 0 ≤ deduction ≤ max(L − 100, 0).
  3. Dependents: a dependent's casualty_loss never changes the filer's deduction.
  4. Monotonicity: non-decreasing in the loss and non-increasing in AGI.
  5. Threshold: zero for L ≤ $100.
  6. State scope: zero outside the copy's state.
  7. Differential: with the same AGI, the copies agree wherever their gates are on: federal = NY = AL in 2017, and NY = HI in 2025.

Tests

  • New YAML files.
    • casualty_loss_deduction.yaml (federal, 12 cases). 11 fail on main; the 2018 suspension case is a guard.
    • ny_casualty_loss_deduction.yaml (9 cases, TY2025, the current year). All 9 fail on main. They cover the $100 boundary, the floor after the reduction, a loss under $100, Pub. 547 Example 1 ($14,800 loss and $80,000 AGI give $6,700), a joint return, a dependent's loss, and NY allowing the loss while the federal deduction is $0.
  • Extended YAML files.
    • al_casualty_loss_deduction.yaml: 2 cases become 12, and 11 fail on main. The 2021 case expecting 1,900 now expects 0, since 2021 losses are limited to declared disasters. The arithmetic case moves to 2017: (2,000 − 100) − 100 = 1,800.
    • hi_casualty_loss_deduction.yaml: 4 cases become 13. Two existing cases move from the worksheet: 100 → 0 and 200 → 100. 10 of the cases fail on main, including the 2026 Act 35 case. A reform case shows a federal active reform does not reach Hawaii.
    • ny_pre_tcja_deductions.yaml: 5,000 → 4,900, and ny_itemized_deductions_max 26,500 → 26,400.
  • Failing on main, verified. I swapped upstream/main's four variable files in and ran each file. Results are in ~/reviews/us-hub/casualty-165h/fails_on_main.txt.
  • Locked run. Every touched and neighbouring YAML file ran under the heavy lock: the NY, AL, HI, MT and AR itemized folders, the federal itemizing tests, and Count a Montana casualty loss once per joint return and only for the spouse who had it #9888's MT tests, which switch active on inline. 279 passed. The pytest files test_casualty_loss_deduction_properties.py, test_mt_casualty_loss_deduction_properties.py, test_ar_misc_casualty_deduction_properties.py and test_itemized_deduction_limitation_properties.py passed (44).
  • New tests/unit/test_casualty_loss_deduction_properties.py.
    • It checks invariants 1–7 with Hypothesis (20 derandomized batches of 4–15 tax units, each placed in NY, AL and HI, as one vectorized simulation each) and a deterministic grid of boundary losses and AGIs.
    • Why Python: a YAML case cannot express a property over many vectorized mixed households or compare four variables against each other.
    • CI cost. It runs in the Rest "remaining" group. Measured locally on macOS at load average about 350, so not a Linux CI figure:
      • about 4.8 s of test time (Hypothesis 4.5 s plus the grid), and 1.17 GB peak RSS for the file run alone in its own process;
      • a first version that rebuilt a reformed tax-benefit system per Hypothesis example took 95 s and 2.03 GB, so the reform check moved to YAML.

Impact

The certified default dataset (populace_us_2024.h5@populace-us-2024-spm-20260909, sha256 6496cc43…, verified) has a nonzero casualty_loss on 48 of 166,321 person records.

A 2026 microsimulation pair is queued under the heavy lock: base is #9888's head e352ed05bb and the PR is 266f3e2, each run from a frozen package snapshot. It covers the four deductions, NY/AL/HI itemized deductions and income taxes, and household_net_income. Results will be added here. In 2026 the federal deduction is $0 in both runs (active false), so only NY, AL and HI can move.

Axiom

axiom: us/statutes/26/165/h TheAxiomFoundation/rulespec-us#1516 queued (federal Step 1 extended in this comment: the pinned release's scope, (c)(3) and (h)(3)(B), P.L. 119-108 versioning, and companion cases F1–F13 mirroring casualty_loss_deduction.yaml)
axiom: us-ny/statutes/TAX/615, us-al/statutes/40-18-15 (a)(6), us-hi/statutes/235-2/4 TheAxiomFoundation/rulespec-us#1521 queued (dispatch-ready review_findings and companion cases mirroring the NY, AL and HI YAML tests)

Neither is encoded-correct: no § 165(h) or state-copy module exists. The encoder path is blocked for three reasons, all recorded in the issues: each signed run needs Max's approval; the state modules import the federal module, which must be signed first; and Hawaii's N-11, NY's IT-196-I and Act 35 need corpus ingestion.

Follow-ups (filed separately)

Found while researching this PR, each confirmed from the forms and queued as a separate task:

  • California (Schedule CA line 15) and Minnesota (M1SA line 19 / M1CAT) still allow non-disaster personal casualty losses, but PE reads the federal deduction, which is zero from 2018.
  • New York's itemized medical floor is 10% (IT-196 line 3), not the federal 7.5%. The ny_pre_tcja_deductions.yaml max case still encodes 7.5%; this PR does not touch that line.
  • ny_itemizes requires federal itemizing, but NY has let filers itemize either way since 2018.
  • al_agi pools dependents' income, though the Form 40 booklet says dependents file their own returns. In baseline this is moot here, because Alabama's casualty deduction is now gated off from 2018.
  • Hawaii Act 35's other 2026 conformity changes.
  • Arkansas's per-spouse $100 on status 4, and Puerto Rico's principal-residence scope.
  • P.L. 119-108 qualified disaster losses: $500, no floor, and § 63(b)(8) for non-itemizers. This needs a new input and is a methodology call.

🤖 Generated with Claude Code

MaxGhenis and others added 8 commits October 6, 2026 07:08
… the forms

- Federal income tax deduction (through 2023): attribute federal tax to the
  spouse who earned the income and cap each spouse at $5,000, instead of
  prorating the jointly capped amount by Montana AGI (2022 Form 2
  instructions, Itemized Deductions Schedule, line 4).
- Child and dependent care expense deduction (through 2023): phase out on the
  couple's combined Montana AGI and split the result equally only for spouses
  filing separately on the same form; a single filer and a joint return take
  the whole deduction (Form 2441-M lines 3-7).
- Elderly homeowner/renter credit: count federal AGI without regard to losses
  (MCA 15-30-2337(9)(a); Form 2EC line 9).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ions

Each spouse filing separately on the same form deducts their own federal
income tax up to $5,000, so both spouses itemize and Montana tax is 6,295.56.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…chedule

- A married person filing on a separate form (federal filing status
  SEPARATE) cannot take the child and dependent care expense deduction:
  "married couples shall file a joint return or file separately on the same
  form" (MCA 15-30-2131(1)(c)(vi)(A)); 2022 instructions, line 14.
- The 2023 credit schedule was the Elderly Homeowner/Renter Credit
  Schedule; it became Schedule 2EC in 2024.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ouse

mt_misc_deductions is a Person variable whose `adds` list included the
TaxUnit casualty_loss_deduction. policyengine-core evaluates `adds` with
calculate(..., map_to=person), which projects a tax-unit value onto every
member, so the joint path (summing over the tax unit) counted a couple's
casualty loss once per member, and each spouse filing separately got the
full amount.

Replace it with two Montana variables following the 2021-2023 Form 2
instructions, Itemized Deductions Schedule line 15: complete federal Form
4684 using Montana AGI in place of federal AGI; spouses filing separately
each complete their own Form 4684 (and a deduction attributable to one
spouse is claimed by that spouse).

- mt_casualty_loss_deduction_joint (TaxUnit): the unit's loss above 10% of
  mt_agi_joint, counted once.
- mt_casualty_loss_deduction_indiv (Person): each spouse's own loss above
  10% of their own mt_agi_indiv; dependents' losses go to the head, as
  mt_agi_indiv does with dependents' income.
- casualty_loss/applies ends the line in 2024, when Montana discontinued
  its Itemized Deductions Schedule (2024 instructions, p. 8).

With the child care deduction moved out of the misc list (stacked on
fix-mt-separate-filing-allocations), the list held only the casualty
loss, so the list parameter and mt_misc_deductions are removed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…erties

Montana's line 15 has filers complete federal Form 4684, whose line 11
reduces each casualty by $100 before the 10%-of-AGI floor (line 17). IRS
Publication 547: a joint return is one individual for the $100 rule;
spouses filing separately each reduce their own loss by $100. Add the
federal amount as gov.irs.deductions.itemized.casualty.per_casualty_reduction
(26 U.S.C. 165(h)(1)) and apply it once per joint return and once per
spouse's column. The model has one loss amount per person, so each
return's (or column's) losses are treated as one casualty, as the
Arkansas casualty deduction already does.

Add grid property tests: both variants match a closed-form Form 4684
reference; the joint return counts the unit's loss once whatever the
number of members; separate filers deduct only their own loss; the
deduction is non-negative, bounded, monotone; single-filer variants
agree; and it ends in 2024.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ions' into fix-mt-casualty-loss-misc-deduction
From the adversarial review of #9888 (law, code and test lenses, all
approving):

- A dependent's casualty loss belongs on the dependent's own return, as
  the dependent's income does (adjusted_gross_income_person, and so
  Montana AGI, leaves it out; Pub. 547: only the owner claims the loss).
  The joint path now sums non-dependents' losses (tax_unit_non_dep_add)
  and the separate path counts only the head's or spouse's own loss,
  instead of moving dependents' losses into the head's column while
  their income stayed out of it.
- Say what the suspension flag models: PE has no input distinguishing
  federally declared disaster losses, so, like the federal deduction, no
  personal casualty loss is deductible from 2018 unless
  gov.irs.deductions.itemized.casualty.active is on.
- Cite former MCA 15-30-2131(1)(a) (MCA 2021), which allowed the items
  of IRC 161 (including 165 losses), on the parameter and variables.
- Describe the Form 4684 computation per lines 10-18 rather than as one
  form per return, and fix the separate-path test headers.
- Add the 2008 $100 value to per_casualty_reduction (2008 and 2009 Form
  4684 line 11), so it is defined before 2009.
- Tests: natural-input dependent cases on both paths, and a 2024 case
  with filing status 2a allowed that exercises the separate path's
  applies gate (it fails if the gate is removed).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… losses off the filer's return

26 U.S.C. 165(h)(1) reduces each personal casualty loss by $100 (Form 4684
line 11) before the 10%-of-AGI floor (line 17); a joint return is one
individual for the $100 rule (165(h)(4)(B)). Only the owner of the property
claims the loss, so a tax unit dependent's loss belongs on the dependent's own
return, as their income already does.

- casualty_loss_deduction (federal, TY2015-2017 and reforms): non-dependent
  losses less gov.irs.deductions.itemized.casualty.per_casualty_reduction
  (from #9888), then the floor.
- ny_casualty_loss_deduction: IT-196 line 20 uses the 2017 federal rules, so
  the same computation on federal AGI, ungated by the federal suspension.
- al_casualty_loss_deduction: Ala. Code 40-18-15(a)(6) adopts 165(h) as in
  effect from time to time (40-18-1.1), and Schedule A line 19a takes Form
  4684 after its disaster limit, so the deduction follows the federal
  suspension flag; the floor uses Alabama AGI, not below zero.
- hi_casualty_loss_deduction: Hawaii's own $100 (HRS 235-2.4(l)(1)) on Hawaii
  AGI, and from 2026 Act 35, SLH 2026, makes 165(h)(5) operative.

Adds YAML cases that fail on main and a Hypothesis/grid property test of the
four copies against a closed-form reference.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tion

Main's max_(0, loss - al_agi * floor) gave every Alabama filer with negative
AGI a deduction of 10% of |AGI| even with no loss; the zero clamp on the floor
removes it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@DTrim99

DTrim99 commented Oct 12, 2026

Copy link
Copy Markdown
Collaborator

PR Review: Apply the Form 4684 $100 per-casualty reduction and drop dependents' losses in the federal, NY, AL and HI casualty deductions

PR #9912 (author: MaxGhenis, head 43eed2a0f8). This review covers only #9912's two commits on top of #9888: 266f3e245f (the $100 reduction and dependents) and 43eed2a0f8 (the Alabama negative-AGI test). The branch also carries #9877 and #9888. #9877 merged on 2026-10-12. #9888 was reviewed separately (REQUEST_CHANGES, one should-address item about its rebase), and none of its findings are repeated here.

Summary

The PR fixes two errors in PolicyEngine's four copies of the Form 4684 Section A computation:

  • They skipped the $100 per-casualty reduction (26 U.S.C. 165(h)(1), Form 4684 line 11).
  • They summed casualty_loss over every tax-unit member, dependents included.

All four now compute gate × max(max(head and spouse losses − $100, 0) − 10% × max(AGI, 0), 0):

Variable AGI for the 10% floor $100 Gate
casualty_loss_deduction (federal) federal positive_agi federal per_casualty_reduction casualty.active (false from 2018)
ny_casualty_loss_deduction federal positive_agi (IT-201 line 19) federal none (2017 federal rules every year)
al_casualty_loss_deduction al_agi, now floored at 0 federal casualty.active (new: rolling conformity to 165(h)(5))
hi_casualty_loss_deduction hi_agi, floor clamped at 0 new Hawaii parameter, 100 new non_disaster_losses_allowed: true from 2018, false from 2026 (Act 35, SLH 2026)

The law and the code agree. I checked § 165(h), Form 4684, Pub. 547, NY IT-196-I, the Alabama Code, Form 40 and Schedule A, the ADOR OBBBA summary, HRS § 235-2.4, Act 35 and the N-11 instructions at their anchored pages (see Verified correct).

  • All 52 YAML cases in the five touched files pass on the extracted head tree, and so do the 7 property tests.
  • Twelve expectations check by hand.
  • CI is 35/35 green.
  • Both axiom issues are open, labelled pe-parity and dispatch-ready.

Baseline changes:

  • New York itemizers with a loss lose $100 in every year, and a dependent's loss no longer counts.
  • Alabama drops to $0 for non-disaster losses from 2018. For example, TY2024 with $50,000 wages and a $20,000 loss: al_income_tax goes from $1,242.95 to $1,992.95.
  • Hawaii drops to $0 from 2026, and loses $100 before that.
  • The federal deduction changes only for TY2015–2017 and under reforms.

What blocks approval is the rebase (S1). Replaying just these two commits onto main gives two conflicts of their own. In one of them neither side's number is right: the New York total must become 23,900. There are two optional suggestions.

Critical (must fix)

None.

Should address

S1. After #9888 is rebased, replay only this PR's two commits onto main, recompute the New York total, and refresh the PR body.

Suggestions

Both are optional.

1. After the rebase, main's Delaware payer allocation (#9878) under-allocates a spouse's casualty loss when a dependent also has one.

  • Where: on main, de_itemized_deductions_indv.py:67-68:
    • total_expense = person.tax_unit.sum(expense)
    • allocated += amount * _share(head_or_spouse * expense, total_expense)
  • The interaction:
    • casualty_loss_deduction is mapped to casualty_loss, and the denominator counts every member.
    • That was right while the federal amount included dependents' losses.
    • After this PR it covers only the head's and spouse's losses, so part of a spouse's own deduction gets prorated by income instead.
  • Example (derived from the code, not run): a 2017 MFS-on-combined-return case. Head wages $60,000 and loss $20,000; spouse wages $40,000; dependent loss $10,000.
    • Federal deduction = (20,000 − 100) − 10,000 = 9,900.
    • The head is allocated 9,900 × 20/30 = 6,600. The remaining 3,300 is split 60/40, so the head ends with 8,580 and the spouse with 1,320.
    • Pub. 547 (2017), PDF p. 10: "If one spouse owns the property, only that spouse can figure a loss deduction on a separate return." So the split should be 9,900 / 0.
  • Reach: Delaware only. It needs a dependent with a loss, and a nonzero federal deduction, which means TY2015–2017 or an active reform.
  • Fix: for the casualty entry, sum casualty_loss over the head and spouse only (person.tax_unit.sum(head_or_spouse * expense)). Keep the all-member denominator for the deductions whose federal amounts still include dependents' payments.

2. New York reads the federal $100 and 10% parameters for a rule that New York freezes at 2017.

  • Where: ny_casualty_loss_deduction.py:32, 44, 48 read gov.irs.deductions.itemized.casualty.per_casualty_reduction and .floor at the current period.
  • Law: IT-196-I (2025), PDF p. 3: line 20 "is calculated using the federal rules that applied to tax year 2017."
  • Why it's a suggestion:
    • The values agree in every year (100 and 10% since 2010), so no baseline result changes.
    • The PR body gives this same reason for Hawaii's own parameter ("A reform to the federal parameter should not move Hawaii"), but a reform to the federal $100 would move New York.
    • ny_misc_deduction already reads the federal misc floor the same way, and Allow non-disaster casualty and theft losses in California and Minnesota itemized deductions #10068's California and Minnesota copies read the federal parameter too, so this matches the existing pattern.
  • Options: add a New York parameter, or note the coupling in the variable's documentation.

Verified correct

  • Federal law (26 U.S.C. 165, Cornell LII, with its amendment notes):

    • (h)(1) as amended by P.L. 119-108 § 2(b), for taxable years beginning after December 31, 2024: "$100 ($500 in the case of any qualified disaster-related personal casualty losses …)". Before that the text read "$500 ($100 for taxable years beginning after December 31, 2009)". Either way, $100 applies to every loss PE models.
    • (h)(2)(A): the 10%-of-AGI floor.
    • (h)(3)(B): the loss is measured after (h)(1).
    • (h)(4)(B): "a husband and wife making a joint return for the taxable year shall be treated as 1 individual."
    • (h)(5)(A): losses "in a taxable year beginning after December 31, 2017" are allowed only if "attributable to a Federally declared disaster … or a State declared disaster". P.L. 119-21 § 70109 removed the 2026 end date and added State disasters, for taxable years beginning after 2025.
    • 2017 Form 4684, p. 1: line 11 "Enter $100", line 17 "Enter 10% of your adjusted gross income", line 18 "If zero or less, enter -0-".
    • 2025 Form 4684, p. 1, Section A: "For tax years beginning after 2017 … deductible only if the loss is attributable to a federally declared disaster". Line 14 carries the limit. The 2021 form reads the same.
    • Pub. 547 (2017), p. 10:
      • Joint filers are "one individual in applying the $100 rule".
      • "If you and your spouse have a casualty or theft loss and you file separate returns, each of you must reduce your loss by $100."
      • Example 1: $14,800 − $100 − 10% × $80,000 = $6,700.
    • Pub. 547, p. 4 requires proof "That you were the owner of the property". That supports leaving dependents' losses off the filer's return.
  • New York.

    • IT-196-I (2025), p. 3: "the amount of each separate casualty or theft loss is more than $100, and … the total amount of all losses during the year (reduced by the $100 limit …) is more than 10% of the amount on Form IT-201, line 19".
    • p. 4: worksheet line 11 "Limitation per casualty" has 100 preprinted, and line 17 is "10% of your federal AGI from Form IT-201, line 19".
    • The 2024 instructions are identical on the same pages.
    • The deduction stays ungated by the federal suspension.
  • Alabama.

    • Ala. Code § 40-18-15(a)(6), current text from the Legislature's code service: "Casualty and theft losses … as determined in accordance with subsections (c)(3) and (h) of 26 U.S.C. § 165".
    • § 40-18-1.1(b): "the term '26 U.S.C.' means the Internal Revenue Code … as in effect from time to time".
    • 2025 Form 40 booklet, p. 20 says "A casualty or theft loss is determined in the same manner as on your federal return". It names two exceptions, the timing rule and "reduced by 10% of the Alabama adjusted gross income". It says to enter "the amount of loss as shown on line 15 or line 16 (Section A) of Form 4684". Both lines come after the $100 and the disaster limit.
    • The 2021 booklet, p. 20 has the same text. Schedule A (2025), p. 1 has lines 19a-c.
    • The ADOR OBBBA Executive Summary, p. 8 lists I.R.C. § 165(h)(5) as "Tied to Federal: Yes", with "Corresponding State Authority: §40-18-15(a)(6)".
    • So gating Alabama on casualty.active from 2018 is right, including the 2021 expectation moving from 1,900 to 0.
    • The negative-AGI clamp is a reasoned choice where the form is silent. It matches positive_agi and Hawaii's line 21.
  • Hawaii.

    • HRS § 235-2.4(l) (DOTAX compilation as of 12/31/2025, p. 12): "(1) The amount prescribed by section 165(h)(1) … shall be a $100 limitation per casualty" and "(3) Section 165(h)(5) … shall not be operative".
    • Act 35 (HB 2329 CD1), Section 3:
      • It reletters (l) as (k) and keeps the $100 (p. 22).
      • It strikes (l)(3) (p. 23).
      • Section 7(1) applies Section 3 "to taxable years beginning after December 31, 2025" (p. 34).
    • Announcement 2026-06, p. 2: "Hawaii will conform to IRC section 165(h)(5), which disallows personal casualty loss deductions, except those attributable to federal or state declared disasters."
    • 2025 N-11 instructions:
      • p. 18: Hawaii decoupled for 2018–2025, and Worksheet A-5 line 19 takes "the 2017 federal Form 4684, line 16".
      • p. 19: the $100 and 10% tests.
      • p. 34: Worksheet A-5, with line 21 "If zero or less, enter zero".
    • The 2022 instructions match at pp. 18 and 32.
  • Code patterns (every changed file):

  • Parameters:

    • hi/.../casualty_loss/per_casualty_reduction.yaml is 100 from 2018, uses the amount template ("Hawaii reduces … by this amount …"), and has currency-USD, period: year, a label, and five corroborating references.
    • non_disaster_losses_allowed.yaml uses the boolean template ("…, if this is true."), with unit: bool and values true 2018 / false 2026, which matches Act 35's effective date.
    • Every new URL returns HTTP 200, and every anchor shows the cited text.
  • Callers at the head:

    • The federal variable feeds itemized_deductions, the limitation exclusions, CA's excluded list, the DE, DC, MO, VA and MN lists, and the MN Walz reform. All read the amount, and it changes only in TY2015–2017 or under active reforms. For the post-rebase Delaware interaction, see Suggestion 1.
    • ny_casualty_loss_deduction feeds ny_itemized_deductions_max and the phase-out. al_ feeds Alabama's sources.yaml. hi_ feeds Hawaii's sources and hi_reduced_itemized_deductions.
    • No partner test sets casualty_loss.
  • Documented convention (raised for Montana in Count a Montana casualty loss once per joint return and only for the spouse who had it #9888; not repeated as a finding): PE has one loss per person and no casualty count, so the $100 applies once per return. The PR documents this in all four formulas and the YAML headers.

    • Head loss 80 plus spouse loss 90 from two storms (NY or HI, 2025) gives 70. The law gives 0, and the parent gave 170.
    • One $170 casualty correctly gives 70.
  • Tests run on the extracted head tree, one file per process (local policyengine-core 3.26):

    • federal casualty_loss_deduction.yaml 12/12;
    • al_casualty_loss_deduction.yaml 12/12;
    • hi_casualty_loss_deduction.yaml 13/13;
    • ny_casualty_loss_deduction.yaml 9/9;
    • ny_pre_tcja_deductions.yaml 6/6;
    • tests/unit/test_casualty_loss_deduction_properties.py 7/7 in 74 s, of which the Hypothesis test is 3.9 s and the rest is mostly model load.
  • The property test works:

    • Hypothesis runs with derandomize=True, and hypothesis is already a dev dependency.
    • The grid has a guard against a vacuous pass (table.max() > 0).
    • Its reference, dependents and $100-threshold checks would all fail on the parent's formulas.
  • Reproduced on the head and on the parent (Count a Montana casualty loss once per joint return and only for the spouse who had it #9888 head e352ed05bb):

    Scenario Parent Head
    NY 2025 joint; wages 60k/40k; losses 10k + 5k 5,000 4,900
    NY 2025; only the dependent child had a loss (15k); parent wages 100k 5,000 0
    NY 2022 single; wages 100k; loss 15k (federal stays 0) 5,000 4,900
    AL 2017; al_agi −10,000; no loss / loss 300 1,000 / 1,300 0 / 200
    AL 2021; al_agi 1,000; loss 2,000 (non-disaster) 1,900 0
    AL 2024; wages 50k; loss 20k: deduction / al_itemized_deductions / al_income_tax 15,000 / 18,825 / 1,242.95 0 / 3,825 / 1,992.95
    HI; hi_agi 20,000; loss 5,000: 2025 / 2026 3,000 / 3,000 2,900 / 0
    Federal 2017 single; wages 50k; loss 10k 5,000 4,900
    Federal 2017 joint; wages 50k; losses 3k + 4k; dependent loss 9k 11,000 1,900
  • Hand checks (12):

    1. Federal Case 4: (10,000 − 100) − 5,000 = 4,900.
    2. Federal Case 9: AGI is 60,000 because the dependent's wages are excluded, so (8,000 − 100) − 6,000 = 1,900.
    3. Federal Case 12 (separate return): (5,000 − 100) − 2,000 = 2,900.
    4. AL Case 1 (2017): (2,000 − 100) − 100 = 1,800.
    5. AL Case 8 (joint): (3,000 − 100) − 1,000 = 1,900.
    6. AL Case 10: the floor clamps to 0, so 300 − 100 = 200.
    7. AL Case 12: 0. The parent gave 1,000 = 10% × 10,000.
    8. HI "larger loss": (300 − 100) − 100 = 100.
    9. HI Case 10: the dependent's loss is excluded, so (1,000 − 100) − 500 = 400.
    10. HI Case 11: line 21 is "If zero or less, enter zero", so the result is 200.
    11. NY Case 6, Pub. 547 Example 1: 6,700.
    12. ny_itemized_deductions_max: 5,000 + 2,500 + 12,000 + 2,000 + 4,900 = 26,400 at the head. After the rebase it becomes 23,900 (S1).
  • Test hygiene:

    • Test periods are plain.
    • The YAML parameter overrides are one casualty.active: true per tree (federal, AL, HI). That is well within the memory budget.
    • The 2018 federal case guards the suspension.
  • Changelog: changelog.d/fix-casualty-loss-165h-reduction.fixed.md is a top-level file of type fixed, and its text matches the change, including the Alabama and Hawaii gates.

Axiom line assessment

The PR body has two lines:

  • us/statutes/26/165/h TheAxiomFoundation/rulespec-us#1516 queued (federal Step 1 extended in this comment …)
  • us-ny/statutes/TAX/615, us-al/statutes/40-18-15 (a)(6), us-hi/statutes/235-2/4 TheAxiomFoundation/rulespec-us#1521 queued

Both are valid.

  • or_income_tax_after_refundable_credits -> or_income_tax #1516: OPEN and labelled pe-parity. The linked comment (2026-10-06 16:38 UTC) is dispatch-ready on the Add AMT parameters for 2020-2023 #1467 model:

    • module path us/statutes/26/165/h.yaml;
    • corpus citations re-pinned to scope us/statute/2026-08-03-rulespec-title-26-current-union in the signed release, adding (c)(3) and (h)(3)(B);
    • verbatim § 165(h), Form 4684 and Pub. 547;
    • five required outputs, with P.L. 119-108 and (h)(5) versioning;
    • companion cases F1–F13 derived from Form 4684 arithmetic. F1–F10 mirror the head's federal YAML.
  • MA excess exemption not applied to long-term capital gains #1521: OPEN and labelled pe-parity, last updated 2026-10-06 20:48 UTC (after the head commit). It has:

    • module paths for NY, AL and HI;
    • corpus scopes and gaps (Act 35 and IT-196-I need ingestion);
    • verbatim sources;
    • a review_finding for each step;
    • companion cases N1–N9, A1–A7 and H1–H8, which match the head's cases.

    It leaves out AL Cases 10–12 and HI Case 13. Those are PE methodology (the negative-AGI clamp) and reform cases, so this is fine.

  • Blockers: both issues and the PR body record them. Each signed run needs approval, the state modules import the unsigned federal module, and corpus ingestion is pending.

CI status

Branch status

Verdict: REQUEST_CHANGES

@DTrim99 DTrim99 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This review covers only the two commits on top of #9888. The law and code agree: the $100 comes before the 10% floor and a joint return is one individual under § 165(h), NY uses the 2017 rules via IT-196, AL has its post-2018 gate, and HI applies HRS 235-2.4(l)(1). The tests pass and the axiom issues are dispatch-ready. One should item (see the comment above): after #9888 is fixed, rebase by replaying only this PR's two commits. The NY pre-TCJA deductions expectation must become 23,900, and main's #9849 reference block in hi_casualty_loss_deduction.py must go to avoid a duplicate reference. Then refresh the PR body.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants