Skip to content

Commit

Permalink
Merge pull request #913 from PolicyEngine/nikhilwoodruff/issue912
Browse files Browse the repository at this point in the history
Add Winter Fuel Allowance
  • Loading branch information
nikhilwoodruff authored Jul 29, 2024
2 parents f7949d2 + e81cb78 commit 8b9bac6
Show file tree
Hide file tree
Showing 7 changed files with 88 additions and 1 deletion.
4 changes: 4 additions & 0 deletions changelog_entry.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- bump: minor
changes:
added:
- Winter Fuel Allowance.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
values:
2000-01-01: 300
metadata:
unit: currency-GBP
label: Winter Fuel Payment higher amount
reference:
- href: https://www.legislation.gov.uk/uksi/2000/729/regulation/2
title: The Social Fund Winter Fuel Payment Regulations 2000
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
values:
2000-01-01: 200
metadata:
unit: currency-GBP
label: Winter Fuel Payment lower amount
reference:
- href: https://www.legislation.gov.uk/uksi/2000/729/regulation/2
title: The Social Fund Winter Fuel Payment Regulations 2000
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
description: Age requirement to qualify for the higher Winter Fuel Payment.
values:
2000-01-01: 80
metadata:
unit: year
label: Winter Fuel Payment higher amount age requitement
reference:
- href: https://www.legislation.gov.uk/uksi/2000/729/regulation/2
title: The Social Fund Winter Fuel Payment Regulations 2000
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
description: Whether receipt of means-tested benefits is required to qualify for the Winter Fuel Payment.
values:
2000-01-01: false
metadata:
unit: bool
label: Winter Fuel Payment means-tested benefits requirement
reference:
- href: https://www.legislation.gov.uk/uksi/2000/729/regulation/2
title: The Social Fund Winter Fuel Payment Regulations 2000
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
description: Whether individuals must be State Pension Age to qualify for the Winter Fuel Payment.
values:
2000-01-01: true
metadata:
unit: bool
label: Winter Fuel Payment State Pension Age requirement
reference:
- href: https://www.legislation.gov.uk/uksi/2000/729/regulation/2
title: The Social Fund Winter Fuel Payment Regulations 2000
42 changes: 41 additions & 1 deletion policyengine_uk/variables/gov/dwp/WFA.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,44 @@ class winter_fuel_allowance(Variable):
value_type = float
unit = GBP

adds = ["winter_fuel_allowance_reported"]
def formula(household, period, parameters):
age = household.members("age", period)
is_SP_age = household.members("is_SP_age", period)
wfp = parameters(period).gov.dwp.winter_fuel_payment
on_mtb = (
add(
household,
period,
[
"pension_credit",
"income_support",
"ESA_income",
"JSA_income",
],
)
> 0
)
meets_mtb_requirement = on_mtb | ~wfp.eligibility.require_benefits
print(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
)

return (
wfp.amount.higher * qualifies_for_higher
+ wfp.amount.lower * qualifies_for_lower
)

0 comments on commit 8b9bac6

Please sign in to comment.