Skip to content

Add the Child Tax Credit qualifying young person period after leaving education - #2301

Draft
MaxGhenis wants to merge 23 commits into
mainfrom
ctc-qyp-school-leaver-routes
Draft

MaxGhenis wants to merge 23 commits into
mainfrom
ctc-qyp-school-leaver-routes

Conversation

@MaxGhenis

@MaxGhenis MaxGhenis commented Oct 11, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes #2290

Stacked on #2299, #2387 and #2279. Do not merge before them. This PR builds on #2299's Child Benefit routes (which carry #2387) and #2279's date fact. Until they merge, the diff here also shows their commits. This PR's own change:

git diff origin/cb-qyp-school-leaver-routes origin/ctc-qyp-school-leaver-routes

Summary

is_qualifying_young_person_for_child_tax_credit modelled only the education and training condition (Child Tax Credit Regulations 2002 reg. 5(3)(a) and (ab)). Two rules for a young person who has left education were missing:

Rule Who How the model reads it
Reg. 4 from the 16th birthday until the 31 August that next follows, with no education condition is_before_first_september_following_16th_birthday (from #2279)
Reg. 5(3)(b) under 18, for 20 weeks after leaving, while registered for work or training with a qualifying body new input is_in_child_tax_credit_extension_period, false by default

The second condition (reg. 5(4)) applies to both. A young person who has left education or training and works 24 hours a week or more qualifies through neither.

Against its base (the item 1 branch at 2575e9e, which carries main 4d80b29 and #2279), 2024-25, YAML cases run as plain simulations on both (scratch/probe_C_base_vs_branch.txt):

Case Variable Base This PR
1: parent 40, 16-year-old who has left school young person's is_qualifying_young_person_for_child_tax_credit false true
CTC_child_element £0 £3,455
2: as 1, working 24 hours young person's CTC QYP status false false (reg. 5(4)(a))
young person's Child Benefit QYP status true true
11: 17-year-old in the 20 weeks CTC_child_element £0 £3,455

It changes years up to 2024-25: tax credits ended on 5 April 2025. This is a follow-up from #2279. It needs #2285, which stops a young person who heads their own benefit unit being their own qualifying young person (QYP).

The law

Child Tax Credit Regulations 2002:

  • Reg. 4: "(1) Subject to paragraph (1A), a person who attains the age of sixteen is a qualifying young person from the date on which that person attained that age until 31st August which next follows that date. (1A) A person who attains the age of sixteen on 31st August is a qualifying young person from the date on which that person attained that age. (2) Paragraph (1) is subject to regulation 5 but as if there were no requirement to satisfy the first condition specified in paragraph (3) of that regulation. (2A) Paragraph (1A) is subject to regulation 5."
  • Reg. 5(3)(b): the first condition is also met by a person "under the age of eighteen years and— (i) he ceased to receive full-time education or to undertake approved training (the date of that event being referred to as “the relevant leaving date”); (ii) within 3 months of the relevant leaving date, he has notified the Board [...] that he is registered for work or training with a qualifying body, and (iii) not more than 20 weeks has elapsed since the relevant leaving date."
  • Reg. 5(4): "The second condition is that the period in question is not (and does not include)— (a) a week in which he (having ceased to receive full-time education or approved training) becomes engaged in remunerative work [...] (c) a period in respect of which that person receives income support, income-related employment and support allowance [...], income-based jobseeker's allowance [...] or universal credit".
  • Reg. 2(1): "“remunerative work” means work which is— (a) done for payment or in expectation of payment, (b) undertaken for not less than 24 hours a week [...]".

HMRC's TCTM02220, which the entry-condition variable already cites, says: "There is no requirement for the qualifying young person to satisfy the condition of being in full-time non-advanced education or approved training up to and including 31 August following their 16th birthday. However, during this period, they have to satisfy the other conditions relating to qualifying young people."

Change

is_qualifying_young_person_for_child_tax_credit is now: aged 16 to 19, not receiving benefits in their own right (reg. 5(4)(c)), and any of

  • in education or training begun before 19 (reg. 5(3)(a), (ab), (3A); unchanged);
  • before the 31 August after the 16th birthday (reg. 4), unless the person has ceased full-time education or approved training and is in remunerative work (reg. 4(2) lifts the first condition only; reg. 5(4)(a));
  • under 18, having ceased, not in remunerative work, in the 20 weeks (reg. 5(3)(b), 5(4)(a)).

New: is_in_child_tax_credit_extension_period (input), is_in_remunerative_work_for_child_tax_credit (average weekly hours of 24 or more), and the parameters remunerative_work_hours and extension_period_age_limit.

Having ceased. Reg. 5(4)(a) applies to a person "having ceased to receive full-time education or approved training", so a student's hours do not matter (YAML Case 4). Full-time education at a school or college counts at any level (reg. 5(5)): a 16-year-old in full-time advanced education has not ceased it, so works 24 hours and keeps the reg. 4 period (YAML Case 15), although advanced education fails the first condition. An apprentice's education is received by virtue of their employment and is treated as having ceased (Case 5). The review of this PR found that a first version took failing the non-advanced test as having ceased; the property oracle had the same mistake, and both are fixed.

Not modelled: interruptions (reg. 5(7)); the Working Tax Credit rules reg. 2(1) points to for counting hours.

The annual approximation, and a 16th birthday on 31 August

Reg. 4 reads #2279's date fact: a year counts if it starts (6 April) before the end of the period. That is every 16-year-old (age on 6 October) and a 17-year-old born from 1 September to 6 October.

Reg. 4(1A) gives a 16th birthday on 31 August no period without education. Its effect is to stop the period running to the next year's 31 August. The date fact already ends that person's period in the year of the birthday, so no separate exclusion is needed. That year still counts, as the one in which they are a child until 30 August (YAML Case 8), and the year after does not (Case 7). An exclusion for 31 August birthdays was written and removed: it would have dropped a year in which the person is a child for nearly five months.

Invariants

  1. Reg. 4 against calendar arithmetic that shares no code with the model: a person outside education, not working, is a QYP for a year exactly when they are 16 to 19 on 6 October and some of the year falls on or before the last day they are a child or in the reg. 4 period (30 August for a 16th birthday on 31 August).
  2. Over every combination of age, education, training, apprenticeship, own-right benefits, the age the course began, the two leaver facts and hours: the status is the education condition; or the reg. 4 period, unless the person has ceased education or training and is in remunerative work; or the 20 weeks for a person under 18 who has ceased and is not in remunerative work; within ages 16 to 19 and without own-right benefits. So remunerative work ends both routes for a person who has ceased and never a student's status, an advanced student keeps the reg. 4 period whatever their hours, the 20 weeks end at 18 and never reach a student whose course began at 19, and with the leaver facts off the status is the education condition's alone, as before.
  3. Switching a leaver fact on never removes the status.
  4. The benefit unit's child or QYP is a child or QYP who is not its claimant or partner and not looked after.

Tests

  • Properties, new test_child_tax_credit_school_leaver_routes_properties.py:
    • invariant 1 for every date of birth from 2004 to 2009 (2,192 people, ages 14 to 20 on 6 October 2024), with the 31 August, 1 September and 6/7 October edges asserted, and again on Hypothesis-drawn dates of birth and years;
    • invariants 2 to 4 over 12,288 combinations (the age the course began is drawn too: 17, or a course begun at 19);
    • invariants 2 and 4 on generated benefit units, where a claimant can be a QYP by status.
  • Oracle, test_child_and_adult_definitions_properties.py: Child Tax Credit joins the other three programmes in the 16-year-old route, for a person who has left education.
  • YAML, new child_tax_credit_school_leaver_routes.yaml, 16 cases hand-computed (2024-25; child element £3,455):
Case Facts Expected
1 parent 40, 16-year-old who has left school QYP; one child element, £3,455
2 as 1, working 24 hours not a QYP (reg. 5(4)(a)); Child Benefit still counts them
3 as 1, working 23 hours QYP
4 16 at school, working 24 hours QYP: the bar is for a person "having ceased"
5 16-year-old apprentice, 30 hours not a QYP
6 born 15 September 2007 (17 on 6 October) the period runs to 31 August 2024: QYP
7 born 31 August 2007 no period to the next 31 August: not a QYP
8 born 31 August 2008 a child until 30 August 2024: the year counts
9 16, receiving a benefit in own right not a QYP (reg. 5(4)(c))
10 17, left school not a QYP by default
11 17, in the 20 weeks QYP (reg. 5(3)(b))
12 as 11, working 24 hours not a QYP
13 18, extension input set not a QYP
14 lone 16-year-old who has left school a QYP by status, not their own
15 16, full-time advanced education, 24 hours QYP: reg. 4(2) lifts the first condition, and they have not ceased education (reg. 5(5)); £3,455
16 17, the same student, outside the reg. 4 period not a QYP; £0

Mutation checks, each applied alone in a copy of the branch (YAML cases and property tests that fail):

Mutation YAML cases Property tests
Reg. 4 dropped 1, 3, 6, 8, 14 all four
Reg. 5(3)(b) dropped 11 the grid; the generated units
No remunerative work bar for a leaver 2, 5, 12 the grid; the generated units
Remunerative work bars a student too 4 the grid; the generated units
The 20 weeks without the under-18 limit 13 the grid
Leaver routes open to a student whose course began at 19 none the grid

Round 2 mutations at 33fa9ee (mutation/prC_r2.txt):

Mutation YAML cases Property tests
Failing the non-advanced test counts as having ceased (the round 1 bug) 15 the grid; the generated units
The 20 weeks open to a person who has not ceased none the grid
Remunerative work bars the reg. 4 period for everyone 15 the grid; the generated units

The rows above them were run at earlier heads, before the formula was restructured. The last of those first passed every test. The grid fixed the age the course began at 17, so it never drew a student who fails reg. 5(3A); it now draws a course begun at 19 as well. No YAML case can catch it without setting the 16th-birthday fact by hand for a 19-year-old: with the fact computed from the date of birth, a student who fails the entry condition is 19, the fact is false and the 20 weeks have ended, so the mutated and the real formula agree.

Run locally at 33fa9ee:

The full suites run in CI.

Microsimulation impact

Real runs on Enhanced FRS 2024-25 (uk-data 1.58.0, sha256 5ba399ea5ab9a6c7), one run each for 2024-25 to 2030-31, exact comparison of every record. Base: the item 1 branch at e626d3f (main e01f2f5, #2279, #2387 and #2299), so the figures are this PR's alone. Branch: 33fa9ee. Outputs: impact/prC_r2/.

No household's income changes in any year, and no tax credit award changes. Tax credits ended in April 2025; the model still computes the elements for later years, so they are shown, but no award follows from them.

Reproducer: policyengine_uk/tests/test_child_tax_credit_school_leaver_routes_properties.py::test_status_is_the_first_condition_or_a_leaver_fact_under_the_second

axiom: CTC Regs 2002 reg 4, reg 5(3)(b) and reg 5(4)(a) TheAxiomFoundation/rulespec-uk#361 queued (addendum; blocker stated there: the rows are in an unreleased ingest, axiom-corpus#765, and a billed encoder run needs approval)

🤖 Generated with Claude Code

MaxGhenis and others added 14 commits October 10, 2026 18:09
…ducation condition

UC Regs 2013 reg. 5(1)(a) and SPC Regs 2002 reg. 4A(1)(a) make a person who
has reached 16 a qualifying young person up to the 1 September following
their 16th birthday, whatever their education. The model encoded only the
education route, so a 16-year-old outside education was not a UC or PC
qualifying young person.

is_before_first_september_following_16th_birthday places that date from the
date of birth and counts the route for a year that starts (6 April) before
it: every annual age of 16, and a 17-year-old born from 1 September to 6
October. Both QYP variables OR it with the education route, under the same
age band and own-right benefits exclusion. Tests: YAML cases hand-computed
from the regulations (flags, date edges, UC child element and work
allowance, PC child addition), the property-test oracle, a calendar
differential over every birth date in 2008-2011 and across years, and a
grid test of sufficiency, monotonicity, exclusion and UC/PC agreement.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…eavers

Child Benefit (General) Regulations 2006 regs 4, 5 and 7 were not modelled:
is_qualifying_young_person_for_child_benefit was reg. 3 (education or
training) alone, so a 16-year-old who had left school was not a qualifying
young person for Child Benefit, nor a young person for Housing Benefit, the
legacy benefits or Council Tax Reduction (SSCBA 1992 s.142).

- Reg. 4: until the 31 August after the 16th birthday, read from
  is_before_first_september_following_16th_birthday.
- Reg. 5: the 20-week extension period for a 16- or 17-year-old not in
  remunerative work, from the new input is_in_child_benefit_extension_period.
- Reg. 7: until the terminal date after leaving, from the new input
  is_before_child_benefit_terminal_date.
- Reg. 7(3): no Child Benefit for a young person who qualifies through
  reg. 7 alone and works 24 hours or more a week
  (is_child_benefit_payable_for_person); they stay a qualifying young person.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…vers

Child Tax Credit Regulations 2002 reg. 4 makes a person a qualifying young
person from their 16th birthday until the 31 August that next follows, with
no education condition, and reg. 5(3)(b) adds the 20 weeks after leaving for
an under-18 registered for work or training. The model had only the
education condition (reg. 5(3)(a), (ab)).

- Reg. 4 reads is_before_first_september_following_16th_birthday.
- Reg. 5(3)(b) reads the new input is_in_child_tax_credit_extension_period.
- Reg. 5(4)(a): a young person who has left education or training and works
  24 hours a week or more is not a qualifying young person through either.

Tax credits ended on 5 April 2025, so this changes years to 2024-25.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…school leaver

A disabled 16-year-old outside education is now a young person until the 31 August after their 16th birthday (Child Benefit reg. 4; HB reg 19(1)), so HB reg 28(6) counts them. Keep the original point, that the disability age extension does not itself create young-person status, as a second case with the reg. 4 period ended.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Two property tests build a member who is outside every programme's family
as a 16 to 19 year old not in education. At 16 that member is now a UC
qualifying young person under reg 5(1)(a), so the family's UC gains a child
element and the tests' premise no longer holds. Their generators now set
is_before_first_september_following_16th_birthday false for that member.
The test functions are unchanged, so Hypothesis draws the same examples.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-qyp-school-leaver-routes

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nefit reg. 4 period

test_excluded_member_never_changes_is_eligibility adds a member aged 16 or over who is not in education, on the premise that they are not a qualifying young person. With reg. 4 a 16-year-old who has left education is one until the 31 August after their 16th birthday, so the generator now puts the member past that date, as #2279 does for the same reason in two other property tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-routes

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A mutation that opened the leaver routes to a student who fails the
entry condition (reg. 5(3A)) passed every test: the grid fixed the entry
age at 17. The grid now also draws a course begun at 19, with the date
fact set directly, and asserts that such a student never qualifies.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nto cb-qyp-school-leaver-routes

Brings in #2285's review round 2 head (212db88).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…o ctc-qyp-school-leaver-routes

Brings in #2285's review round 2 head through the item 1 branch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings in main with #2285 and #2288 merged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…outes

Brings in main with #2285 and #2288 merged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis and others added 9 commits October 11, 2026 08:53
…date-of-birth tests

- The route variable's docs now warn that setting it for some people gives
  everyone else false, and point to date_of_birth for placing one person.
  They also state that the rule departs from the 6 October reading that
  is_SP_age uses.
- YAML: a 2025-26 case where the 16-year-old ranks first under the
  two-child limit and the youngest child loses the element (GBP 7,581.72),
  and a case mixing a person with date_of_birth and one without (both in
  the route). The second kills a mutant that reads the raw date_of_birth
  input instead of birth_day.
- means_test_income_members.yaml: the 17-year-old case's name says why they
  are outside the route.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e education

Review round 1 of #2301: the formula took failing the non-advanced
education test as having left education, so a 16-year-old in full-time
advanced education working 24 hours a week lost the reg. 4 period. Reg.
5(4)(a) bars work only for a person "having ceased to receive full-time
education or approved training", and full-time education at a school or
college counts at any level (reg. 5(5)). Reg. 4(2) lifts the first
condition only. The 20 weeks of reg. 5(3)(b) are for a person who has
ceased. The property oracle had the same conflation and is fixed with it;
the grid now draws a course begun at 19, as its comment says. YAML Cases
15 and 16 pin the advanced student.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Fixes #2385. Housing Benefit, Income Support, tax credit and Council Tax
Reduction applicable income counted the family's own children's and young
persons' income, tax, contributions and personal benefits too, an
approximation each formula's comment called a follow-up. The law counts
the claimant's and partner's alone: HB Regs 2006 reg 25(3) and IS Regs
1987 reg 23(2) say in terms that a child's or young person's income is
not the claimant's; the tax credit income regulations (reg 3(1)) and every
Council Tax Reduction scheme count the claimant or applicant and partner
(SSI 2021/249 reg 36(2) says so in terms). The household head who applies
alone for Council Tax Reduction keeps the treatment #2288 gave them.

Tests: new YAML (three cases, each failing on main), a property test that
a dependant's income never changes any of the seven income totals, and
the Scottish CTR young-person tests updated to the rule.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…routes

Brings in #2387 (only the claimant's and partner's income in the legacy
means tests), which this PR needs, and main e01f2f5 with it. The one
conflict, the means-test property docstring, keeps both changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings in #2279's head 9d2fadb.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ent's means tests

Review round 1 of #2299: a young person who qualifies through reg. 7 and
works 24 hours stays a young person, so their earnings must not enter the
parent's Housing Benefit, Income Support or Council Tax Reduction income.
#2387, merged in here, makes that so; Case 11 now has £20,000 of earnings
and asserts the three applicable incomes are nil.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…outes

Brings in #2299's round 1 fixes, #2387 and #2279's head 9d2fadb.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis added a commit that referenced this pull request Oct 12, 2026
…lusion

Brings in #2301 and #2299's round 1 fixes, #2387 and #2279's head. The
one conflict, the CTC QYP docstring, keeps both changes: the ceased-
education wording and the Income Support own-right input.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Child Tax Credit qualifying young person omits the 16-year-old rule and the 20 weeks after leaving (CTC Regs 2002 regs 4 and 5(3)(b))

1 participant