From 43b6246e089badd48f21e00906e82f5589b05d3c Mon Sep 17 00:00:00 2001 From: Nikhil Woodruff <35577657+nikhilwoodruff@users.noreply.github.com> Date: Thu, 5 Dec 2024 13:24:23 +0000 Subject: [PATCH] Add the Scottish WFP (#1000) * Fix Budget change reforms break on subset simulations #994 * Add the Scottish PAWHP * Versioning --- CHANGELOG.md | 7 +++ changelog.yaml | 5 ++ .../pawhp/amount/base.yaml | 8 +++ .../pawhp/amount/higher.yaml | 6 ++ .../pawhp/amount/lower.yaml | 6 ++ .../eligibility/higher_age_requirement.yaml | 6 ++ .../pawhp/eligibility/require_benefits.yaml | 8 +++ .../state_pension_age_requirement.yaml | 6 ++ policyengine_uk/variables/gov/dwp/WFA.py | 5 +- policyengine_uk/variables/gov/gov_spending.py | 1 + .../gov/social_security_scotland/pawhp.py | 56 +++++++++++++++++++ setup.py | 2 +- 12 files changed, 114 insertions(+), 2 deletions(-) create mode 100644 policyengine_uk/parameters/gov/social_security_scotland/pawhp/amount/base.yaml create mode 100644 policyengine_uk/parameters/gov/social_security_scotland/pawhp/amount/higher.yaml create mode 100644 policyengine_uk/parameters/gov/social_security_scotland/pawhp/amount/lower.yaml create mode 100644 policyengine_uk/parameters/gov/social_security_scotland/pawhp/eligibility/higher_age_requirement.yaml create mode 100644 policyengine_uk/parameters/gov/social_security_scotland/pawhp/eligibility/require_benefits.yaml create mode 100644 policyengine_uk/parameters/gov/social_security_scotland/pawhp/eligibility/state_pension_age_requirement.yaml create mode 100644 policyengine_uk/variables/gov/social_security_scotland/pawhp.py diff --git a/CHANGELOG.md b/CHANGELOG.md index 623952986..c7902f4ca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [2.18.0] - 2024-12-05 12:43:06 + +### Added + +- Scottish Winter Fuel Payment equivalent. + ## [2.17.0] - 2024-12-04 16:48:42 ### Fixed @@ -1609,6 +1615,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 +[2.18.0]: https://github.com/PolicyEngine/openfisca-uk/compare/2.17.0...2.18.0 [2.17.0]: https://github.com/PolicyEngine/openfisca-uk/compare/2.16.0...2.17.0 [2.16.0]: https://github.com/PolicyEngine/openfisca-uk/compare/2.15.1...2.16.0 [2.15.1]: https://github.com/PolicyEngine/openfisca-uk/compare/2.15.0...2.15.1 diff --git a/changelog.yaml b/changelog.yaml index 8f68232ce..9869f4018 100644 --- a/changelog.yaml +++ b/changelog.yaml @@ -1350,3 +1350,8 @@ fixed: - Scottish baseline matched with Scottish Fiscal Commission. date: 2024-12-04 16:48:42 +- bump: minor + changes: + added: + - Scottish Winter Fuel Payment equivalent. + date: 2024-12-05 12:43:06 diff --git a/policyengine_uk/parameters/gov/social_security_scotland/pawhp/amount/base.yaml b/policyengine_uk/parameters/gov/social_security_scotland/pawhp/amount/base.yaml new file mode 100644 index 000000000..0404994bf --- /dev/null +++ b/policyengine_uk/parameters/gov/social_security_scotland/pawhp/amount/base.yaml @@ -0,0 +1,8 @@ +description: Amount paid to non-benefit-claiming pensioners for the PAWHP. +values: + 2024-01-01: 0 + 2025-01-01: 100 +metadata: + unit: currency-GBP + label: PAWHP base payment + uprating: gov.obr.consumer_price_index diff --git a/policyengine_uk/parameters/gov/social_security_scotland/pawhp/amount/higher.yaml b/policyengine_uk/parameters/gov/social_security_scotland/pawhp/amount/higher.yaml new file mode 100644 index 000000000..d49c0a04f --- /dev/null +++ b/policyengine_uk/parameters/gov/social_security_scotland/pawhp/amount/higher.yaml @@ -0,0 +1,6 @@ +values: + 2024-01-01: 300 +metadata: + unit: currency-GBP + label: PAWHP lower amount + uprating: gov.obr.consumer_price_index diff --git a/policyengine_uk/parameters/gov/social_security_scotland/pawhp/amount/lower.yaml b/policyengine_uk/parameters/gov/social_security_scotland/pawhp/amount/lower.yaml new file mode 100644 index 000000000..f1aa14ed3 --- /dev/null +++ b/policyengine_uk/parameters/gov/social_security_scotland/pawhp/amount/lower.yaml @@ -0,0 +1,6 @@ +values: + 2024-01-01: 200 +metadata: + unit: currency-GBP + label: PAWHP lower amount + uprating: gov.obr.consumer_price_index \ No newline at end of file diff --git a/policyengine_uk/parameters/gov/social_security_scotland/pawhp/eligibility/higher_age_requirement.yaml b/policyengine_uk/parameters/gov/social_security_scotland/pawhp/eligibility/higher_age_requirement.yaml new file mode 100644 index 000000000..b56cf8d9c --- /dev/null +++ b/policyengine_uk/parameters/gov/social_security_scotland/pawhp/eligibility/higher_age_requirement.yaml @@ -0,0 +1,6 @@ +description: Age requirement to qualify for the higher PAWHP. +values: + 2000-01-01: 80 +metadata: + unit: year + label: Winter Fuel Payment higher amount age requirement diff --git a/policyengine_uk/parameters/gov/social_security_scotland/pawhp/eligibility/require_benefits.yaml b/policyengine_uk/parameters/gov/social_security_scotland/pawhp/eligibility/require_benefits.yaml new file mode 100644 index 000000000..1f657da4c --- /dev/null +++ b/policyengine_uk/parameters/gov/social_security_scotland/pawhp/eligibility/require_benefits.yaml @@ -0,0 +1,8 @@ +description: Whether receipt of means-tested benefits is required to qualify for the Winter Fuel Payment. +values: + 2000-01-01: false + 2024-01-01: + value: true +metadata: + unit: bool + label: PAWHP means-tested benefits requirement diff --git a/policyengine_uk/parameters/gov/social_security_scotland/pawhp/eligibility/state_pension_age_requirement.yaml b/policyengine_uk/parameters/gov/social_security_scotland/pawhp/eligibility/state_pension_age_requirement.yaml new file mode 100644 index 000000000..862175ec6 --- /dev/null +++ b/policyengine_uk/parameters/gov/social_security_scotland/pawhp/eligibility/state_pension_age_requirement.yaml @@ -0,0 +1,6 @@ +description: Whether individuals must be State Pension Age to qualify for the PAWHP. +values: + 2000-01-01: true +metadata: + unit: bool + label: PAWHP State Pension Age requirement diff --git a/policyengine_uk/variables/gov/dwp/WFA.py b/policyengine_uk/variables/gov/dwp/WFA.py index 937b6954c..45f932357 100644 --- a/policyengine_uk/variables/gov/dwp/WFA.py +++ b/policyengine_uk/variables/gov/dwp/WFA.py @@ -18,6 +18,9 @@ class winter_fuel_allowance(Variable): unit = GBP def formula(household, period, parameters): + in_scotland = ( + household("country", period).decode_to_str() == "SCOTLAND" + ) age = household.members("age", period) is_SP_age = household.members("is_SP_age", period) wfp = parameters(period).gov.dwp.winter_fuel_payment @@ -53,7 +56,7 @@ def formula(household, period, parameters): & ~meets_higher_age_requirement ) - return ( + return ~in_scotland * ( wfp.amount.higher * qualifies_for_higher + wfp.amount.lower * qualifies_for_lower ) diff --git a/policyengine_uk/variables/gov/gov_spending.py b/policyengine_uk/variables/gov/gov_spending.py index 27e86fb95..46bebfd78 100644 --- a/policyengine_uk/variables/gov/gov_spending.py +++ b/policyengine_uk/variables/gov/gov_spending.py @@ -40,6 +40,7 @@ class gov_spending(Variable): "cost_of_living_support_payment", "energy_bills_rebate", "winter_fuel_allowance", + "pawhp", "nhs_budget_change", "education_budget_change", "other_public_spending_budget_change", diff --git a/policyengine_uk/variables/gov/social_security_scotland/pawhp.py b/policyengine_uk/variables/gov/social_security_scotland/pawhp.py new file mode 100644 index 000000000..bfb34aae8 --- /dev/null +++ b/policyengine_uk/variables/gov/social_security_scotland/pawhp.py @@ -0,0 +1,56 @@ +from policyengine_uk.model_api import * + + +class pawhp(Variable): + label = "Pension Age Winter Heating Payment" + entity = Household + definition_period = YEAR + value_type = float + unit = GBP + + def formula(household, period, parameters): + in_scotland = ( + household("country", period).decode_to_str() == "SCOTLAND" + ) + age = household.members("age", period) + is_SP_age = household.members("is_SP_age", period) + wfp = parameters(period).gov.social_security_scotland.pawhp + on_mtb = ( + add( + household, + period, + [ + "pension_credit", + "income_support", + "esa_income", + "jsa_income", + ], + ) + > 0 + ) + meets_mtb_requirement = on_mtb | ~wfp.eligibility.require_benefits + meets_spa_requirement = ( + household.any(is_SP_age) + | ~wfp.eligibility.state_pension_age_requirement + ) + meets_higher_age_requirement = household.any( + age >= wfp.eligibility.higher_age_requirement + ) + qualifies_for_higher = ( + meets_mtb_requirement + & meets_spa_requirement + & meets_higher_age_requirement + ) + qualifies_for_lower = ( + meets_mtb_requirement + & meets_spa_requirement + & ~meets_higher_age_requirement + ) + + qualifies_for_base = ~meets_mtb_requirement & meets_spa_requirement + + return in_scotland * ( + wfp.amount.higher * qualifies_for_higher + + wfp.amount.lower * qualifies_for_lower + + wfp.amount.base * qualifies_for_base + ) diff --git a/setup.py b/setup.py index df5abd8c0..1e71f8e9d 100644 --- a/setup.py +++ b/setup.py @@ -4,7 +4,7 @@ setup( name="PolicyEngine-UK", - version="2.17.0", + version="2.18.0", author="PolicyEngine", author_email="nikhil@policyengine.org", classifiers=[