From fbb635461fb8b38d6ca43d9501822c6646dcf30e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mar=C3=ADa=20Juaristi?= <127882282+juaristi22@users.noreply.github.com> Date: Thu, 22 Oct 2026 22:39:06 +0100 Subject: [PATCH] Clarify Boolean masks and gross wealth tax documentation --- changelog.d/136.changed.md | 1 + changelog.d/2560.changed.md | 1 + .../gov/contrib/cec/non_primary_residence_wealth_tax.yaml | 4 ++-- .../contrib/cec/non_primary_residence_wealth_tax.py | 5 ++++- .../variables/contrib/ubi_center/basic_income/bi_maximum.py | 4 ++-- .../universal_credit/household_uc_unreported_claimants.py | 2 +- 6 files changed, 11 insertions(+), 6 deletions(-) create mode 100644 changelog.d/136.changed.md create mode 100644 changelog.d/2560.changed.md diff --git a/changelog.d/136.changed.md b/changelog.d/136.changed.md new file mode 100644 index 0000000000..6a95442c86 --- /dev/null +++ b/changelog.d/136.changed.md @@ -0,0 +1 @@ +- Used explicit Boolean conjunctions for basic-income eligibility and unreported Universal Credit claimant masks. diff --git a/changelog.d/2560.changed.md b/changelog.d/2560.changed.md new file mode 100644 index 0000000000..a2c686a974 --- /dev/null +++ b/changelog.d/2560.changed.md @@ -0,0 +1 @@ +- Clarified that the non-primary-residence wealth tax uses gross wealth and deducts no debt. diff --git a/policyengine_uk/parameters/gov/contrib/cec/non_primary_residence_wealth_tax.yaml b/policyengine_uk/parameters/gov/contrib/cec/non_primary_residence_wealth_tax.yaml index d35049096d..9ef1e85f16 100644 --- a/policyengine_uk/parameters/gov/contrib/cec/non_primary_residence_wealth_tax.yaml +++ b/policyengine_uk/parameters/gov/contrib/cec/non_primary_residence_wealth_tax.yaml @@ -14,8 +14,8 @@ brackets: unit: currency-GBP values: 2000-01-01: 0 -description: Annual tax on total wealth (includes all property and corporate wealth - except primary residences). +description: Annual tax on gross household wealth excluding the primary residence, + without deducting mortgage or other debt. metadata: label: Wealth tax excluding primary residences type: marginal_rate diff --git a/policyengine_uk/variables/contrib/cec/non_primary_residence_wealth_tax.py b/policyengine_uk/variables/contrib/cec/non_primary_residence_wealth_tax.py index 66d7b6dabe..f8e19270bc 100644 --- a/policyengine_uk/variables/contrib/cec/non_primary_residence_wealth_tax.py +++ b/policyengine_uk/variables/contrib/cec/non_primary_residence_wealth_tax.py @@ -3,7 +3,10 @@ class non_primary_residence_wealth_tax(Variable): label = "Wealth tax (non-primary residence)" - documentation = "Annual tax on household net wealth excluding primary residences" + documentation = ( + "Annual tax on gross household wealth excluding the primary residence. " + "The tax base deducts no mortgage or other debt." + ) entity = Household definition_period = YEAR value_type = float diff --git a/policyengine_uk/variables/contrib/ubi_center/basic_income/bi_maximum.py b/policyengine_uk/variables/contrib/ubi_center/basic_income/bi_maximum.py index 07ce39159b..fa00647b13 100644 --- a/policyengine_uk/variables/contrib/ubi_center/basic_income/bi_maximum.py +++ b/policyengine_uk/variables/contrib/ubi_center/basic_income/bi_maximum.py @@ -13,8 +13,8 @@ def formula(person, period, parameters): weekly_flat_amount = bi.amount.flat is_senior_for_bi = person("is_SP_age", period) age = person("age", period) - is_child_for_bi = (age < bi.amount.adult_age) * (age >= bi.amount.child_min_age) - is_adult_for_bi = (age >= bi.amount.adult_age) * ~is_senior_for_bi + is_child_for_bi = (age < bi.amount.adult_age) & (age >= bi.amount.child_min_age) + is_adult_for_bi = (age >= bi.amount.adult_age) & ~is_senior_for_bi weekly_amount_by_age = select( [is_child_for_bi, is_senior_for_bi, is_adult_for_bi], [ diff --git a/policyengine_uk/variables/gov/dwp/universal_credit/household_uc_unreported_claimants.py b/policyengine_uk/variables/gov/dwp/universal_credit/household_uc_unreported_claimants.py index 50940158a9..5c2c7e2d5c 100644 --- a/policyengine_uk/variables/gov/dwp/universal_credit/household_uc_unreported_claimants.py +++ b/policyengine_uk/variables/gov/dwp/universal_credit/household_uc_unreported_claimants.py @@ -29,4 +29,4 @@ def formula(household, period, parameters): financial_capital = person.benunit("benunit_reported_capital", period) has_reported_capital = (reported_capital >= 0) | (financial_capital >= 0) is_uc_claimant = person("is_uc_claimant", period) - return household.sum(is_uc_claimant * ~has_reported_capital) + return household.sum(is_uc_claimant & ~has_reported_capital)