Skip to content
Merged
Show file tree
Hide file tree
Changes from 52 commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
adf96a0
Implement tax free childcare
vahid-ahmadi Jan 10, 2025
ee24d61
Parameterize values
vahid-ahmadi Jan 13, 2025
12d24be
Reformatting to pass the tests
vahid-ahmadi Jan 13, 2025
235fd08
Reformatting with black
vahid-ahmadi Jan 13, 2025
b3b1967
Reformatting with black
vahid-ahmadi Jan 13, 2025
55ce6c3
Format code with black
vahid-ahmadi Jan 13, 2025
9952ed9
Format code with black using 79-char line length
vahid-ahmadi Jan 13, 2025
d6b22e5
Fix YAML structure
vahid-ahmadi Jan 13, 2025
b06a47c
Fix age condition YAML file
vahid-ahmadi Jan 13, 2025
90eb823
Fix age condition YAML file
vahid-ahmadi Jan 13, 2025
0c871a5
Fix other YAML files
vahid-ahmadi Jan 13, 2025
b28b5f8
Edit parameterization
vahid-ahmadi Jan 13, 2025
ff1f456
Fix formatting
vahid-ahmadi Jan 13, 2025
d3ad685
Edit age in YAML files
vahid-ahmadi Jan 13, 2025
5c6d359
Replace if with where
vahid-ahmadi Jan 13, 2025
e0221f8
Format with black
vahid-ahmadi Jan 13, 2025
fc83a03
Edit for test passing
vahid-ahmadi Jan 13, 2025
4421154
Edit format with black
vahid-ahmadi Jan 13, 2025
b4e8d1a
Edit format of benefit py file
vahid-ahmadi Jan 13, 2025
cf7f6e6
Edit child as not being boolean
vahid-ahmadi Jan 13, 2025
d4ff3b2
Change if to where
vahid-ahmadi Jan 14, 2025
0058402
Change disability definition
vahid-ahmadi Jan 14, 2025
37c7228
Solve .values problem
vahid-ahmadi Jan 14, 2025
af96f3a
Edit .values error
vahid-ahmadi Jan 14, 2025
e96bc2e
Edit vectorization problem
vahid-ahmadi Jan 14, 2025
153c2f6
Change folder from hmrc to dwp
vahid-ahmadi Jan 14, 2025
c9fbd0c
Use is_disabled_for_benefits variable
vahid-ahmadi Jan 14, 2025
a2f73d2
Add .astype(bool) to fix error
vahid-ahmadi Jan 14, 2025
a061877
Fix bitwise AND operation error
vahid-ahmadi Jan 14, 2025
a9ca8a7
Add .astype(bool) to conditions
vahid-ahmadi Jan 14, 2025
c7c6762
Add unit tests
vahid-ahmadi Jan 14, 2025
59e1b78
Reformat with black
vahid-ahmadi Jan 14, 2025
cebaace
Fix the folders
vahid-ahmadi Jan 15, 2025
c1a5cf0
Fix the folders
vahid-ahmadi Jan 15, 2025
49ec556
Merge branch 'tax-free-childcare-new' of https://github.com/policyeng…
vahid-ahmadi Jan 15, 2025
4a5cad5
Implement free childcare program
vahid-ahmadi Jan 15, 2025
4432db2
Format with black
vahid-ahmadi Jan 15, 2025
c7c1998
Change tests
vahid-ahmadi Jan 15, 2025
789f676
Edit format based on Pavel's comments
vahid-ahmadi Jan 17, 2025
9fc1b53
Edit tax-free childcare based on Pavel's comments
vahid-ahmadi Jan 20, 2025
a15d5a2
Reform with Black
vahid-ahmadi Jan 20, 2025
c1bb0e1
Remove redundant files
vahid-ahmadi Jan 22, 2025
df9f458
Edit files based on Pavel's comments
vahid-ahmadi Jan 23, 2025
d295f33
Format with black
vahid-ahmadi Jan 23, 2025
cb6ce03
Edit ‘adjusted_net_income’ and ‘is_blind’ parameters
vahid-ahmadi Jan 27, 2025
6b4656e
Format with black
vahid-ahmadi Jan 27, 2025
7c5f76d
Edit codes based on Max's comments
vahid-ahmadi Jan 28, 2025
060d9f5
Reslove a conflict
vahid-ahmadi Jan 28, 2025
e029a0b
Apply Max's comments
vahid-ahmadi Jan 28, 2025
536a410
Apply Max's comments
vahid-ahmadi Jan 29, 2025
b4d8890
Edit parameter in py code
vahid-ahmadi Jan 29, 2025
2956ae2
Add the benefit to the list of benefits
vahid-ahmadi Jan 30, 2025
5d45260
Apply Max's comments
vahid-ahmadi Jan 31, 2025
9fe23a3
Edit law part
vahid-ahmadi Jan 31, 2025
a707e07
Edit law part
vahid-ahmadi Feb 3, 2025
6899c77
Merge branch 'tax-free-childcare-new' of https://github.com/policyeng…
vahid-ahmadi Feb 3, 2025
d227246
Merge branch 'master' into tax-free-childcare-new
vahid-ahmadi Feb 4, 2025
a5ff04c
Edit benefit file for now
vahid-ahmadi Feb 4, 2025
9df3baf
Apply Nikhil's comments
vahid-ahmadi Feb 4, 2025
bd13fa9
Format with black
vahid-ahmadi Feb 4, 2025
d436430
Update policyengine_uk/parameters/gov/hmrc/tax_free_childcare/income/…
nikhilwoodruff Feb 4, 2025
f1f5f13
Edit the description of countable income sources
vahid-ahmadi Feb 4, 2025
1fc794a
Merge branch 'tax-free-childcare-new' of https://github.com/policyeng…
vahid-ahmadi Feb 4, 2025
cde37ba
Add TFC to gov_spending
vahid-ahmadi Feb 4, 2025
593adcf
Edit name of the variable tax_free_childcare
vahid-ahmadi Feb 4, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions policyengine_uk/parameters/gov/hmrc/minimum_wage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ APPRENTICE:
2020-04-01: 4.15
2021-04-01: 4.3
2022-04-01: 4.81
2024-04-01: 6.4
2025-04-01: 7.55
BETWEEN_18_20:
values:
2012-10-01: 4.98
Expand All @@ -24,6 +26,8 @@ BETWEEN_18_20:
2020-04-01: 6.45
2021-04-01: 6.56
2022-04-01: 6.83
2024-04-01: 8.6
2025-04-01: 10
BETWEEN_21_22:
values:
2012-10-01: 6.19
Expand All @@ -38,6 +42,8 @@ BETWEEN_21_22:
2020-04-01: 8.2
2021-04-01: 8.36
2022-04-01: 9.18
2024-04-01: 11.44
2025-04-01: 12.21
BETWEEN_23_24:
values:
2012-10-01: 6.19
Expand All @@ -51,6 +57,8 @@ BETWEEN_23_24:
2020-04-01: 8.2
2021-04-01: 8.91
2022-04-01: 9.5
2024-04-01: 11.44
2025-04-01: 12.21
OVER_24:
values:
2012-10-01: 6.19
Expand All @@ -64,6 +72,8 @@ OVER_24:
2020-04-01: 8.72
2021-04-01: 8.91
2022-04-01: 9.5
2024-04-01: 11.44
2025-04-01: 12.21
UNDER_18:
values:
2012-10-01: 3.68
Expand All @@ -77,6 +87,8 @@ UNDER_18:
2020-04-01: 4.55
2021-04-01: 4.62
2022-04-01: 4.81
2024-04-01: 6.4
2025-04-01: 7.55
description: Minimum wage by age group
metadata:
economy: false
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
description: The HMRC department extends the tax-free childcare program eligibility to children with disabilities up to this age threshold.
metadata:
unit: year
period: year
label: Tax-free childcare disability age limit
reference:
- title: Childcare Payments Act 2014 - c. 28 - section 14
href: https://www.legislation.gov.uk/ukpga/2014/28/notes/division/6/4/1
- title: Tax-free childcare guidance
href: https://www.gov.uk/tax-free-childcare?step-by-step-nav=d78aeaf6-1747-4d72-9619-f16efb4dd89d
values:
2015-01-01: 17
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
description: The HMRC department extends the tax-free childcare program eligibility to children up to this age threshold.
metadata:
unit: year
period: year
label: Tax-free childcare standard age limit
reference:
- title: Childcare Payments Act 2014 - c. 28 - section 14
href: https://www.legislation.gov.uk/ukpga/2014/28/notes/division/6/4/1
- title: Tax-free childcare guidance
href: https://www.gov.uk/tax-free-childcare?step-by-step-nav=d78aeaf6-1747-4d72-9619-f16efb4dd89d
values:
2015-01-01: 12
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
description: The HMRC department provides tax-free childcare contribution up to this yearly amount for households with disabled children.
metadata:
unit: currency-GBP
period: year
label: Tax-free childcare disabled child yearly limit
reference:
- title: Childcare Payments Act 2014 - c. 28 - section 19
href: https://www.legislation.gov.uk/ukpga/2014/28/notes/division/6/5/5
- title: Tax-free childcare guidance
href: https://www.gov.uk/tax-free-childcare?step-by-step-nav=d78aeaf6-1747-4d72-9619-f16efb4dd89d
values:
2015-01-01: 4_000
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
description: The HMRC department provides tax-free childcare contribution up to this yearly amount for households with children under standard eligibility.
metadata:
unit: currency-GBP
period: year
label: Tax-free childcare standard yearly limit
reference:
- title: Childcare Payments Act 2014 - c. 28 - section 19
href: https://www.legislation.gov.uk/ukpga/2014/28/notes/division/6/5/5
- title: Tax-free childcare guidance
href: https://www.gov.uk/tax-free-childcare?step-by-step-nav=d78aeaf6-1747-4d72-9619-f16efb4dd89d
values:
2015-01-01: 2_000
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
description: HMRC limits Tax-Free Childcare to benefit units that do not receive any of these programs.
metadata:
reference:
- title: The Childcare Payments (Eligibility) Regulations 2015 - Part 16 and 18
href: https://www.legislation.gov.uk/ukdsi/2015/9780111127063
period: year
unit: program
label: Tax-free childcare disqualifying benefits
values:
2015-01-01:
- working_tax_credit
- child_tax_credit
- universal_credit
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
description: The HMRC department limits tax-free childcare eligibility to households where individual adjusted income does not exceed this yearly threshold.
metadata:
unit: currency-GBP
period: year
label: Tax-free childcare maximum adjusted income threshold
reference:
- title: The Childcare Payments (Eligibility) Regulations 2015 - Regulation 15
href: https://www.legislation.gov.uk/uksi/2015/448/regulation/15#commentary-key-e27c923eee152accd495af8425536e29
- title: Tax-free childcare guidance
href: https://www.gov.uk/tax-free-childcare?step-by-step-nav=d78aeaf6-1747-4d72-9619-f16efb4dd89d
values:
2015-01-01: 100_000
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
description: HMRC excludes certain investment income types when determining eligibility for Tax-Free Childcare, including pension, savings, dividend, and property income
metadata:
reference:
- title: The Childcare Payments (Eligibility) Regulations 2015 - Part 16 and 18
href: https://www.legislation.gov.uk/ukdsi/2015/9780111127063
period: year
unit: currency-GBP
label: none
values:
2015-01-01:
- private_pension_income
- savings_interest_income
- dividend_income
- property_income
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
description: Claimants must work sufficient hours to earn the equivalent of 16 hours per week at National Minimum Wage.
metadata:
period: year
unit: hour
label: Minimum weekly working hours threshold at National Minimum Wage
reference:
- title: The Childcare Payments (Eligibility) (Amendment) Regulations 2016 - regulation 3
href: https://www.legislation.gov.uk/uksi/2016/793/regulation/3/made
values:
2016-01-01: 16
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
- name: Under standard age limit - eligible
period: 2025
input:
age: 10
is_disabled_for_benefits: false
output:
tax_free_childcare_child_age_eligible: true

- name: Over standard age limit and not disabled - ineligible
period: 2025
input:
age: 12
is_disabled_for_benefits: false
output:
tax_free_childcare_child_age_eligible: false

- name: Over standard age but under disability limit and disabled - eligible
period: 2025
input:
age: 15
is_disabled_for_benefits: true
output:
tax_free_childcare_child_age_eligible: true

- name: Over disability age limit and disabled - ineligible
period: 2025
input:
age: 17
is_disabled_for_benefits: true
output:
tax_free_childcare_child_age_eligible: false
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Tests for tax_free_childcare
- name: Eligible standard child
period: 2025
input:
tax_free_childcare_eligible: true
is_child: true
is_disabled_for_benefits: false
output:
tax_free_childcare_benefits_amount: 2000

- name: Eligible disabled child
period: 2025
input:
tax_free_childcare_eligible: true
is_child: true
is_disabled_for_benefits: true
output:
tax_free_childcare_benefits_amount: 4000

- name: Not eligible due to not being child
period: 2025
input:
tax_free_childcare_eligible: true
is_child: false
is_disabled_for_benefits: false
output:
tax_free_childcare_benefits_amount: 0

- name: Not eligible despite being disabled child
period: 2025
input:
tax_free_childcare_eligible: false
is_child: true
is_disabled_for_benefits: true
output:
tax_free_childcare_benefits_amount: 0
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Tests for tax_free_childcare_overall_eligible
- name: All conditions met
period: 2025
input:
tax_free_childcare_child_age_eligible: true
tax_free_childcare_meets_income_requirements: true
tax_free_childcare_program_eligible: true
tax_free_childcare_work_condition: true
output:
tax_free_childcare_eligible: true

- name: Fails age condition only
period: 2025
input:
tax_free_childcare_child_age_eligible: false
tax_free_childcare_meets_income_requirements: true
tax_free_childcare_program_eligible: true
tax_free_childcare_work_condition: true
output:
tax_free_childcare_eligible: false

- name: Fails income condition only
period: 2025
input:
tax_free_childcare_child_age_eligible: true
tax_free_childcare_meets_income_requirements: false
tax_free_childcare_program_eligible: true
tax_free_childcare_work_condition: true
output:
tax_free_childcare_eligible: false

- name: Fails work condition only
period: 2025
input:
tax_free_childcare_child_age_eligible: true
tax_free_childcare_meets_income_requirements: true
tax_free_childcare_program_eligible: true
tax_free_childcare_work_condition: false
output:
tax_free_childcare_eligible: false

- name: Fails all conditions
period: 2025
input:
tax_free_childcare_child_age_eligible: false
tax_free_childcare_meets_income_requirements: false
tax_free_childcare_program_eligible: false
tax_free_childcare_work_condition: false
output:
tax_free_childcare_eligible: false

Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
# Tests for age under 18 bracket (threshold: £1,331 quarterly)
- name: Under threshold for age 15 with low income and no other income sources - ineligible
period: 2025
input:
age: 15
total_income: 5000
private_pension_income: 0
savings_interest_income: 500
dividend_income: 0
property_income: 0
output:
tax_free_childcare_meets_income_requirements: false

# Tests for age 18-20 bracket (threshold: £1,788 quarterly)
- name: Under threshold for age 19 - ineligible
period: 2025
input:
age: 19
total_income: 7000 # £1,750 quarterly
private_pension_income: 0
savings_interest_income: 0
dividend_income: 0
property_income: 0
output:
tax_free_childcare_meets_income_requirements: false

- name: At threshold for age 18 - eligible
period: 2025
input:
age: 18
total_income: 4152
private_pension_income: 0
savings_interest_income: 0
dividend_income: 0
property_income: 0
output:
tax_free_childcare_meets_income_requirements: false

# Tests for age 21+ bracket (threshold: £2,379 quarterly)
- name: Under threshold for age 22 - ineligible
period: 2025
input:
age: 22
total_income: 9000 # £2,250 quarterly
private_pension_income: 0
savings_interest_income: 0
dividend_income: 0
property_income: 0
output:
tax_free_childcare_meets_income_requirements: false

- name: age 18 - eligible
period: 2025
input:
age: 18
total_income: 9516 # £2,379 quarterly
private_pension_income: 0
savings_interest_income: 0
dividend_income: 0
property_income: 0
output:
tax_free_childcare_meets_income_requirements: true

# Tests with investment income
- name: Above threshold but with investment income making eligible income below threshold - ineligible
period: 2025
input:
age: 22
total_income: 12000
private_pension_income: 3000
savings_interest_income: 500
dividend_income: 1000
property_income: 500
# Net eligible income: 7000 (£1,750 quarterly)
output:
tax_free_childcare_meets_income_requirements: false


# Test age boundary cases
- name: over 100k
period: 2025
input:
age: 18
total_income: 217152
adjusted_net_income: 217152
private_pension_income: 0
savings_interest_income: 100
dividend_income: 0
property_income: 0
output:
tax_free_childcare_meets_income_requirements: false
Loading
Loading