Commit e03fc3c
Parametrise Marriage Allowance eligible bands and fix NONE case (#1624)
* Parametrise Marriage Allowance eligible bands and fix NONE case
Fixes #395. The previous formula hard-coded BASIC / STARTER /
INTERMEDIATE as the eligible tax bands for transferring Marriage
Allowance. Replaces that with a list parameter
gov.hmrc.income_tax.allowances.marriage_allowance.eligible_bands so the
set is declarative, reform-friendly, and documents itself against ITA
2007 s.55B.
Also adds NONE to the default list. Someone whose taxable income sits
below the personal allowance is band NONE, which the old check
rejected — but ITA 2007 s.55B(1)(a) only excludes transferors who are
liable at the higher rate or above, so a zero-tax spouse is eligible
to transfer their unused allowance (this is a common motivation for
electing MA in the first place).
Adds regression YAML cases for NONE, STARTER, and INTERMEDIATE bands.
The existing BASIC / HIGHER / ADDITIONAL assertions are unchanged.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Route CPS expanded-MA reform through the eligible_bands parameter
The CPS expanded-Marriage-Allowance reform was overriding
meets_marriage_allowance_income_conditions with its own hard-coded
BASIC | STARTER | INTERMEDIATE check (plus the HIGHER/ADDITIONAL
expansion), so the baseline parametrisation and the NONE fix from
291774a did not reach simulations running under that reform.
Replace the hard-coded base with the same np.isin(band.decode_to_str(),
eligible_bands) lookup used in the baseline variable, then OR the
existing HIGHER/ADDITIONAL expansion on top. Both code paths now read
the parameter, and the NONE-band eligibility flows through to reform
runs for free.
Also adjust the changelog fragment to mention both call sites.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent ed4f10b commit e03fc3c
5 files changed
Lines changed: 51 additions & 17 deletions
File tree
- changelog.d
- policyengine_uk
- parameters/gov/hmrc/income_tax/allowances/marriage_allowance
- reforms/cps
- tests/policy/baseline/gov/hmrc/income_tax/allowances
- variables/gov/hmrc/income_tax/allowances
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
38 | 38 | | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
39 | 44 | | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
| 45 | + | |
| 46 | + | |
48 | 47 | | |
| 48 | + | |
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| |||
Lines changed: 21 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
Lines changed: 6 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
0 commit comments