diff --git a/changelog.d/ar-gambling-followup-tests.changed.md b/changelog.d/ar-gambling-followup-tests.changed.md new file mode 100644 index 00000000000..46440c41d49 --- /dev/null +++ b/changelog.d/ar-gambling-followup-tests.changed.md @@ -0,0 +1 @@ +Cite Act 732 of 2007 and DFA Subject 208 for the Arkansas electronic games of skill exclusion, and tighten the Arkansas gambling loss deduction tests (no 2% floor on the separate-filing path, status 4 proration). diff --git a/policyengine_us/parameters/gov/states/ar/tax/income/gross_income/sources/individual.yaml b/policyengine_us/parameters/gov/states/ar/tax/income/gross_income/sources/individual.yaml index c9705de6925..bc53a2ed805 100644 --- a/policyengine_us/parameters/gov/states/ar/tax/income/gross_income/sources/individual.yaml +++ b/policyengine_us/parameters/gov/states/ar/tax/income/gross_income/sources/individual.yaml @@ -100,6 +100,10 @@ metadata: period: year label: Arkansas gross income sources when married filing separately reference: + - title: Arkansas Act 732 of 2007, § 8, enacting Ark. Code § 26-51-1310(f) (electronic games of skill winnings are not includable as income; their losses are not deductible) + href: https://www.arkleg.state.ar.us/Acts/FTPDocument?path=%2FACTS%2F2007%2FPublic%2F&file=732.pdf&ddBienniumSession=2007%2F2007R#page=5 + - title: Arkansas DFA Subject 208, Gambling Income and Expenses (gambling winnings are fully taxable; the electronic games of skill exception covers winnings before July 1, 2019) + href: https://www.dfa.arkansas.gov/wp-content/uploads/208-GamblingIncomeExpenses.pdf#page=1 - title: Arkansas 2015 Individual Income Tax Instructions (unemployment compensation is exempt from tax) href: https://www.dfa.arkansas.gov/wp-content/uploads/LongBookwTaxTables_2015.pdf#page=12 - title: Arkansas 2016 Individual Income Tax Instructions (unemployment compensation is exempt from tax) diff --git a/policyengine_us/parameters/gov/states/ar/tax/income/gross_income/sources/joint.yaml b/policyengine_us/parameters/gov/states/ar/tax/income/gross_income/sources/joint.yaml index c8583b5dd2e..46a2c8d5b66 100644 --- a/policyengine_us/parameters/gov/states/ar/tax/income/gross_income/sources/joint.yaml +++ b/policyengine_us/parameters/gov/states/ar/tax/income/gross_income/sources/joint.yaml @@ -100,6 +100,10 @@ metadata: period: year label: Arkansas gross income sources when married filing jointly reference: + - title: Arkansas Act 732 of 2007, § 8, enacting Ark. Code § 26-51-1310(f) (electronic games of skill winnings are not includable as income; their losses are not deductible) + href: https://www.arkleg.state.ar.us/Acts/FTPDocument?path=%2FACTS%2F2007%2FPublic%2F&file=732.pdf&ddBienniumSession=2007%2F2007R#page=5 + - title: Arkansas DFA Subject 208, Gambling Income and Expenses (gambling winnings are fully taxable; the electronic games of skill exception covers winnings before July 1, 2019) + href: https://www.dfa.arkansas.gov/wp-content/uploads/208-GamblingIncomeExpenses.pdf#page=1 - title: Arkansas 2015 Individual Income Tax Instructions (unemployment compensation is exempt from tax) href: https://www.dfa.arkansas.gov/wp-content/uploads/LongBookwTaxTables_2015.pdf#page=12 - title: Arkansas 2016 Individual Income Tax Instructions (unemployment compensation is exempt from tax) diff --git a/policyengine_us/tests/policy/baseline/gov/states/ar/tax/income/ar_gambling_winnings_and_losses.yaml b/policyengine_us/tests/policy/baseline/gov/states/ar/tax/income/ar_gambling_winnings_and_losses.yaml index 2dc500e7140..e5434e8e59c 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/ar/tax/income/ar_gambling_winnings_and_losses.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/ar/tax/income/ar_gambling_winnings_and_losses.yaml @@ -126,3 +126,34 @@ ar_agi_joint: 70_000 ar_itemized_deductions_joint: 8_000 ar_taxable_income_joint: 62_000 + +- name: Married filing separately on the same return prorates pooled itemized deductions, gambling losses included, by AGI + period: 2025 + input: + people: + head: + age: 40 + employment_income: 200_000 + real_estate_taxes: 20_000 + spouse: + age: 40 + employment_income: 10_000 + gambling_winnings: 50_000 + gambling_losses: 50_000 + tax_units: + tax_unit: + members: [head, spouse] + households: + household: + members: [head, spouse] + state_code: AR + output: + ar_files_separately: true + ar_agi_indiv: [200_000, 60_000] + ar_gambling_loss_deduction: 50_000 + # AR3 lines 31-35: the 70,000 of pooled itemized deductions is split by AGI + # share rounded to the nearest percent, 77% / 23%. The winnings raise the + # spouse's share, so part of the head's real estate tax moves to the spouse, + # which is how the form works. Total taxable income is unchanged at 190,000. + ar_itemized_deductions_indiv: [53_900, 16_100] + ar_taxable_income_indiv: [146_100, 43_900] diff --git a/policyengine_us/tests/policy/baseline/gov/states/ar/tax/income/deductions/itemized/ar_gambling_loss_deduction.yaml b/policyengine_us/tests/policy/baseline/gov/states/ar/tax/income/deductions/itemized/ar_gambling_loss_deduction.yaml index d5dc7fc6163..efa45613669 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/ar/tax/income/deductions/itemized/ar_gambling_loss_deduction.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/ar/tax/income/deductions/itemized/ar_gambling_loss_deduction.yaml @@ -1,5 +1,7 @@ # DFA Subject 208 applied the same cap and 2% exemption before Act 155 of 2017 -# codified it from 2015, so the deduction is not limited to 2015 and later. +# codified it from 2015, so the formula has no year gate. This case guards +# against adding one; PolicyEngine computes Arkansas income tax only from 2015 +# (Arkansas parameters are backdated to 2015-01-01). - name: 2014 gambling losses are deductible only to the extent of winnings period: 2014 input: diff --git a/policyengine_us/tests/unit/test_ar_gambling_properties.py b/policyengine_us/tests/unit/test_ar_gambling_properties.py index 5be6e44a3a9..7c4e45e1861 100644 --- a/policyengine_us/tests/unit/test_ar_gambling_properties.py +++ b/policyengine_us/tests/unit/test_ar_gambling_properties.py @@ -74,6 +74,8 @@ def test_deduction_is_losses_capped_at_winnings(year): ) deduction = sim.calculate("ar_gambling_loss_deduction", year) np.testing.assert_allclose(deduction, np.minimum(LOSSES, WINNINGS)) + # The bounds and monotonicity follow from the exact check above; they are + # kept as the stated invariants. assert np.all(deduction >= 0) assert np.all(deduction <= WINNINGS) assert np.all(deduction <= LOSSES) @@ -93,9 +95,10 @@ def test_deduction_does_not_depend_on_the_year(): np.testing.assert_array_equal(result, results[0]) -@pytest.mark.parametrize("agi", [0, 50_000, 1_000_000]) -def test_deduction_is_not_subject_to_the_two_percent_floor(agi): - year = 2019 +@pytest.mark.parametrize("year", [2019, 2025]) +@pytest.mark.parametrize("agi", [10_000, 50_000, 1_000_000]) +def test_deduction_is_not_subject_to_the_two_percent_floor(year, agi): + # At these AGIs a 2% floor would remove $200 to $20,000 of the losses. sim = grid_simulation( year, { @@ -105,12 +108,12 @@ def test_deduction_is_not_subject_to_the_two_percent_floor(agi): "ar_agi_indiv": constant(agi), }, ) - deduction = sim.calculate("ar_gambling_loss_deduction", year) - np.testing.assert_allclose(deduction, np.minimum(LOSSES, WINNINGS)) - # No other itemized deduction has inputs, so the itemized total is the - # full gambling deduction whatever the AGI. - itemized = sim.calculate("ar_itemized_deductions_joint", year) - np.testing.assert_allclose(itemized, deduction) + deduction = np.minimum(LOSSES, WINNINGS) + # No other itemized deduction has inputs, so both itemized totals equal the + # full gambling deduction whatever the AGI. A one-person unit gets 100% of + # the separate-filing proration. + for variable in ["ar_itemized_deductions_joint", "ar_itemized_deductions_indiv"]: + np.testing.assert_allclose(sim.calculate(variable, year), deduction) @pytest.mark.parametrize("year", YEARS)