From 38e75315636bffadb891550d57c19defb8b07bfc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mar=C3=ADa=20Juaristi?= <127882282+juaristi22@users.noreply.github.com> Date: Thu, 26 Nov 2026 15:28:08 +0000 Subject: [PATCH] Add Education Maintenance Allowance assessment calculations --- changelog.d/220.added.md | 1 + .../dfe/education-maintenance-allowance.md | 97 +++++++ policyengine_uk/data/fiscal_partition.yaml | 8 + .../assessment_rule_anchor_date.yaml | 12 + .../first_cash_model_year.yaml | 11 + .../fiscal_year_end_month_day.yaml | 11 + .../last_cash_model_year.yaml | 11 + .../supported_academic_year.yaml | 11 + .../bonus_amount.yaml | 11 + .../higher_band_minimum_other_dependants.yaml | 11 + .../maximum_birth_date.yaml | 11 + .../maximum_bonus_count.yaml | 11 + .../maximum_confirmations.yaml | 11 + .../maximum_qualification_level.yaml | 11 + .../maximum_supported_years.yaml | 11 + .../minimum_birth_date.yaml | 11 + .../minimum_college_hours.yaml | 11 + .../multiple_dependants_income_limit.yaml | 11 + .../single_dependant_income_limit.yaml | 11 + .../weekly_amount.yaml | 11 + .../autumn_payment_start_date.yaml | 11 + .../extended_duration_categories.yaml | 11 + .../extended_supported_years.yaml | 11 + .../higher_band_minimum_other_dependants.yaml | 11 + .../income_exempt_categories.yaml | 11 + .../maximum_birth_date.yaml | 11 + .../minimum_birth_date.yaml | 11 + .../minimum_learning_hours.yaml | 11 + .../multiple_dependants_income_limit.yaml | 11 + .../ordinary_supported_years.yaml | 11 + .../single_dependant_income_limit.yaml | 11 + .../weekly_amount.yaml | 11 + .../winter_entry_minimum_birth_date.yaml | 11 + .../winter_payment_start_date.yaml | 11 + .../academic_start_date.yaml | 11 + .../extended_academic_year_window.yaml | 11 + .../extended_birthday.yaml | 11 + .../higher_band_minimum_other_dependants.yaml | 11 + .../income_exempt_categories.yaml | 11 + .../maximum_ordinary_birthday.yaml | 11 + .../maximum_prior_receipt_years.yaml | 11 + .../maximum_qualification_level.yaml | 11 + .../minimum_course_weeks.yaml | 11 + .../minimum_learning_hours.yaml | 11 + .../minimum_ordinary_birthday.yaml | 11 + .../minimum_prior_receipt_years.yaml | 11 + .../multiple_dependants_income_limit.yaml | 11 + .../ordinary_academic_year_window.yaml | 11 + .../single_dependant_income_limit.yaml | 11 + .../weekly_amount.yaml | 11 + policyengine_uk/programs.yaml | 22 ++ .../northern_ireland.yaml | 246 ++++++++++++++++++ .../scotland.yaml | 176 +++++++++++++ .../wales.yaml | 224 ++++++++++++++++ policyengine_uk/tests/test_budget_programs.py | 2 + .../test_education_maintenance_allowance.py | 229 ++++++++++++++++ .../education_maintenance_allowance.py | 59 +++++ .../ema_academic_year.py | 22 ++ .../ema_academic_year_start_date.py | 23 ++ .../ema_age_eligible.py | 47 ++++ .../ema_assessed_income.py | 25 ++ .../ema_assessment_country.py | 22 ++ .../ema_course_duration_weeks.py | 20 ++ .../ema_course_eligible.py | 73 ++++++ .../ema_course_is_full_time.py | 19 ++ .../ema_course_learning_hours.py | 22 ++ .../ema_course_type.py | 29 +++ .../ema_date_of_birth.py | 23 ++ .../ema_duration_eligible.py | 57 ++++ .../ema_extended_duration_category.py | 27 ++ .../ema_financial_category.py | 39 +++ .../ema_flexible_learning_arrangement.py | 21 ++ .../ema_income_eligible.py | 68 +++++ .../ema_income_is_known.py | 21 ++ .../ema_incompatible_course_funding.py | 21 ++ ...a_institution_recommends_twentieth_year.py | 20 ++ .../ema_other_qualifying_dependants.py | 22 ++ .../ema_payable_weeks.py | 24 ++ ...rior_positive_or_negative_confirmations.py | 24 ++ .../ema_prior_supported_academic_years.py | 22 ++ .../ema_provider_approved.py | 21 ++ .../ema_qualification_level.py | 21 ++ .../ema_qualifying_bonus_count.py | 23 ++ .../ema_residency_conditions_met.py | 21 ++ .../ema_school_leaving_academic_year.py | 22 ++ .../ema_scotland_highland_school.py | 21 ++ .../ema_supported_years_in_previous_three.py | 22 ++ .../ema_weekly_award.py | 124 +++++++++ policyengine_uk/variables/gov/gov_spending.py | 1 + .../income/hbai_household_net_income.py | 2 + 90 files changed, 2551 insertions(+) create mode 100644 changelog.d/220.added.md create mode 100644 docs/book/programs/gov/dfe/education-maintenance-allowance.md create mode 100644 policyengine_uk/parameters/gov/dfe/education_maintenance_allowance/assessment_rule_anchor_date.yaml create mode 100644 policyengine_uk/parameters/gov/dfe/education_maintenance_allowance/first_cash_model_year.yaml create mode 100644 policyengine_uk/parameters/gov/dfe/education_maintenance_allowance/fiscal_year_end_month_day.yaml create mode 100644 policyengine_uk/parameters/gov/dfe/education_maintenance_allowance/last_cash_model_year.yaml create mode 100644 policyengine_uk/parameters/gov/dfe/education_maintenance_allowance/supported_academic_year.yaml create mode 100644 policyengine_uk/parameters/gov/northern_ireland/dfe/education_maintenance_allowance/bonus_amount.yaml create mode 100644 policyengine_uk/parameters/gov/northern_ireland/dfe/education_maintenance_allowance/higher_band_minimum_other_dependants.yaml create mode 100644 policyengine_uk/parameters/gov/northern_ireland/dfe/education_maintenance_allowance/maximum_birth_date.yaml create mode 100644 policyengine_uk/parameters/gov/northern_ireland/dfe/education_maintenance_allowance/maximum_bonus_count.yaml create mode 100644 policyengine_uk/parameters/gov/northern_ireland/dfe/education_maintenance_allowance/maximum_confirmations.yaml create mode 100644 policyengine_uk/parameters/gov/northern_ireland/dfe/education_maintenance_allowance/maximum_qualification_level.yaml create mode 100644 policyengine_uk/parameters/gov/northern_ireland/dfe/education_maintenance_allowance/maximum_supported_years.yaml create mode 100644 policyengine_uk/parameters/gov/northern_ireland/dfe/education_maintenance_allowance/minimum_birth_date.yaml create mode 100644 policyengine_uk/parameters/gov/northern_ireland/dfe/education_maintenance_allowance/minimum_college_hours.yaml create mode 100644 policyengine_uk/parameters/gov/northern_ireland/dfe/education_maintenance_allowance/multiple_dependants_income_limit.yaml create mode 100644 policyengine_uk/parameters/gov/northern_ireland/dfe/education_maintenance_allowance/single_dependant_income_limit.yaml create mode 100644 policyengine_uk/parameters/gov/northern_ireland/dfe/education_maintenance_allowance/weekly_amount.yaml create mode 100644 policyengine_uk/parameters/gov/scottish_government/education_maintenance_allowance/autumn_payment_start_date.yaml create mode 100644 policyengine_uk/parameters/gov/scottish_government/education_maintenance_allowance/extended_duration_categories.yaml create mode 100644 policyengine_uk/parameters/gov/scottish_government/education_maintenance_allowance/extended_supported_years.yaml create mode 100644 policyengine_uk/parameters/gov/scottish_government/education_maintenance_allowance/higher_band_minimum_other_dependants.yaml create mode 100644 policyengine_uk/parameters/gov/scottish_government/education_maintenance_allowance/income_exempt_categories.yaml create mode 100644 policyengine_uk/parameters/gov/scottish_government/education_maintenance_allowance/maximum_birth_date.yaml create mode 100644 policyengine_uk/parameters/gov/scottish_government/education_maintenance_allowance/minimum_birth_date.yaml create mode 100644 policyengine_uk/parameters/gov/scottish_government/education_maintenance_allowance/minimum_learning_hours.yaml create mode 100644 policyengine_uk/parameters/gov/scottish_government/education_maintenance_allowance/multiple_dependants_income_limit.yaml create mode 100644 policyengine_uk/parameters/gov/scottish_government/education_maintenance_allowance/ordinary_supported_years.yaml create mode 100644 policyengine_uk/parameters/gov/scottish_government/education_maintenance_allowance/single_dependant_income_limit.yaml create mode 100644 policyengine_uk/parameters/gov/scottish_government/education_maintenance_allowance/weekly_amount.yaml create mode 100644 policyengine_uk/parameters/gov/scottish_government/education_maintenance_allowance/winter_entry_minimum_birth_date.yaml create mode 100644 policyengine_uk/parameters/gov/scottish_government/education_maintenance_allowance/winter_payment_start_date.yaml create mode 100644 policyengine_uk/parameters/gov/welsh_government/education_maintenance_allowance/academic_start_date.yaml create mode 100644 policyengine_uk/parameters/gov/welsh_government/education_maintenance_allowance/extended_academic_year_window.yaml create mode 100644 policyengine_uk/parameters/gov/welsh_government/education_maintenance_allowance/extended_birthday.yaml create mode 100644 policyengine_uk/parameters/gov/welsh_government/education_maintenance_allowance/higher_band_minimum_other_dependants.yaml create mode 100644 policyengine_uk/parameters/gov/welsh_government/education_maintenance_allowance/income_exempt_categories.yaml create mode 100644 policyengine_uk/parameters/gov/welsh_government/education_maintenance_allowance/maximum_ordinary_birthday.yaml create mode 100644 policyengine_uk/parameters/gov/welsh_government/education_maintenance_allowance/maximum_prior_receipt_years.yaml create mode 100644 policyengine_uk/parameters/gov/welsh_government/education_maintenance_allowance/maximum_qualification_level.yaml create mode 100644 policyengine_uk/parameters/gov/welsh_government/education_maintenance_allowance/minimum_course_weeks.yaml create mode 100644 policyengine_uk/parameters/gov/welsh_government/education_maintenance_allowance/minimum_learning_hours.yaml create mode 100644 policyengine_uk/parameters/gov/welsh_government/education_maintenance_allowance/minimum_ordinary_birthday.yaml create mode 100644 policyengine_uk/parameters/gov/welsh_government/education_maintenance_allowance/minimum_prior_receipt_years.yaml create mode 100644 policyengine_uk/parameters/gov/welsh_government/education_maintenance_allowance/multiple_dependants_income_limit.yaml create mode 100644 policyengine_uk/parameters/gov/welsh_government/education_maintenance_allowance/ordinary_academic_year_window.yaml create mode 100644 policyengine_uk/parameters/gov/welsh_government/education_maintenance_allowance/single_dependant_income_limit.yaml create mode 100644 policyengine_uk/parameters/gov/welsh_government/education_maintenance_allowance/weekly_amount.yaml create mode 100644 policyengine_uk/tests/policy/baseline/gov/dfe/education_maintenance_allowance/northern_ireland.yaml create mode 100644 policyengine_uk/tests/policy/baseline/gov/dfe/education_maintenance_allowance/scotland.yaml create mode 100644 policyengine_uk/tests/policy/baseline/gov/dfe/education_maintenance_allowance/wales.yaml create mode 100644 policyengine_uk/tests/test_education_maintenance_allowance.py create mode 100644 policyengine_uk/variables/gov/dfe/education_maintenance_allowance/education_maintenance_allowance.py create mode 100644 policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_academic_year.py create mode 100644 policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_academic_year_start_date.py create mode 100644 policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_age_eligible.py create mode 100644 policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_assessed_income.py create mode 100644 policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_assessment_country.py create mode 100644 policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_course_duration_weeks.py create mode 100644 policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_course_eligible.py create mode 100644 policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_course_is_full_time.py create mode 100644 policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_course_learning_hours.py create mode 100644 policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_course_type.py create mode 100644 policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_date_of_birth.py create mode 100644 policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_duration_eligible.py create mode 100644 policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_extended_duration_category.py create mode 100644 policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_financial_category.py create mode 100644 policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_flexible_learning_arrangement.py create mode 100644 policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_income_eligible.py create mode 100644 policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_income_is_known.py create mode 100644 policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_incompatible_course_funding.py create mode 100644 policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_institution_recommends_twentieth_year.py create mode 100644 policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_other_qualifying_dependants.py create mode 100644 policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_payable_weeks.py create mode 100644 policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_prior_positive_or_negative_confirmations.py create mode 100644 policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_prior_supported_academic_years.py create mode 100644 policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_provider_approved.py create mode 100644 policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_qualification_level.py create mode 100644 policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_qualifying_bonus_count.py create mode 100644 policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_residency_conditions_met.py create mode 100644 policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_school_leaving_academic_year.py create mode 100644 policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_scotland_highland_school.py create mode 100644 policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_supported_years_in_previous_three.py create mode 100644 policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_weekly_award.py diff --git a/changelog.d/220.added.md b/changelog.d/220.added.md new file mode 100644 index 0000000000..493327a1f4 --- /dev/null +++ b/changelog.d/220.added.md @@ -0,0 +1 @@ +Added a source-bound 2026/27 EMA assessment and actual-period cash calculation for Wales, Northern Ireland and Highland schools, preserving legacy reported inputs and distinguishing HBAI education-grant income. diff --git a/docs/book/programs/gov/dfe/education-maintenance-allowance.md b/docs/book/programs/gov/dfe/education-maintenance-allowance.md new file mode 100644 index 0000000000..47fbd66423 --- /dev/null +++ b/docs/book/programs/gov/dfe/education-maintenance-allowance.md @@ -0,0 +1,97 @@ +# Education Maintenance Allowance + +PolicyEngine computes one explicit 2026/27 Education Maintenance Allowance (EMA) +assessment for Wales and Northern Ireland, and the Highland school route in +Scotland. Other Scottish councils, college, home-education and action-plan +routes are unsupported. The weekly financial award is `ema_weekly_award`; +`education_maintenance_allowance` is the sole annual cash output. + +## Assessment facts + +Supply `ema_assessment_country`, `ema_academic_year` and an actual +`ema_date_of_birth` in YYYYMMDD format. Current fiscal-year age or imputed +education does not establish a cohort. For Wales an actual earlier institution +academic start can be supplied as `ema_academic_year_start_date`; zero uses the +ordinary 1 September anchor. The Highland selector +`ema_scotland_highland_school` is required and defaults false. + +Supply the source-defined assessment group income in `ema_assessed_income` +and set `ema_income_is_known` only when established. Verified zero differs +from missing income. Wales and NI normally assess 2024/25; Highland normally +assesses 2025/26. A lawfully accepted reassessment can be represented in a +separate calculation, not by automatically taking the lower of historical and +current household income. The residual/assessed total is supplied; this module +does not reconstruct its tax-base deductions or impute a supporting family. +`ema_other_qualifying_dependants` excludes the applicant and uses each scheme's +own definition, not generic household size. + +`ema_financial_category` records a source-bound assessment fact. Wales's +specified exemptions and Highland's current-care/own-qualifying-benefit +exemptions differ. A Scottish care leaver is not automatically in current care; +Wales's care-leaver route requires its statutory history. NI independence, +including Income Support, income-related ESA or Universal Credit, does not +remove its income test. Detailed nationality/residence determination is supplied +through `ema_residency_conditions_met`, not inferred from country alone. + +The course inputs identify actual type, provider approval, full-time mode, +weekly learning hours, qualification level, duration and incompatible funding. +Wales applies its full-time 12-hour and academic/vocational 10-week conditions; +approved Preparation for Life and Work is a separate route. NI requires a +full-time school or at least 15 guided college hours. Highland school normally +requires 21 guided hours; a documented `ema_flexible_learning_arrangement` can +waive ordinary hours/mode, not provider/school/scope conditions. + +Wales uses the elapsed window from `ema_school_leaving_academic_year`, with +its separate 20th-birthday receipt-history and institution-advice route. +Highland normally funds 3 academic years or 4 for source-defined vulnerable/young +carer categories. NI's 3-year limit is distinct from its 117 positive **or +negative** confirmation limit. Unknown necessary historical counts use -1, +not an invented zero history. + +## Actual period cash + +Allocate actual lawfully payable weeks of this assessment to the exact requested +model/fiscal year as `ema_payable_weeks`. They must already respect agreement, +authorised absence, progress, holidays, acceptance/backdating, reassessment and +payment timing. No annual 52-week, 42-week or automatic monthly award is assumed. +A prior-year allocation is not a new payment. NI additionally uses +`ema_prior_positive_or_negative_confirmations` before the block; current +negative weeks and positives after exhaustion must already be excluded from +payable weeks. Counts cannot reconstruct their within-block order. + +`ema_qualifying_bonus_count` supplies actual institution-qualified NI bonuses +for that cash year, including objectives, signatures and payment-window facts. +January/June alone do not earn a bonus. The model bounds a period's count, but +the caller must not allocate the same earned bonus twice across years. +Fiscal 2026 includes January–March 2027, so the Highland winter cohort is not +excluded merely because its first payment starts 4 January 2027. + +Only model cash years 2026 and 2027 are supported for this academic assessment. +Two overlapping academic assessments require separate calculations and +aggregation, or the normal explicit final-cash override. This is not an +automatic monthly, academic-history or fiscal-receipt ledger. Wales's printed +application deadline discrepancy is not silently adjudicated; actual accepted +weeks are supplied facts. + +## Income integration and limits + +Canonical cash enters household benefit-income accounting, government spending +and its fiscal head once. HBAI net income includes it as an **education grant**; +`hbai_benefits` remains unchanged because state support is a separate category +in [DWP's income definition](https://www.gov.uk/government/statistics/households-below-average-income-for-financial-years-ending-1995-to-2022/households-below-average-income-series-quality-and-methodology-information-report-fye-2022#income-definition). +The weekly assessment is never added as cash. Generic benefit-uprating reforms +retain the normal registry treatment, consistent with other student cash terms. + +Existing `adult_ema`, `child_ema`, `student_payments` and the Welsh childcare +consumer are unchanged. New explicit cash must be disjoint from legacy EMA, +`education_grants`, miscellaneous income and transfer residuals. No producer +mapping, automatic clearing/reclassification or population imputation is claimed. +The detailed residency decision, administrative acceptance and actual payment +schedule remain factual inputs; they are not a blanket whole-EMA eligibility +flag. + +## Sources + +- [Wales EMA Scheme 2026/2027](https://www.gov.wales/sites/default/files/publications/2026-04/the-education-maintenance-allowance-wales-scheme-2026-2027.pdf). +- [Highland school EMA guidance, current 2026/27 content](https://www.highland.gov.uk/downloads/file/962/ema-guidance-notes-2025-26). The URL filename retains an older year; the inspected document heading is 2026/27. +- [NI application notes 2026/27](https://www.nidirect.gov.uk/sites/default/files/2026-06/ema-ni-application-notes-2627-e-o-PDF_0.pdf) and [current NI EMA rules](https://www.nidirect.gov.uk/articles/education-maintenance-allowance-explained). NI's published birthday window is retained literally, not advanced to another calendar. diff --git a/policyengine_uk/data/fiscal_partition.yaml b/policyengine_uk/data/fiscal_partition.yaml index 1ff0ccbda9..bdeef3e541 100644 --- a/policyengine_uk/data/fiscal_partition.yaml +++ b/policyengine_uk/data/fiscal_partition.yaml @@ -1340,3 +1340,11 @@ spending_heads: sign: any zero_at_baseline: expected caseload: false + - id: education_maintenance_allowance + label: Education Maintenance Allowance + variable: education_maintenance_allowance + entity: person + report_group: childcare_and_education + totals: [gov_spending, household_benefits] + sign: nonnegative + zero_at_baseline: expected diff --git a/policyengine_uk/parameters/gov/dfe/education_maintenance_allowance/assessment_rule_anchor_date.yaml b/policyengine_uk/parameters/gov/dfe/education_maintenance_allowance/assessment_rule_anchor_date.yaml new file mode 100644 index 0000000000..78a9dbdaa4 --- /dev/null +++ b/policyengine_uk/parameters/gov/dfe/education_maintenance_allowance/assessment_rule_anchor_date.yaml @@ -0,0 +1,12 @@ +description: The explicit EMA assessment selects the fixed 2026/27 source-cohort rules at this lookup anchor, independently of the requested cash period. +values: + # A model lookup constant, not statutory scheme commencement or cash eligibility. + 0001-01-01: 20260901 +metadata: + label: EMA fixed-cohort rule lookup date + unit: date + period: year + preserve_calendar_dates: true + reference: + - title: Education Maintenance Allowance Wales Scheme 2026/2027, paragraph 1 + href: https://www.gov.wales/sites/default/files/publications/2026-04/the-education-maintenance-allowance-wales-scheme-2026-2027.pdf#page=1 diff --git a/policyengine_uk/parameters/gov/dfe/education_maintenance_allowance/first_cash_model_year.yaml b/policyengine_uk/parameters/gov/dfe/education_maintenance_allowance/first_cash_model_year.yaml new file mode 100644 index 0000000000..12102ccc9d --- /dev/null +++ b/policyengine_uk/parameters/gov/dfe/education_maintenance_allowance/first_cash_model_year.yaml @@ -0,0 +1,11 @@ +description: The supported 2026/27 Education Maintenance Allowance assessment uses this first cash model year. +values: + 2026-09-01: 2026 +metadata: + label: EMA first cash model year + unit: year + period: year + preserve_calendar_dates: true + reference: + - title: "Education Maintenance Allowance Wales Scheme 2026/2027, operative assessment rules #page 5-11" + href: https://www.gov.wales/sites/default/files/publications/2026-04/the-education-maintenance-allowance-wales-scheme-2026-2027.pdf#page=5 diff --git a/policyengine_uk/parameters/gov/dfe/education_maintenance_allowance/fiscal_year_end_month_day.yaml b/policyengine_uk/parameters/gov/dfe/education_maintenance_allowance/fiscal_year_end_month_day.yaml new file mode 100644 index 0000000000..1f6dac1b83 --- /dev/null +++ b/policyengine_uk/parameters/gov/dfe/education_maintenance_allowance/fiscal_year_end_month_day.yaml @@ -0,0 +1,11 @@ +description: The supported 2026/27 Education Maintenance Allowance assessment uses this fiscal year end month day. +values: + 2026-09-01: 405 +metadata: + label: EMA fiscal year end month day + unit: date + period: year + preserve_calendar_dates: true + reference: + - title: "Education Maintenance Allowance Wales Scheme 2026/2027, operative assessment rules #page 5-11" + href: https://www.gov.wales/sites/default/files/publications/2026-04/the-education-maintenance-allowance-wales-scheme-2026-2027.pdf#page=5 diff --git a/policyengine_uk/parameters/gov/dfe/education_maintenance_allowance/last_cash_model_year.yaml b/policyengine_uk/parameters/gov/dfe/education_maintenance_allowance/last_cash_model_year.yaml new file mode 100644 index 0000000000..056da94eb9 --- /dev/null +++ b/policyengine_uk/parameters/gov/dfe/education_maintenance_allowance/last_cash_model_year.yaml @@ -0,0 +1,11 @@ +description: The supported 2026/27 Education Maintenance Allowance assessment uses this last cash model year. +values: + 2026-09-01: 2027 +metadata: + label: EMA last cash model year + unit: year + period: year + preserve_calendar_dates: true + reference: + - title: "Education Maintenance Allowance Wales Scheme 2026/2027, operative assessment rules #page 5-11" + href: https://www.gov.wales/sites/default/files/publications/2026-04/the-education-maintenance-allowance-wales-scheme-2026-2027.pdf#page=5 diff --git a/policyengine_uk/parameters/gov/dfe/education_maintenance_allowance/supported_academic_year.yaml b/policyengine_uk/parameters/gov/dfe/education_maintenance_allowance/supported_academic_year.yaml new file mode 100644 index 0000000000..79511c55aa --- /dev/null +++ b/policyengine_uk/parameters/gov/dfe/education_maintenance_allowance/supported_academic_year.yaml @@ -0,0 +1,11 @@ +description: The supported 2026/27 Education Maintenance Allowance assessment uses this supported academic year. +values: + 2026-09-01: 2026 +metadata: + label: EMA supported academic year + unit: year + period: year + preserve_calendar_dates: true + reference: + - title: "Education Maintenance Allowance Wales Scheme 2026/2027, operative assessment rules #page 5-11" + href: https://www.gov.wales/sites/default/files/publications/2026-04/the-education-maintenance-allowance-wales-scheme-2026-2027.pdf#page=5 diff --git a/policyengine_uk/parameters/gov/northern_ireland/dfe/education_maintenance_allowance/bonus_amount.yaml b/policyengine_uk/parameters/gov/northern_ireland/dfe/education_maintenance_allowance/bonus_amount.yaml new file mode 100644 index 0000000000..81edc947eb --- /dev/null +++ b/policyengine_uk/parameters/gov/northern_ireland/dfe/education_maintenance_allowance/bonus_amount.yaml @@ -0,0 +1,11 @@ +description: The supported 2026/27 Education Maintenance Allowance assessment uses this bonus amount. +values: + 2026-09-01: 100 +metadata: + label: EMA bonus amount + unit: currency-GBP + period: year + preserve_calendar_dates: true + reference: + - title: "Northern Ireland current EMA payment and confirmation rules" + href: https://www.nidirect.gov.uk/articles/education-maintenance-allowance-explained diff --git a/policyengine_uk/parameters/gov/northern_ireland/dfe/education_maintenance_allowance/higher_band_minimum_other_dependants.yaml b/policyengine_uk/parameters/gov/northern_ireland/dfe/education_maintenance_allowance/higher_band_minimum_other_dependants.yaml new file mode 100644 index 0000000000..0e17aaf032 --- /dev/null +++ b/policyengine_uk/parameters/gov/northern_ireland/dfe/education_maintenance_allowance/higher_band_minimum_other_dependants.yaml @@ -0,0 +1,11 @@ +description: The supported 2026/27 Education Maintenance Allowance assessment uses this higher band minimum other dependants. +values: + 2026-09-01: 1 +metadata: + label: EMA higher band minimum other dependants + unit: person + period: year + preserve_calendar_dates: true + reference: + - title: "Northern Ireland EMA2026/27 application notes, assessment rules #page 2,6,20-23" + href: https://www.nidirect.gov.uk/sites/default/files/2026-06/ema-ni-application-notes-2627-e-o-PDF_0.pdf#page=2 diff --git a/policyengine_uk/parameters/gov/northern_ireland/dfe/education_maintenance_allowance/maximum_birth_date.yaml b/policyengine_uk/parameters/gov/northern_ireland/dfe/education_maintenance_allowance/maximum_birth_date.yaml new file mode 100644 index 0000000000..7e6c244450 --- /dev/null +++ b/policyengine_uk/parameters/gov/northern_ireland/dfe/education_maintenance_allowance/maximum_birth_date.yaml @@ -0,0 +1,11 @@ +description: The supported 2026/27 Education Maintenance Allowance assessment uses this maximum birth date. +values: + 2026-09-01: 20100701 +metadata: + label: EMA maximum birth date + unit: date + period: year + preserve_calendar_dates: true + reference: + - title: "Northern Ireland EMA2026/27 application notes, assessment rules #page 2,6,20-23" + href: https://www.nidirect.gov.uk/sites/default/files/2026-06/ema-ni-application-notes-2627-e-o-PDF_0.pdf#page=2 diff --git a/policyengine_uk/parameters/gov/northern_ireland/dfe/education_maintenance_allowance/maximum_bonus_count.yaml b/policyengine_uk/parameters/gov/northern_ireland/dfe/education_maintenance_allowance/maximum_bonus_count.yaml new file mode 100644 index 0000000000..052d6663ec --- /dev/null +++ b/policyengine_uk/parameters/gov/northern_ireland/dfe/education_maintenance_allowance/maximum_bonus_count.yaml @@ -0,0 +1,11 @@ +description: The supported 2026/27 Education Maintenance Allowance assessment uses this maximum bonus count. +values: + 2026-09-01: 2 +metadata: + label: EMA maximum bonus count + unit: person + period: year + preserve_calendar_dates: true + reference: + - title: "Northern Ireland current EMA payment and confirmation rules" + href: https://www.nidirect.gov.uk/articles/education-maintenance-allowance-explained diff --git a/policyengine_uk/parameters/gov/northern_ireland/dfe/education_maintenance_allowance/maximum_confirmations.yaml b/policyengine_uk/parameters/gov/northern_ireland/dfe/education_maintenance_allowance/maximum_confirmations.yaml new file mode 100644 index 0000000000..e2a6113f05 --- /dev/null +++ b/policyengine_uk/parameters/gov/northern_ireland/dfe/education_maintenance_allowance/maximum_confirmations.yaml @@ -0,0 +1,11 @@ +description: The supported 2026/27 Education Maintenance Allowance assessment uses this maximum confirmations. +values: + 2026-09-01: 117 +metadata: + label: EMA maximum confirmations + unit: week + period: year + preserve_calendar_dates: true + reference: + - title: "Northern Ireland current EMA payment and confirmation rules" + href: https://www.nidirect.gov.uk/articles/education-maintenance-allowance-explained diff --git a/policyengine_uk/parameters/gov/northern_ireland/dfe/education_maintenance_allowance/maximum_qualification_level.yaml b/policyengine_uk/parameters/gov/northern_ireland/dfe/education_maintenance_allowance/maximum_qualification_level.yaml new file mode 100644 index 0000000000..82e5b6ceb2 --- /dev/null +++ b/policyengine_uk/parameters/gov/northern_ireland/dfe/education_maintenance_allowance/maximum_qualification_level.yaml @@ -0,0 +1,11 @@ +description: The supported 2026/27 Education Maintenance Allowance assessment uses this maximum qualification level. +values: + 2026-09-01: 3 +metadata: + label: EMA maximum qualification level + unit: /1 + period: year + preserve_calendar_dates: true + reference: + - title: "Northern Ireland EMA2026/27 application notes, assessment rules #page 2,6,20-23" + href: https://www.nidirect.gov.uk/sites/default/files/2026-06/ema-ni-application-notes-2627-e-o-PDF_0.pdf#page=2 diff --git a/policyengine_uk/parameters/gov/northern_ireland/dfe/education_maintenance_allowance/maximum_supported_years.yaml b/policyengine_uk/parameters/gov/northern_ireland/dfe/education_maintenance_allowance/maximum_supported_years.yaml new file mode 100644 index 0000000000..30a86cd8ce --- /dev/null +++ b/policyengine_uk/parameters/gov/northern_ireland/dfe/education_maintenance_allowance/maximum_supported_years.yaml @@ -0,0 +1,11 @@ +description: The supported 2026/27 Education Maintenance Allowance assessment uses this maximum supported years. +values: + 2026-09-01: 3 +metadata: + label: EMA maximum supported years + unit: year + period: year + preserve_calendar_dates: true + reference: + - title: "Northern Ireland current EMA payment and confirmation rules" + href: https://www.nidirect.gov.uk/articles/education-maintenance-allowance-explained diff --git a/policyengine_uk/parameters/gov/northern_ireland/dfe/education_maintenance_allowance/minimum_birth_date.yaml b/policyengine_uk/parameters/gov/northern_ireland/dfe/education_maintenance_allowance/minimum_birth_date.yaml new file mode 100644 index 0000000000..112304f9a7 --- /dev/null +++ b/policyengine_uk/parameters/gov/northern_ireland/dfe/education_maintenance_allowance/minimum_birth_date.yaml @@ -0,0 +1,11 @@ +description: The supported 2026/27 Education Maintenance Allowance assessment uses this minimum birth date. +values: + 2026-09-01: 20060702 +metadata: + label: EMA minimum birth date + unit: date + period: year + preserve_calendar_dates: true + reference: + - title: "Northern Ireland EMA2026/27 application notes, assessment rules #page 2,6,20-23" + href: https://www.nidirect.gov.uk/sites/default/files/2026-06/ema-ni-application-notes-2627-e-o-PDF_0.pdf#page=2 diff --git a/policyengine_uk/parameters/gov/northern_ireland/dfe/education_maintenance_allowance/minimum_college_hours.yaml b/policyengine_uk/parameters/gov/northern_ireland/dfe/education_maintenance_allowance/minimum_college_hours.yaml new file mode 100644 index 0000000000..ba62aeacb6 --- /dev/null +++ b/policyengine_uk/parameters/gov/northern_ireland/dfe/education_maintenance_allowance/minimum_college_hours.yaml @@ -0,0 +1,11 @@ +description: The supported 2026/27 Education Maintenance Allowance assessment uses this minimum college hours. +values: + 2026-09-01: 15 +metadata: + label: EMA minimum college hours + unit: hour + period: year + preserve_calendar_dates: true + reference: + - title: "Northern Ireland EMA2026/27 application notes, assessment rules #page 2,6,20-23" + href: https://www.nidirect.gov.uk/sites/default/files/2026-06/ema-ni-application-notes-2627-e-o-PDF_0.pdf#page=2 diff --git a/policyengine_uk/parameters/gov/northern_ireland/dfe/education_maintenance_allowance/multiple_dependants_income_limit.yaml b/policyengine_uk/parameters/gov/northern_ireland/dfe/education_maintenance_allowance/multiple_dependants_income_limit.yaml new file mode 100644 index 0000000000..b9c8604c9c --- /dev/null +++ b/policyengine_uk/parameters/gov/northern_ireland/dfe/education_maintenance_allowance/multiple_dependants_income_limit.yaml @@ -0,0 +1,11 @@ +description: The supported 2026/27 Education Maintenance Allowance assessment uses this multiple dependants income limit. +values: + 2026-09-01: 22500 +metadata: + label: EMA multiple dependants income limit + unit: currency-GBP + period: year + preserve_calendar_dates: true + reference: + - title: "Northern Ireland EMA2026/27 application notes, assessment rules #page 2,6,20-23" + href: https://www.nidirect.gov.uk/sites/default/files/2026-06/ema-ni-application-notes-2627-e-o-PDF_0.pdf#page=2 diff --git a/policyengine_uk/parameters/gov/northern_ireland/dfe/education_maintenance_allowance/single_dependant_income_limit.yaml b/policyengine_uk/parameters/gov/northern_ireland/dfe/education_maintenance_allowance/single_dependant_income_limit.yaml new file mode 100644 index 0000000000..4b156d1d55 --- /dev/null +++ b/policyengine_uk/parameters/gov/northern_ireland/dfe/education_maintenance_allowance/single_dependant_income_limit.yaml @@ -0,0 +1,11 @@ +description: The supported 2026/27 Education Maintenance Allowance assessment uses this single dependant income limit. +values: + 2026-09-01: 20500 +metadata: + label: EMA single dependant income limit + unit: currency-GBP + period: year + preserve_calendar_dates: true + reference: + - title: "Northern Ireland EMA2026/27 application notes, assessment rules #page 2,6,20-23" + href: https://www.nidirect.gov.uk/sites/default/files/2026-06/ema-ni-application-notes-2627-e-o-PDF_0.pdf#page=2 diff --git a/policyengine_uk/parameters/gov/northern_ireland/dfe/education_maintenance_allowance/weekly_amount.yaml b/policyengine_uk/parameters/gov/northern_ireland/dfe/education_maintenance_allowance/weekly_amount.yaml new file mode 100644 index 0000000000..0c99b6a722 --- /dev/null +++ b/policyengine_uk/parameters/gov/northern_ireland/dfe/education_maintenance_allowance/weekly_amount.yaml @@ -0,0 +1,11 @@ +description: The supported 2026/27 Education Maintenance Allowance assessment uses this weekly amount. +values: + 2026-09-01: 30 +metadata: + label: EMA weekly amount + unit: currency-GBP + period: year + preserve_calendar_dates: true + reference: + - title: "Northern Ireland EMA2026/27 application notes, assessment rules #page 2,6,20-23" + href: https://www.nidirect.gov.uk/sites/default/files/2026-06/ema-ni-application-notes-2627-e-o-PDF_0.pdf#page=2 diff --git a/policyengine_uk/parameters/gov/scottish_government/education_maintenance_allowance/autumn_payment_start_date.yaml b/policyengine_uk/parameters/gov/scottish_government/education_maintenance_allowance/autumn_payment_start_date.yaml new file mode 100644 index 0000000000..94ae91313d --- /dev/null +++ b/policyengine_uk/parameters/gov/scottish_government/education_maintenance_allowance/autumn_payment_start_date.yaml @@ -0,0 +1,11 @@ +description: The supported 2026/27 Education Maintenance Allowance assessment uses this autumn payment start date. +values: + 2026-08-17: 20260817 +metadata: + label: EMA autumn payment start date + unit: date + period: year + preserve_calendar_dates: true + reference: + - title: "Highland Council school EMA guidance2026/27, source-bound assessment rules #page 2-3,7-9" + href: https://www.highland.gov.uk/downloads/file/962/ema-guidance-notes-2025-26#page=2 diff --git a/policyengine_uk/parameters/gov/scottish_government/education_maintenance_allowance/extended_duration_categories.yaml b/policyengine_uk/parameters/gov/scottish_government/education_maintenance_allowance/extended_duration_categories.yaml new file mode 100644 index 0000000000..0029f55135 --- /dev/null +++ b/policyengine_uk/parameters/gov/scottish_government/education_maintenance_allowance/extended_duration_categories.yaml @@ -0,0 +1,11 @@ +description: The supported 2026/27 Education Maintenance Allowance assessment uses this extended duration categories. +values: + 2026-08-17: ["VULNERABLE", "YOUNG_CARER"] +metadata: + label: EMA extended duration categories + unit: list + period: year + preserve_calendar_dates: true + reference: + - title: "Highland Council school EMA guidance2026/27, source-bound assessment rules #page 2-3,7-9" + href: https://www.highland.gov.uk/downloads/file/962/ema-guidance-notes-2025-26#page=2 diff --git a/policyengine_uk/parameters/gov/scottish_government/education_maintenance_allowance/extended_supported_years.yaml b/policyengine_uk/parameters/gov/scottish_government/education_maintenance_allowance/extended_supported_years.yaml new file mode 100644 index 0000000000..734066f67f --- /dev/null +++ b/policyengine_uk/parameters/gov/scottish_government/education_maintenance_allowance/extended_supported_years.yaml @@ -0,0 +1,11 @@ +description: The supported 2026/27 Education Maintenance Allowance assessment uses this extended supported years. +values: + 2026-08-17: 4 +metadata: + label: EMA extended supported years + unit: year + period: year + preserve_calendar_dates: true + reference: + - title: "Highland Council school EMA guidance2026/27, source-bound assessment rules #page 2-3,7-9" + href: https://www.highland.gov.uk/downloads/file/962/ema-guidance-notes-2025-26#page=2 diff --git a/policyengine_uk/parameters/gov/scottish_government/education_maintenance_allowance/higher_band_minimum_other_dependants.yaml b/policyengine_uk/parameters/gov/scottish_government/education_maintenance_allowance/higher_band_minimum_other_dependants.yaml new file mode 100644 index 0000000000..44451fccc9 --- /dev/null +++ b/policyengine_uk/parameters/gov/scottish_government/education_maintenance_allowance/higher_band_minimum_other_dependants.yaml @@ -0,0 +1,11 @@ +description: The supported 2026/27 Education Maintenance Allowance assessment uses this higher band minimum other dependants. +values: + 2026-08-17: 1 +metadata: + label: EMA higher band minimum other dependants + unit: person + period: year + preserve_calendar_dates: true + reference: + - title: "Highland Council school EMA guidance2026/27, source-bound assessment rules #page 2-3,7-9" + href: https://www.highland.gov.uk/downloads/file/962/ema-guidance-notes-2025-26#page=2 diff --git a/policyengine_uk/parameters/gov/scottish_government/education_maintenance_allowance/income_exempt_categories.yaml b/policyengine_uk/parameters/gov/scottish_government/education_maintenance_allowance/income_exempt_categories.yaml new file mode 100644 index 0000000000..c70aaa8547 --- /dev/null +++ b/policyengine_uk/parameters/gov/scottish_government/education_maintenance_allowance/income_exempt_categories.yaml @@ -0,0 +1,11 @@ +description: The supported 2026/27 Education Maintenance Allowance assessment uses this income exempt categories. +values: + 2026-08-17: ["IN_LOCAL_AUTHORITY_CARE", "INCOME_SUPPORT", "CONTRIBUTION_BASED_ESA", "UNIVERSAL_CREDIT"] +metadata: + label: EMA income exempt categories + unit: list + period: year + preserve_calendar_dates: true + reference: + - title: "Highland Council school EMA guidance2026/27, source-bound assessment rules #page 2-3,7-9" + href: https://www.highland.gov.uk/downloads/file/962/ema-guidance-notes-2025-26#page=2 diff --git a/policyengine_uk/parameters/gov/scottish_government/education_maintenance_allowance/maximum_birth_date.yaml b/policyengine_uk/parameters/gov/scottish_government/education_maintenance_allowance/maximum_birth_date.yaml new file mode 100644 index 0000000000..3216ccbb1a --- /dev/null +++ b/policyengine_uk/parameters/gov/scottish_government/education_maintenance_allowance/maximum_birth_date.yaml @@ -0,0 +1,11 @@ +description: The supported 2026/27 Education Maintenance Allowance assessment uses this maximum birth date. +values: + 2026-08-17: 20110228 +metadata: + label: EMA maximum birth date + unit: date + period: year + preserve_calendar_dates: true + reference: + - title: "Highland Council school EMA guidance2026/27, source-bound assessment rules #page 2-3,7-9" + href: https://www.highland.gov.uk/downloads/file/962/ema-guidance-notes-2025-26#page=2 diff --git a/policyengine_uk/parameters/gov/scottish_government/education_maintenance_allowance/minimum_birth_date.yaml b/policyengine_uk/parameters/gov/scottish_government/education_maintenance_allowance/minimum_birth_date.yaml new file mode 100644 index 0000000000..3b712291ed --- /dev/null +++ b/policyengine_uk/parameters/gov/scottish_government/education_maintenance_allowance/minimum_birth_date.yaml @@ -0,0 +1,11 @@ +description: The supported 2026/27 Education Maintenance Allowance assessment uses this minimum birth date. +values: + 2026-08-17: 20070301 +metadata: + label: EMA minimum birth date + unit: date + period: year + preserve_calendar_dates: true + reference: + - title: "Highland Council school EMA guidance2026/27, source-bound assessment rules #page 2-3,7-9" + href: https://www.highland.gov.uk/downloads/file/962/ema-guidance-notes-2025-26#page=2 diff --git a/policyengine_uk/parameters/gov/scottish_government/education_maintenance_allowance/minimum_learning_hours.yaml b/policyengine_uk/parameters/gov/scottish_government/education_maintenance_allowance/minimum_learning_hours.yaml new file mode 100644 index 0000000000..7049c218ad --- /dev/null +++ b/policyengine_uk/parameters/gov/scottish_government/education_maintenance_allowance/minimum_learning_hours.yaml @@ -0,0 +1,11 @@ +description: The supported 2026/27 Education Maintenance Allowance assessment uses this minimum learning hours. +values: + 2026-08-17: 21 +metadata: + label: EMA minimum learning hours + unit: hour + period: year + preserve_calendar_dates: true + reference: + - title: "Highland Council school EMA guidance2026/27, source-bound assessment rules #page 2-3,7-9" + href: https://www.highland.gov.uk/downloads/file/962/ema-guidance-notes-2025-26#page=2 diff --git a/policyengine_uk/parameters/gov/scottish_government/education_maintenance_allowance/multiple_dependants_income_limit.yaml b/policyengine_uk/parameters/gov/scottish_government/education_maintenance_allowance/multiple_dependants_income_limit.yaml new file mode 100644 index 0000000000..e91cc1d286 --- /dev/null +++ b/policyengine_uk/parameters/gov/scottish_government/education_maintenance_allowance/multiple_dependants_income_limit.yaml @@ -0,0 +1,11 @@ +description: The supported 2026/27 Education Maintenance Allowance assessment uses this multiple dependants income limit. +values: + 2026-08-17: 26884 +metadata: + label: EMA multiple dependants income limit + unit: currency-GBP + period: year + preserve_calendar_dates: true + reference: + - title: "Highland Council school EMA guidance2026/27, source-bound assessment rules #page 2-3,7-9" + href: https://www.highland.gov.uk/downloads/file/962/ema-guidance-notes-2025-26#page=2 diff --git a/policyengine_uk/parameters/gov/scottish_government/education_maintenance_allowance/ordinary_supported_years.yaml b/policyengine_uk/parameters/gov/scottish_government/education_maintenance_allowance/ordinary_supported_years.yaml new file mode 100644 index 0000000000..73a0acb20a --- /dev/null +++ b/policyengine_uk/parameters/gov/scottish_government/education_maintenance_allowance/ordinary_supported_years.yaml @@ -0,0 +1,11 @@ +description: The supported 2026/27 Education Maintenance Allowance assessment uses this ordinary supported years. +values: + 2026-08-17: 3 +metadata: + label: EMA ordinary supported years + unit: year + period: year + preserve_calendar_dates: true + reference: + - title: "Highland Council school EMA guidance2026/27, source-bound assessment rules #page 2-3,7-9" + href: https://www.highland.gov.uk/downloads/file/962/ema-guidance-notes-2025-26#page=2 diff --git a/policyengine_uk/parameters/gov/scottish_government/education_maintenance_allowance/single_dependant_income_limit.yaml b/policyengine_uk/parameters/gov/scottish_government/education_maintenance_allowance/single_dependant_income_limit.yaml new file mode 100644 index 0000000000..07aee114b1 --- /dev/null +++ b/policyengine_uk/parameters/gov/scottish_government/education_maintenance_allowance/single_dependant_income_limit.yaml @@ -0,0 +1,11 @@ +description: The supported 2026/27 Education Maintenance Allowance assessment uses this single dependant income limit. +values: + 2026-08-17: 24421 +metadata: + label: EMA single dependant income limit + unit: currency-GBP + period: year + preserve_calendar_dates: true + reference: + - title: "Highland Council school EMA guidance2026/27, source-bound assessment rules #page 2-3,7-9" + href: https://www.highland.gov.uk/downloads/file/962/ema-guidance-notes-2025-26#page=2 diff --git a/policyengine_uk/parameters/gov/scottish_government/education_maintenance_allowance/weekly_amount.yaml b/policyengine_uk/parameters/gov/scottish_government/education_maintenance_allowance/weekly_amount.yaml new file mode 100644 index 0000000000..af8e425b10 --- /dev/null +++ b/policyengine_uk/parameters/gov/scottish_government/education_maintenance_allowance/weekly_amount.yaml @@ -0,0 +1,11 @@ +description: The supported 2026/27 Education Maintenance Allowance assessment uses this weekly amount. +values: + 2026-08-17: 30 +metadata: + label: EMA weekly amount + unit: currency-GBP + period: year + preserve_calendar_dates: true + reference: + - title: "Highland Council school EMA guidance2026/27, source-bound assessment rules #page 2-3,7-9" + href: https://www.highland.gov.uk/downloads/file/962/ema-guidance-notes-2025-26#page=2 diff --git a/policyengine_uk/parameters/gov/scottish_government/education_maintenance_allowance/winter_entry_minimum_birth_date.yaml b/policyengine_uk/parameters/gov/scottish_government/education_maintenance_allowance/winter_entry_minimum_birth_date.yaml new file mode 100644 index 0000000000..bf82b95c0f --- /dev/null +++ b/policyengine_uk/parameters/gov/scottish_government/education_maintenance_allowance/winter_entry_minimum_birth_date.yaml @@ -0,0 +1,11 @@ +description: The supported 2026/27 Education Maintenance Allowance assessment uses this winter entry minimum birth date. +values: + 2026-08-17: 20101001 +metadata: + label: EMA winter entry minimum birth date + unit: date + period: year + preserve_calendar_dates: true + reference: + - title: "Highland Council school EMA guidance2026/27, source-bound assessment rules #page 2-3,7-9" + href: https://www.highland.gov.uk/downloads/file/962/ema-guidance-notes-2025-26#page=2 diff --git a/policyengine_uk/parameters/gov/scottish_government/education_maintenance_allowance/winter_payment_start_date.yaml b/policyengine_uk/parameters/gov/scottish_government/education_maintenance_allowance/winter_payment_start_date.yaml new file mode 100644 index 0000000000..fe24c28b47 --- /dev/null +++ b/policyengine_uk/parameters/gov/scottish_government/education_maintenance_allowance/winter_payment_start_date.yaml @@ -0,0 +1,11 @@ +description: The supported 2026/27 Education Maintenance Allowance assessment uses this winter payment start date. +values: + 2026-08-17: 20270104 +metadata: + label: EMA winter payment start date + unit: date + period: year + preserve_calendar_dates: true + reference: + - title: "Highland Council school EMA guidance2026/27, source-bound assessment rules #page 2-3,7-9" + href: https://www.highland.gov.uk/downloads/file/962/ema-guidance-notes-2025-26#page=2 diff --git a/policyengine_uk/parameters/gov/welsh_government/education_maintenance_allowance/academic_start_date.yaml b/policyengine_uk/parameters/gov/welsh_government/education_maintenance_allowance/academic_start_date.yaml new file mode 100644 index 0000000000..f7100d1bfb --- /dev/null +++ b/policyengine_uk/parameters/gov/welsh_government/education_maintenance_allowance/academic_start_date.yaml @@ -0,0 +1,11 @@ +description: The supported 2026/27 Education Maintenance Allowance assessment uses this academic start date. +values: + 2026-09-01: 20260901 +metadata: + label: EMA academic start date + unit: date + period: year + preserve_calendar_dates: true + reference: + - title: "Education Maintenance Allowance Wales Scheme 2026/2027, operative assessment rules #page 5-11" + href: https://www.gov.wales/sites/default/files/publications/2026-04/the-education-maintenance-allowance-wales-scheme-2026-2027.pdf#page=5 diff --git a/policyengine_uk/parameters/gov/welsh_government/education_maintenance_allowance/extended_academic_year_window.yaml b/policyengine_uk/parameters/gov/welsh_government/education_maintenance_allowance/extended_academic_year_window.yaml new file mode 100644 index 0000000000..e9226203fb --- /dev/null +++ b/policyengine_uk/parameters/gov/welsh_government/education_maintenance_allowance/extended_academic_year_window.yaml @@ -0,0 +1,11 @@ +description: The supported 2026/27 Education Maintenance Allowance assessment uses this extended academic year window. +values: + 2026-09-01: 4 +metadata: + label: EMA extended academic year window + unit: year + period: year + preserve_calendar_dates: true + reference: + - title: "Education Maintenance Allowance Wales Scheme 2026/2027, operative assessment rules #page 5-11" + href: https://www.gov.wales/sites/default/files/publications/2026-04/the-education-maintenance-allowance-wales-scheme-2026-2027.pdf#page=5 diff --git a/policyengine_uk/parameters/gov/welsh_government/education_maintenance_allowance/extended_birthday.yaml b/policyengine_uk/parameters/gov/welsh_government/education_maintenance_allowance/extended_birthday.yaml new file mode 100644 index 0000000000..c76d16f9b6 --- /dev/null +++ b/policyengine_uk/parameters/gov/welsh_government/education_maintenance_allowance/extended_birthday.yaml @@ -0,0 +1,11 @@ +description: The supported 2026/27 Education Maintenance Allowance assessment uses this extended birthday. +values: + 2026-09-01: 20 +metadata: + label: EMA extended birthday + unit: year + period: year + preserve_calendar_dates: true + reference: + - title: "Education Maintenance Allowance Wales Scheme 2026/2027, operative assessment rules #page 5-11" + href: https://www.gov.wales/sites/default/files/publications/2026-04/the-education-maintenance-allowance-wales-scheme-2026-2027.pdf#page=5 diff --git a/policyengine_uk/parameters/gov/welsh_government/education_maintenance_allowance/higher_band_minimum_other_dependants.yaml b/policyengine_uk/parameters/gov/welsh_government/education_maintenance_allowance/higher_band_minimum_other_dependants.yaml new file mode 100644 index 0000000000..7cc2f67908 --- /dev/null +++ b/policyengine_uk/parameters/gov/welsh_government/education_maintenance_allowance/higher_band_minimum_other_dependants.yaml @@ -0,0 +1,11 @@ +description: The supported 2026/27 Education Maintenance Allowance assessment uses this higher band minimum other dependants. +values: + 2026-09-01: 1 +metadata: + label: EMA higher band minimum other dependants + unit: person + period: year + preserve_calendar_dates: true + reference: + - title: "Education Maintenance Allowance Wales Scheme 2026/2027, operative assessment rules #page 5-11" + href: https://www.gov.wales/sites/default/files/publications/2026-04/the-education-maintenance-allowance-wales-scheme-2026-2027.pdf#page=5 diff --git a/policyengine_uk/parameters/gov/welsh_government/education_maintenance_allowance/income_exempt_categories.yaml b/policyengine_uk/parameters/gov/welsh_government/education_maintenance_allowance/income_exempt_categories.yaml new file mode 100644 index 0000000000..29a72f1191 --- /dev/null +++ b/policyengine_uk/parameters/gov/welsh_government/education_maintenance_allowance/income_exempt_categories.yaml @@ -0,0 +1,11 @@ +description: The supported 2026/27 Education Maintenance Allowance assessment uses this income exempt categories. +values: + 2026-09-01: ["IN_LOCAL_AUTHORITY_CARE", "WALES_CARE_LEAVER", "RESPONSIBLE_FOR_OWN_CHILD", "INCOME_SUPPORT", "INCOME_RELATED_ESA", "UNIVERSAL_CREDIT", "YOUTH_JUSTICE"] +metadata: + label: EMA income exempt categories + unit: list + period: year + preserve_calendar_dates: true + reference: + - title: "Education Maintenance Allowance Wales Scheme 2026/2027, operative assessment rules #page 5-11" + href: https://www.gov.wales/sites/default/files/publications/2026-04/the-education-maintenance-allowance-wales-scheme-2026-2027.pdf#page=5 diff --git a/policyengine_uk/parameters/gov/welsh_government/education_maintenance_allowance/maximum_ordinary_birthday.yaml b/policyengine_uk/parameters/gov/welsh_government/education_maintenance_allowance/maximum_ordinary_birthday.yaml new file mode 100644 index 0000000000..4e096f0dae --- /dev/null +++ b/policyengine_uk/parameters/gov/welsh_government/education_maintenance_allowance/maximum_ordinary_birthday.yaml @@ -0,0 +1,11 @@ +description: The supported 2026/27 Education Maintenance Allowance assessment uses this maximum ordinary birthday. +values: + 2026-09-01: 19 +metadata: + label: EMA maximum ordinary birthday + unit: year + period: year + preserve_calendar_dates: true + reference: + - title: "Education Maintenance Allowance Wales Scheme 2026/2027, operative assessment rules #page 5-11" + href: https://www.gov.wales/sites/default/files/publications/2026-04/the-education-maintenance-allowance-wales-scheme-2026-2027.pdf#page=5 diff --git a/policyengine_uk/parameters/gov/welsh_government/education_maintenance_allowance/maximum_prior_receipt_years.yaml b/policyengine_uk/parameters/gov/welsh_government/education_maintenance_allowance/maximum_prior_receipt_years.yaml new file mode 100644 index 0000000000..03be94908f --- /dev/null +++ b/policyengine_uk/parameters/gov/welsh_government/education_maintenance_allowance/maximum_prior_receipt_years.yaml @@ -0,0 +1,11 @@ +description: The supported 2026/27 Education Maintenance Allowance assessment uses this maximum prior receipt years. +values: + 2026-09-01: 2 +metadata: + label: EMA maximum prior receipt years + unit: year + period: year + preserve_calendar_dates: true + reference: + - title: "Education Maintenance Allowance Wales Scheme 2026/2027, operative assessment rules #page 5-11" + href: https://www.gov.wales/sites/default/files/publications/2026-04/the-education-maintenance-allowance-wales-scheme-2026-2027.pdf#page=5 diff --git a/policyengine_uk/parameters/gov/welsh_government/education_maintenance_allowance/maximum_qualification_level.yaml b/policyengine_uk/parameters/gov/welsh_government/education_maintenance_allowance/maximum_qualification_level.yaml new file mode 100644 index 0000000000..3778e066b6 --- /dev/null +++ b/policyengine_uk/parameters/gov/welsh_government/education_maintenance_allowance/maximum_qualification_level.yaml @@ -0,0 +1,11 @@ +description: The supported 2026/27 Education Maintenance Allowance assessment uses this maximum qualification level. +values: + 2026-09-01: 3 +metadata: + label: EMA maximum qualification level + unit: /1 + period: year + preserve_calendar_dates: true + reference: + - title: "Education Maintenance Allowance Wales Scheme 2026/2027, operative assessment rules #page 5-11" + href: https://www.gov.wales/sites/default/files/publications/2026-04/the-education-maintenance-allowance-wales-scheme-2026-2027.pdf#page=5 diff --git a/policyengine_uk/parameters/gov/welsh_government/education_maintenance_allowance/minimum_course_weeks.yaml b/policyengine_uk/parameters/gov/welsh_government/education_maintenance_allowance/minimum_course_weeks.yaml new file mode 100644 index 0000000000..dbc2eafc55 --- /dev/null +++ b/policyengine_uk/parameters/gov/welsh_government/education_maintenance_allowance/minimum_course_weeks.yaml @@ -0,0 +1,11 @@ +description: The supported 2026/27 Education Maintenance Allowance assessment uses this minimum course weeks. +values: + 2026-09-01: 10 +metadata: + label: EMA minimum course weeks + unit: week + period: year + preserve_calendar_dates: true + reference: + - title: "Education Maintenance Allowance Wales Scheme 2026/2027, operative assessment rules #page 5-11" + href: https://www.gov.wales/sites/default/files/publications/2026-04/the-education-maintenance-allowance-wales-scheme-2026-2027.pdf#page=5 diff --git a/policyengine_uk/parameters/gov/welsh_government/education_maintenance_allowance/minimum_learning_hours.yaml b/policyengine_uk/parameters/gov/welsh_government/education_maintenance_allowance/minimum_learning_hours.yaml new file mode 100644 index 0000000000..52fa6106fe --- /dev/null +++ b/policyengine_uk/parameters/gov/welsh_government/education_maintenance_allowance/minimum_learning_hours.yaml @@ -0,0 +1,11 @@ +description: The supported 2026/27 Education Maintenance Allowance assessment uses this minimum learning hours. +values: + 2026-09-01: 12 +metadata: + label: EMA minimum learning hours + unit: hour + period: year + preserve_calendar_dates: true + reference: + - title: "Education Maintenance Allowance Wales Scheme 2026/2027, operative assessment rules #page 5-11" + href: https://www.gov.wales/sites/default/files/publications/2026-04/the-education-maintenance-allowance-wales-scheme-2026-2027.pdf#page=5 diff --git a/policyengine_uk/parameters/gov/welsh_government/education_maintenance_allowance/minimum_ordinary_birthday.yaml b/policyengine_uk/parameters/gov/welsh_government/education_maintenance_allowance/minimum_ordinary_birthday.yaml new file mode 100644 index 0000000000..6ed031dc36 --- /dev/null +++ b/policyengine_uk/parameters/gov/welsh_government/education_maintenance_allowance/minimum_ordinary_birthday.yaml @@ -0,0 +1,11 @@ +description: The supported 2026/27 Education Maintenance Allowance assessment uses this minimum ordinary birthday. +values: + 2026-09-01: 17 +metadata: + label: EMA minimum ordinary birthday + unit: year + period: year + preserve_calendar_dates: true + reference: + - title: "Education Maintenance Allowance Wales Scheme 2026/2027, operative assessment rules #page 5-11" + href: https://www.gov.wales/sites/default/files/publications/2026-04/the-education-maintenance-allowance-wales-scheme-2026-2027.pdf#page=5 diff --git a/policyengine_uk/parameters/gov/welsh_government/education_maintenance_allowance/minimum_prior_receipt_years.yaml b/policyengine_uk/parameters/gov/welsh_government/education_maintenance_allowance/minimum_prior_receipt_years.yaml new file mode 100644 index 0000000000..2e7441a8b8 --- /dev/null +++ b/policyengine_uk/parameters/gov/welsh_government/education_maintenance_allowance/minimum_prior_receipt_years.yaml @@ -0,0 +1,11 @@ +description: The supported 2026/27 Education Maintenance Allowance assessment uses this minimum prior receipt years. +values: + 2026-09-01: 1 +metadata: + label: EMA minimum prior receipt years + unit: year + period: year + preserve_calendar_dates: true + reference: + - title: "Education Maintenance Allowance Wales Scheme 2026/2027, operative assessment rules #page 5-11" + href: https://www.gov.wales/sites/default/files/publications/2026-04/the-education-maintenance-allowance-wales-scheme-2026-2027.pdf#page=5 diff --git a/policyengine_uk/parameters/gov/welsh_government/education_maintenance_allowance/multiple_dependants_income_limit.yaml b/policyengine_uk/parameters/gov/welsh_government/education_maintenance_allowance/multiple_dependants_income_limit.yaml new file mode 100644 index 0000000000..5e0e73f27b --- /dev/null +++ b/policyengine_uk/parameters/gov/welsh_government/education_maintenance_allowance/multiple_dependants_income_limit.yaml @@ -0,0 +1,11 @@ +description: The supported 2026/27 Education Maintenance Allowance assessment uses this multiple dependants income limit. +values: + 2026-09-01: 27273 +metadata: + label: EMA multiple dependants income limit + unit: currency-GBP + period: year + preserve_calendar_dates: true + reference: + - title: "Education Maintenance Allowance Wales Scheme 2026/2027, operative assessment rules #page 5-11" + href: https://www.gov.wales/sites/default/files/publications/2026-04/the-education-maintenance-allowance-wales-scheme-2026-2027.pdf#page=5 diff --git a/policyengine_uk/parameters/gov/welsh_government/education_maintenance_allowance/ordinary_academic_year_window.yaml b/policyengine_uk/parameters/gov/welsh_government/education_maintenance_allowance/ordinary_academic_year_window.yaml new file mode 100644 index 0000000000..b8ad3eec6e --- /dev/null +++ b/policyengine_uk/parameters/gov/welsh_government/education_maintenance_allowance/ordinary_academic_year_window.yaml @@ -0,0 +1,11 @@ +description: The supported 2026/27 Education Maintenance Allowance assessment uses this ordinary academic year window. +values: + 2026-09-01: 3 +metadata: + label: EMA ordinary academic year window + unit: year + period: year + preserve_calendar_dates: true + reference: + - title: "Education Maintenance Allowance Wales Scheme 2026/2027, operative assessment rules #page 5-11" + href: https://www.gov.wales/sites/default/files/publications/2026-04/the-education-maintenance-allowance-wales-scheme-2026-2027.pdf#page=5 diff --git a/policyengine_uk/parameters/gov/welsh_government/education_maintenance_allowance/single_dependant_income_limit.yaml b/policyengine_uk/parameters/gov/welsh_government/education_maintenance_allowance/single_dependant_income_limit.yaml new file mode 100644 index 0000000000..54423d16fc --- /dev/null +++ b/policyengine_uk/parameters/gov/welsh_government/education_maintenance_allowance/single_dependant_income_limit.yaml @@ -0,0 +1,11 @@ +description: The supported 2026/27 Education Maintenance Allowance assessment uses this single dependant income limit. +values: + 2026-09-01: 24570 +metadata: + label: EMA single dependant income limit + unit: currency-GBP + period: year + preserve_calendar_dates: true + reference: + - title: "Education Maintenance Allowance Wales Scheme 2026/2027, operative assessment rules #page 5-11" + href: https://www.gov.wales/sites/default/files/publications/2026-04/the-education-maintenance-allowance-wales-scheme-2026-2027.pdf#page=5 diff --git a/policyengine_uk/parameters/gov/welsh_government/education_maintenance_allowance/weekly_amount.yaml b/policyengine_uk/parameters/gov/welsh_government/education_maintenance_allowance/weekly_amount.yaml new file mode 100644 index 0000000000..43d63b3348 --- /dev/null +++ b/policyengine_uk/parameters/gov/welsh_government/education_maintenance_allowance/weekly_amount.yaml @@ -0,0 +1,11 @@ +description: The supported 2026/27 Education Maintenance Allowance assessment uses this weekly amount. +values: + 2026-09-01: 40 +metadata: + label: EMA weekly amount + unit: currency-GBP + period: year + preserve_calendar_dates: true + reference: + - title: "Education Maintenance Allowance Wales Scheme 2026/2027, operative assessment rules #page 5-11" + href: https://www.gov.wales/sites/default/files/publications/2026-04/the-education-maintenance-allowance-wales-scheme-2026-2027.pdf#page=5 diff --git a/policyengine_uk/programs.yaml b/policyengine_uk/programs.yaml index c80b24cbd1..eb25565763 100644 --- a/policyengine_uk/programs.yaml +++ b/policyengine_uk/programs.yaml @@ -489,6 +489,27 @@ programs: budget: benefit verified_start_year: 2022 + - id: education_maintenance_allowance + name: Education Maintenance Allowance + full_name: Education Maintenance Allowance + category: Education + agency: Devolved education administrations + status: partial + coverage: Wales and Northern Ireland; Highland school route in Scotland + variable: education_maintenance_allowance + budget: benefit + parameter_prefix: gov.dfe.education_maintenance_allowance + verified_start_year: 2026 + verified_end_year: 2027 + notes: >- + One explicit 2026/27 academic assessment from supplied DOB, source-defined + assessed income and course, residency and history facts. Weekly financial + award is separate from actual qualifying weeks and NI bonuses allocated + to the exact model cash year. Scotland is Highland schools only; other + Scottish councils, colleges, home and action-plan routes are unsupported. + Legacy child_ema/adult_ema and producer mappings are unchanged. No automatic + multi-academic-year, monthly, immigration or application-history ledger. + # --- DfE programs --- - id: universal_childcare_entitlement name: Universal childcare entitlement (15h) @@ -1227,3 +1248,4 @@ budget_order: - carer_support_payment - scottish_carer_supplement - disability_basic_income + - education_maintenance_allowance diff --git a/policyengine_uk/tests/policy/baseline/gov/dfe/education_maintenance_allowance/northern_ireland.yaml b/policyengine_uk/tests/policy/baseline/gov/dfe/education_maintenance_allowance/northern_ireland.yaml new file mode 100644 index 0000000000..7af190c435 --- /dev/null +++ b/policyengine_uk/tests/policy/baseline/gov/dfe/education_maintenance_allowance/northern_ireland.yaml @@ -0,0 +1,246 @@ +# Independent oracles: NI application notes 2026/27, pages 2 and 4-24; +# Little Book pages 1-4; payment guide page 1. Prior confirmations include negatives. +- name: "Case 1, Northern Ireland income ceilings are inclusive and another qualifying young person raises the limit." + period: 2026 + absolute_error_margin: 0.01 + input: + ema_academic_year: [2026, 2026, 2026, 2026] + ema_date_of_birth: [20090401, 20090401, 20090401, 20090401] + ema_residency_conditions_met: [true, true, true, true] + ema_financial_category: ["DEPENDENT", "DEPENDENT", "DEPENDENT", "DEPENDENT"] + ema_assessed_income: [20500, 20500.01, 22500, 22500.01] + ema_income_is_known: [true, true, true, true] + ema_other_qualifying_dependants: [0, 0, 1, 1] + ema_course_type: ["FURTHER_EDUCATION", "FURTHER_EDUCATION", "FURTHER_EDUCATION", "FURTHER_EDUCATION"] + ema_provider_approved: [true, true, true, true] + ema_course_is_full_time: [false, false, false, false] + ema_course_learning_hours: [15, 15, 15, 15] + ema_course_duration_weeks: [40, 40, 40, 40] + ema_qualification_level: [2, 2, 2, 2] + ema_payable_weeks: [2, 2, 2, 2] + ema_assessment_country: ["NORTHERN_IRELAND", "NORTHERN_IRELAND", "NORTHERN_IRELAND", "NORTHERN_IRELAND"] + ema_prior_supported_academic_years: [0, 0, 0, 0] + ema_prior_positive_or_negative_confirmations: [0, 0, 0, 0] + output: + ema_weekly_award: [30, 0, 30, 0] + +- name: "Case 2, Northern Ireland uses the actual published July birthday window." + period: 2026 + absolute_error_margin: 0.01 + input: + ema_academic_year: [2026, 2026, 2026, 2026, 2026] + ema_date_of_birth: [20060702, 20060701, 20100701, 20100702, 0] + ema_residency_conditions_met: [true, true, true, true, true] + ema_financial_category: ["DEPENDENT", "DEPENDENT", "DEPENDENT", "DEPENDENT", "DEPENDENT"] + ema_assessed_income: [0, 0, 0, 0, 0] + ema_income_is_known: [true, true, true, true, true] + ema_other_qualifying_dependants: [0, 0, 0, 0, 0] + ema_course_type: ["FURTHER_EDUCATION", "FURTHER_EDUCATION", "FURTHER_EDUCATION", "FURTHER_EDUCATION", "FURTHER_EDUCATION"] + ema_provider_approved: [true, true, true, true, true] + ema_course_is_full_time: [false, false, false, false, false] + ema_course_learning_hours: [15, 15, 15, 15, 15] + ema_course_duration_weeks: [40, 40, 40, 40, 40] + ema_qualification_level: [2, 2, 2, 2, 2] + ema_payable_weeks: [2, 2, 2, 2, 2] + ema_assessment_country: ["NORTHERN_IRELAND", "NORTHERN_IRELAND", "NORTHERN_IRELAND", "NORTHERN_IRELAND", "NORTHERN_IRELAND"] + ema_prior_supported_academic_years: [0, 0, 0, 0, 0] + ema_prior_positive_or_negative_confirmations: [0, 0, 0, 0, 0] + output: + ema_weekly_award: [30, 0, 30, 0, 0] + +- name: "Case 3, Northern Ireland allows full-time school or a college course of at least fifteen hours." + period: 2026 + absolute_error_margin: 0.01 + input: + ema_academic_year: [2026, 2026, 2026, 2026, 2026, 2026] + ema_date_of_birth: [20090401, 20090401, 20090401, 20090401, 20090401, 20090401] + ema_residency_conditions_met: [true, true, true, true, true, true] + ema_financial_category: ["DEPENDENT", "DEPENDENT", "DEPENDENT", "DEPENDENT", "DEPENDENT", "DEPENDENT"] + ema_assessed_income: [0, 0, 0, 0, 0, 0] + ema_income_is_known: [true, true, true, true, true, true] + ema_other_qualifying_dependants: [0, 0, 0, 0, 0, 0] + ema_course_type: ["FURTHER_EDUCATION", "FURTHER_EDUCATION", "SCHOOL", "SCHOOL", "FURTHER_EDUCATION", "FURTHER_EDUCATION"] + ema_provider_approved: [true, true, true, true, true, true] + ema_course_is_full_time: [false, true, true, false, true, true] + ema_course_learning_hours: [15, 14.99, 14, 15, 15, 15] + ema_course_duration_weeks: [40, 40, 40, 40, 40, 40] + ema_qualification_level: [3, 3, 3, 3, 4, 3] + ema_payable_weeks: [2, 2, 2, 2, 2, 2] + ema_assessment_country: ["NORTHERN_IRELAND", "NORTHERN_IRELAND", "NORTHERN_IRELAND", "NORTHERN_IRELAND", "NORTHERN_IRELAND", "NORTHERN_IRELAND"] + ema_prior_supported_academic_years: [0, 0, 0, 0, 0, 0] + ema_prior_positive_or_negative_confirmations: [0, 0, 0, 0, 0, 0] + ema_incompatible_course_funding: [false, false, false, false, false, true] + output: + ema_weekly_award: [30, 0, 30, 0, 0, 0] + +- name: "Case 4, Northern Ireland support does not exceed three academic years or assume unknown history." + period: 2026 + absolute_error_margin: 0.01 + input: + ema_academic_year: [2026, 2026, 2026, 2026, 2026] + ema_date_of_birth: [20090401, 20090401, 20090401, 20090401, 20090401] + ema_residency_conditions_met: [true, true, true, true, true] + ema_financial_category: ["DEPENDENT", "DEPENDENT", "DEPENDENT", "DEPENDENT", "DEPENDENT"] + ema_assessed_income: [0, 0, 0, 0, 0] + ema_income_is_known: [true, true, true, true, true] + ema_other_qualifying_dependants: [0, 0, 0, 0, 0] + ema_course_type: ["FURTHER_EDUCATION", "FURTHER_EDUCATION", "FURTHER_EDUCATION", "FURTHER_EDUCATION", "FURTHER_EDUCATION"] + ema_provider_approved: [true, true, true, true, true] + ema_course_is_full_time: [false, false, false, false, false] + ema_course_learning_hours: [15, 15, 15, 15, 15] + ema_course_duration_weeks: [40, 40, 40, 40, 40] + ema_qualification_level: [2, 2, 2, 2, 2] + ema_payable_weeks: [2, 2, 2, 2, 2] + ema_assessment_country: ["NORTHERN_IRELAND", "NORTHERN_IRELAND", "NORTHERN_IRELAND", "NORTHERN_IRELAND", "NORTHERN_IRELAND"] + ema_prior_supported_academic_years: [0, 1, 2, 3, -1] + ema_prior_positive_or_negative_confirmations: [0, 0, 0, 0, 0] + output: + ema_weekly_award: [30, 30, 30, 0, 0] + +- name: "Case 5, Northern Ireland independence does not exempt the assessed income test." + period: 2026 + absolute_error_margin: 0.01 + input: + ema_academic_year: [2026, 2026, 2026, 2026, 2026, 2026] + ema_date_of_birth: [20090401, 20090401, 20090401, 20090401, 20090401, 20090401] + ema_residency_conditions_met: [true, true, true, true, true, true] + ema_financial_category: ["INDEPENDENT", "IN_LOCAL_AUTHORITY_CARE", "RESPONSIBLE_FOR_OWN_CHILD", "INCOME_SUPPORT", "INCOME_RELATED_ESA", "UNIVERSAL_CREDIT"] + ema_assessed_income: [30000, 30000, 30000, 30000, 30000, 30000] + ema_income_is_known: [true, true, true, true, true, true] + ema_other_qualifying_dependants: [0, 0, 0, 0, 0, 0] + ema_course_type: ["FURTHER_EDUCATION", "FURTHER_EDUCATION", "FURTHER_EDUCATION", "FURTHER_EDUCATION", "FURTHER_EDUCATION", "FURTHER_EDUCATION"] + ema_provider_approved: [true, true, true, true, true, true] + ema_course_is_full_time: [false, false, false, false, false, false] + ema_course_learning_hours: [15, 15, 15, 15, 15, 15] + ema_course_duration_weeks: [40, 40, 40, 40, 40, 40] + ema_qualification_level: [2, 2, 2, 2, 2, 2] + ema_payable_weeks: [2, 2, 2, 2, 2, 2] + ema_assessment_country: ["NORTHERN_IRELAND", "NORTHERN_IRELAND", "NORTHERN_IRELAND", "NORTHERN_IRELAND", "NORTHERN_IRELAND", "NORTHERN_IRELAND"] + ema_prior_supported_academic_years: [0, 0, 0, 0, 0, 0] + ema_prior_positive_or_negative_confirmations: [0, 0, 0, 0, 0, 0] + output: + ema_weekly_award: [0, 0, 0, 0, 0, 0] + +- name: "Case 6, Northern Ireland independently assessed zero income must be known." + period: 2026 + absolute_error_margin: 0.01 + input: + ema_academic_year: [2026, 2026] + ema_date_of_birth: [20090401, 20090401] + ema_residency_conditions_met: [true, true] + ema_financial_category: ["INDEPENDENT", "INDEPENDENT"] + ema_assessed_income: [0, 0] + ema_income_is_known: [true, false] + ema_other_qualifying_dependants: [0, 0] + ema_course_type: ["FURTHER_EDUCATION", "FURTHER_EDUCATION"] + ema_provider_approved: [true, true] + ema_course_is_full_time: [false, false] + ema_course_learning_hours: [15, 15] + ema_course_duration_weeks: [40, 40] + ema_qualification_level: [2, 2] + ema_payable_weeks: [2, 2] + ema_assessment_country: ["NORTHERN_IRELAND", "NORTHERN_IRELAND"] + ema_prior_supported_academic_years: [0, 0] + ema_prior_positive_or_negative_confirmations: [0, 0] + output: + ema_weekly_award: [30, 0] + +- name: "Case 7, all previous positive and negative confirmations consume the Northern Ireland lifetime cap." + period: 2026 + absolute_error_margin: 0.01 + input: + ema_academic_year: [2026, 2026, 2026, 2026] + ema_date_of_birth: [20090401, 20090401, 20090401, 20090401] + ema_residency_conditions_met: [true, true, true, true] + ema_financial_category: ["DEPENDENT", "DEPENDENT", "DEPENDENT", "DEPENDENT"] + ema_assessed_income: [0, 0, 0, 0] + ema_income_is_known: [true, true, true, true] + ema_other_qualifying_dependants: [0, 0, 0, 0] + ema_course_type: ["FURTHER_EDUCATION", "FURTHER_EDUCATION", "FURTHER_EDUCATION", "FURTHER_EDUCATION"] + ema_provider_approved: [true, true, true, true] + ema_course_is_full_time: [false, false, false, false] + ema_course_learning_hours: [15, 15, 15, 15] + ema_course_duration_weeks: [40, 40, 40, 40] + ema_qualification_level: [2, 2, 2, 2] + ema_payable_weeks: [2, 2, 2, 2] + ema_assessment_country: ["NORTHERN_IRELAND", "NORTHERN_IRELAND", "NORTHERN_IRELAND", "NORTHERN_IRELAND"] + ema_prior_supported_academic_years: [0, 0, 0, 0] + ema_prior_positive_or_negative_confirmations: [0, 116, 117, -1] + output: + education_maintenance_allowance: [60, 30, 0, 0] + +- name: "Case 8, Northern Ireland bonuses are actual qualified counts rather than an automatic two hundred pounds." + period: 2026 + absolute_error_margin: 0.01 + input: + ema_academic_year: [2026, 2026, 2026, 2026] + ema_date_of_birth: [20090401, 20090401, 20090401, 20090401] + ema_residency_conditions_met: [true, true, true, true] + ema_financial_category: ["DEPENDENT", "DEPENDENT", "DEPENDENT", "DEPENDENT"] + ema_assessed_income: [0, 0, 0, 0] + ema_income_is_known: [true, true, true, true] + ema_other_qualifying_dependants: [0, 0, 0, 0] + ema_course_type: ["FURTHER_EDUCATION", "FURTHER_EDUCATION", "FURTHER_EDUCATION", "FURTHER_EDUCATION"] + ema_provider_approved: [true, true, true, true] + ema_course_is_full_time: [false, false, false, false] + ema_course_learning_hours: [15, 15, 15, 15] + ema_course_duration_weeks: [40, 40, 40, 40] + ema_qualification_level: [2, 2, 2, 2] + ema_payable_weeks: [2, 2, 2, 2] + ema_assessment_country: ["NORTHERN_IRELAND", "NORTHERN_IRELAND", "NORTHERN_IRELAND", "NORTHERN_IRELAND"] + ema_prior_supported_academic_years: [0, 0, 0, 0] + ema_prior_positive_or_negative_confirmations: [0, 0, 0, 0] + ema_qualifying_bonus_count: [0, 1, 2, 3] + output: + education_maintenance_allowance: [60, 160, 260, 260] + +- name: "Case 9, a weekly award does not impute paid weeks or bonuses." + period: 2026 + absolute_error_margin: 0.01 + input: + ema_academic_year: 2026 + ema_date_of_birth: 20090401 + ema_residency_conditions_met: true + ema_financial_category: "DEPENDENT" + ema_assessed_income: 0 + ema_income_is_known: true + ema_other_qualifying_dependants: 0 + ema_course_type: "FURTHER_EDUCATION" + ema_provider_approved: true + ema_course_is_full_time: false + ema_course_learning_hours: 15 + ema_course_duration_weeks: 40 + ema_qualification_level: 2 + ema_payable_weeks: 0 + ema_assessment_country: "NORTHERN_IRELAND" + ema_prior_supported_academic_years: 0 + ema_prior_positive_or_negative_confirmations: 0 + ema_qualifying_bonus_count: 0 + output: + education_maintenance_allowance: 0 + ema_weekly_award: 30 + +- name: "Case 10, English and unknown schemes are unsupported despite complete Northern Ireland facts." + period: 2026 + absolute_error_margin: 0.01 + input: + ema_academic_year: [2026, 2026] + ema_date_of_birth: [20090401, 20090401] + ema_residency_conditions_met: [true, true] + ema_financial_category: ["DEPENDENT", "DEPENDENT"] + ema_assessed_income: [0, 0] + ema_income_is_known: [true, true] + ema_other_qualifying_dependants: [0, 0] + ema_course_type: ["FURTHER_EDUCATION", "FURTHER_EDUCATION"] + ema_provider_approved: [true, true] + ema_course_is_full_time: [false, false] + ema_course_learning_hours: [15, 15] + ema_course_duration_weeks: [40, 40] + ema_qualification_level: [2, 2] + ema_payable_weeks: [2, 2] + ema_assessment_country: ["ENGLAND", "UNKNOWN"] + ema_prior_supported_academic_years: [0, 0] + ema_prior_positive_or_negative_confirmations: [0, 0] + output: + education_maintenance_allowance: [0, 0] + ema_weekly_award: [0, 0] diff --git a/policyengine_uk/tests/policy/baseline/gov/dfe/education_maintenance_allowance/scotland.yaml b/policyengine_uk/tests/policy/baseline/gov/dfe/education_maintenance_allowance/scotland.yaml new file mode 100644 index 0000000000..c42a045d77 --- /dev/null +++ b/policyengine_uk/tests/policy/baseline/gov/dfe/education_maintenance_allowance/scotland.yaml @@ -0,0 +1,176 @@ +# Independent oracles: Highland EMA guidance 2026/27, pages 2-4 and 6-17. +# This is the Highland school route only. January 2027 can fall in fiscal 2026. +- name: "Case 1, Highland income ceilings include equality and count other qualifying dependants." + period: 2026 + absolute_error_margin: 0.01 + input: + ema_academic_year: [2026, 2026, 2026, 2026] + ema_date_of_birth: [20090401, 20090401, 20090401, 20090401] + ema_residency_conditions_met: [true, true, true, true] + ema_financial_category: ["DEPENDENT", "DEPENDENT", "DEPENDENT", "DEPENDENT"] + ema_assessed_income: [24421, 24421.01, 26884, 26884.01] + ema_income_is_known: [true, true, true, true] + ema_other_qualifying_dependants: [0, 0, 1, 1] + ema_course_type: ["SCHOOL", "SCHOOL", "SCHOOL", "SCHOOL"] + ema_provider_approved: [true, true, true, true] + ema_course_is_full_time: [true, true, true, true] + ema_course_learning_hours: [21, 21, 21, 21] + ema_course_duration_weeks: [40, 40, 40, 40] + ema_qualification_level: [2, 2, 2, 2] + ema_payable_weeks: [2, 2, 2, 2] + ema_assessment_country: ["SCOTLAND", "SCOTLAND", "SCOTLAND", "SCOTLAND"] + ema_prior_supported_academic_years: [0, 0, 0, 0] + ema_scotland_highland_school: [true, true, true, true] + output: + ema_weekly_award: [30, 0, 30, 0] + +- name: "Case 2, Highland published birth cohorts include the winter pupil who is still fifteen in January." + period: 2026 + absolute_error_margin: 0.01 + input: + ema_academic_year: [2026, 2026, 2026, 2026, 2026, 2026] + ema_date_of_birth: [20070301, 20070228, 20100930, 20101001, 20110228, 20110301] + ema_residency_conditions_met: [true, true, true, true, true, true] + ema_financial_category: ["DEPENDENT", "DEPENDENT", "DEPENDENT", "DEPENDENT", "DEPENDENT", "DEPENDENT"] + ema_assessed_income: [0, 0, 0, 0, 0, 0] + ema_income_is_known: [true, true, true, true, true, true] + ema_other_qualifying_dependants: [0, 0, 0, 0, 0, 0] + ema_course_type: ["SCHOOL", "SCHOOL", "SCHOOL", "SCHOOL", "SCHOOL", "SCHOOL"] + ema_provider_approved: [true, true, true, true, true, true] + ema_course_is_full_time: [true, true, true, true, true, true] + ema_course_learning_hours: [21, 21, 21, 21, 21, 21] + ema_course_duration_weeks: [40, 40, 40, 40, 40, 40] + ema_qualification_level: [2, 2, 2, 2, 2, 2] + ema_payable_weeks: [2, 2, 2, 2, 2, 2] + ema_assessment_country: ["SCOTLAND", "SCOTLAND", "SCOTLAND", "SCOTLAND", "SCOTLAND", "SCOTLAND"] + ema_prior_supported_academic_years: [0, 0, 0, 0, 0, 0] + ema_scotland_highland_school: [true, true, true, true, true, true] + age: [19, 19, 15, 15, 15, 15] + output: + education_maintenance_allowance: [60, 0, 60, 60, 60, 0] + ema_weekly_award: [30, 0, 30, 30, 30, 0] + +- name: "Case 3, Highland school scope does not generalise to another Scottish council or college." + period: 2026 + absolute_error_margin: 0.01 + input: + ema_academic_year: [2026, 2026, 2026, 2026] + ema_date_of_birth: [20090401, 20090401, 20090401, 20090401] + ema_residency_conditions_met: [true, true, true, true] + ema_financial_category: ["DEPENDENT", "DEPENDENT", "DEPENDENT", "DEPENDENT"] + ema_assessed_income: [0, 0, 0, 0] + ema_income_is_known: [true, true, true, true] + ema_other_qualifying_dependants: [0, 0, 0, 0] + ema_course_type: ["SCHOOL", "SCHOOL", "FURTHER_EDUCATION", "PREPARATION_FOR_LIFE_OR_WORK"] + ema_provider_approved: [true, true, true, true] + ema_course_is_full_time: [true, true, true, true] + ema_course_learning_hours: [21, 21, 21, 21] + ema_course_duration_weeks: [40, 40, 40, 40] + ema_qualification_level: [2, 2, 2, 2] + ema_payable_weeks: [2, 2, 2, 2] + ema_assessment_country: ["SCOTLAND", "SCOTLAND", "SCOTLAND", "SCOTLAND"] + ema_prior_supported_academic_years: [0, 0, 0, 0] + ema_scotland_highland_school: [true, false, true, true] + output: + ema_weekly_award: [30, 0, 0, 0] + +- name: "Case 4, Highland ordinary support lasts three years and specified extended categories four." + period: 2026 + absolute_error_margin: 0.01 + input: + ema_academic_year: [2026, 2026, 2026, 2026, 2026, 2026, 2026] + ema_date_of_birth: [20090401, 20090401, 20090401, 20090401, 20090401, 20090401, 20090401] + ema_residency_conditions_met: [true, true, true, true, true, true, true] + ema_financial_category: ["DEPENDENT", "DEPENDENT", "DEPENDENT", "DEPENDENT", "DEPENDENT", "DEPENDENT", "DEPENDENT"] + ema_assessed_income: [0, 0, 0, 0, 0, 0, 0] + ema_income_is_known: [true, true, true, true, true, true, true] + ema_other_qualifying_dependants: [0, 0, 0, 0, 0, 0, 0] + ema_course_type: ["SCHOOL", "SCHOOL", "SCHOOL", "SCHOOL", "SCHOOL", "SCHOOL", "SCHOOL"] + ema_provider_approved: [true, true, true, true, true, true, true] + ema_course_is_full_time: [true, true, true, true, true, true, true] + ema_course_learning_hours: [21, 21, 21, 21, 21, 21, 21] + ema_course_duration_weeks: [40, 40, 40, 40, 40, 40, 40] + ema_qualification_level: [2, 2, 2, 2, 2, 2, 2] + ema_payable_weeks: [2, 2, 2, 2, 2, 2, 2] + ema_assessment_country: ["SCOTLAND", "SCOTLAND", "SCOTLAND", "SCOTLAND", "SCOTLAND", "SCOTLAND", "SCOTLAND"] + ema_prior_supported_academic_years: [0, 2, 3, 3, 3, 4, -1] + ema_scotland_highland_school: [true, true, true, true, true, true, true] + ema_extended_duration_category: ["NONE", "NONE", "NONE", "VULNERABLE", "YOUNG_CARER", "YOUNG_CARER", "NONE"] + output: + ema_weekly_award: [30, 30, 0, 30, 30, 0, 0] + +- name: "Case 5, Highland twenty-one hours can be relaxed only for a documented specified flexible arrangement." + period: 2026 + absolute_error_margin: 0.01 + input: + ema_academic_year: [2026, 2026, 2026, 2026, 2026, 2026] + ema_date_of_birth: [20090401, 20090401, 20090401, 20090401, 20090401, 20090401] + ema_residency_conditions_met: [true, true, true, true, true, true] + ema_financial_category: ["DEPENDENT", "DEPENDENT", "DEPENDENT", "DEPENDENT", "DEPENDENT", "DEPENDENT"] + ema_assessed_income: [0, 0, 0, 0, 0, 0] + ema_income_is_known: [true, true, true, true, true, true] + ema_other_qualifying_dependants: [0, 0, 0, 0, 0, 0] + ema_course_type: ["SCHOOL", "SCHOOL", "SCHOOL", "SCHOOL", "SCHOOL", "SCHOOL"] + ema_provider_approved: [true, true, true, true, true, true] + ema_course_is_full_time: [true, true, true, true, true, true] + ema_course_learning_hours: [21, 20.99, 15, 15, 15, 15] + ema_course_duration_weeks: [40, 40, 40, 40, 40, 40] + ema_qualification_level: [2, 2, 2, 2, 2, 2] + ema_payable_weeks: [2, 2, 2, 2, 2, 2] + ema_assessment_country: ["SCOTLAND", "SCOTLAND", "SCOTLAND", "SCOTLAND", "SCOTLAND", "SCOTLAND"] + ema_prior_supported_academic_years: [0, 0, 0, 0, 0, 0] + ema_scotland_highland_school: [true, true, true, true, true, true] + ema_extended_duration_category: ["NONE", "NONE", "VULNERABLE", "YOUNG_CARER", "NONE", "VULNERABLE"] + ema_flexible_learning_arrangement: [false, false, true, true, true, false] + output: + ema_weekly_award: [30, 0, 30, 30, 0, 0] + +- name: "Case 6, Highland flexibility does not waive provider approval." + period: 2026 + absolute_error_margin: 0.01 + input: + ema_academic_year: 2026 + ema_date_of_birth: 20090401 + ema_residency_conditions_met: true + ema_financial_category: "DEPENDENT" + ema_assessed_income: 0 + ema_income_is_known: true + ema_other_qualifying_dependants: 0 + ema_course_type: "SCHOOL" + ema_provider_approved: false + ema_course_is_full_time: true + ema_course_learning_hours: 15 + ema_course_duration_weeks: 40 + ema_qualification_level: 2 + ema_payable_weeks: 2 + ema_assessment_country: "SCOTLAND" + ema_prior_supported_academic_years: 0 + ema_scotland_highland_school: true + ema_extended_duration_category: "VULNERABLE" + ema_flexible_learning_arrangement: true + output: + ema_weekly_award: 0 + +- name: "Case 7, Highland financial exemptions use contribution-based ESA rather than Welsh care-leaver status." + period: 2026 + absolute_error_margin: 0.01 + input: + ema_academic_year: [2026, 2026, 2026, 2026, 2026, 2026, 2026] + ema_date_of_birth: [20090401, 20090401, 20090401, 20090401, 20090401, 20090401, 20090401] + ema_residency_conditions_met: [true, true, true, true, true, true, true] + ema_financial_category: ["IN_LOCAL_AUTHORITY_CARE", "INCOME_SUPPORT", "CONTRIBUTION_BASED_ESA", "UNIVERSAL_CREDIT", "WALES_CARE_LEAVER", "INCOME_RELATED_ESA", "INDEPENDENT"] + ema_assessed_income: [100000, 100000, 100000, 100000, 100000, 100000, 100000] + ema_income_is_known: [false, false, false, false, false, false, false] + ema_other_qualifying_dependants: [0, 0, 0, 0, 0, 0, 0] + ema_course_type: ["SCHOOL", "SCHOOL", "SCHOOL", "SCHOOL", "SCHOOL", "SCHOOL", "SCHOOL"] + ema_provider_approved: [true, true, true, true, true, true, true] + ema_course_is_full_time: [true, true, true, true, true, true, true] + ema_course_learning_hours: [21, 21, 21, 21, 21, 21, 21] + ema_course_duration_weeks: [40, 40, 40, 40, 40, 40, 40] + ema_qualification_level: [2, 2, 2, 2, 2, 2, 2] + ema_payable_weeks: [2, 2, 2, 2, 2, 2, 2] + ema_assessment_country: ["SCOTLAND", "SCOTLAND", "SCOTLAND", "SCOTLAND", "SCOTLAND", "SCOTLAND", "SCOTLAND"] + ema_prior_supported_academic_years: [0, 0, 0, 0, 0, 0, 0] + ema_scotland_highland_school: [true, true, true, true, true, true, true] + output: + ema_weekly_award: [30, 30, 30, 30, 0, 0, 0] diff --git a/policyengine_uk/tests/policy/baseline/gov/dfe/education_maintenance_allowance/wales.yaml b/policyengine_uk/tests/policy/baseline/gov/dfe/education_maintenance_allowance/wales.yaml new file mode 100644 index 0000000000..d1cb5ec91d --- /dev/null +++ b/policyengine_uk/tests/policy/baseline/gov/dfe/education_maintenance_allowance/wales.yaml @@ -0,0 +1,224 @@ +# Independent oracles: Welsh EMA Scheme 2026, paragraphs 2, 4-8 and 11. +# Assessment facts are source-defined; actual weeks already satisfy administrative rules. +- name: "Case 1, Welsh income ceilings include the exact pound and distinguish another dependant." + period: 2026 + absolute_error_margin: 0.01 + input: + ema_academic_year: [2026, 2026, 2026, 2026] + ema_date_of_birth: [20090401, 20090401, 20090401, 20090401] + ema_residency_conditions_met: [true, true, true, true] + ema_financial_category: ["DEPENDENT", "DEPENDENT", "DEPENDENT", "DEPENDENT"] + ema_assessed_income: [24570, 24570.01, 27273, 27273.01] + ema_income_is_known: [true, true, true, true] + ema_other_qualifying_dependants: [0, 0, 1, 1] + ema_course_type: ["FURTHER_EDUCATION", "FURTHER_EDUCATION", "FURTHER_EDUCATION", "FURTHER_EDUCATION"] + ema_provider_approved: [true, true, true, true] + ema_course_is_full_time: [true, true, true, true] + ema_course_learning_hours: [12, 12, 12, 12] + ema_course_duration_weeks: [40, 40, 40, 40] + ema_qualification_level: [2, 2, 2, 2] + ema_payable_weeks: [2, 2, 2, 2] + ema_assessment_country: ["WALES", "WALES", "WALES", "WALES"] + ema_school_leaving_academic_year: [2025, 2025, 2025, 2025] + output: + education_maintenance_allowance: [80, 0, 80, 0] + ema_weekly_award: [40, 0, 40, 0] + +- name: "Case 2, Welsh ordinary birthday cohort includes both academic-year endpoints." + period: 2026 + absolute_error_margin: 0.01 + input: + ema_academic_year: [2026, 2026, 2026, 2026, 2026, 2026] + ema_date_of_birth: [20070901, 20100831, 20100901, 20070831, 20060831, 0] + ema_residency_conditions_met: [true, true, true, true, true, true] + ema_financial_category: ["DEPENDENT", "DEPENDENT", "DEPENDENT", "DEPENDENT", "DEPENDENT", "DEPENDENT"] + ema_assessed_income: [0, 0, 0, 0, 0, 0] + ema_income_is_known: [true, true, true, true, true, true] + ema_other_qualifying_dependants: [0, 0, 0, 0, 0, 0] + ema_course_type: ["FURTHER_EDUCATION", "FURTHER_EDUCATION", "FURTHER_EDUCATION", "FURTHER_EDUCATION", "FURTHER_EDUCATION", "FURTHER_EDUCATION"] + ema_provider_approved: [true, true, true, true, true, true] + ema_course_is_full_time: [true, true, true, true, true, true] + ema_course_learning_hours: [12, 12, 12, 12, 12, 12] + ema_course_duration_weeks: [40, 40, 40, 40, 40, 40] + ema_qualification_level: [2, 2, 2, 2, 2, 2] + ema_payable_weeks: [2, 2, 2, 2, 2, 2] + ema_assessment_country: ["WALES", "WALES", "WALES", "WALES", "WALES", "WALES"] + ema_school_leaving_academic_year: [2025, 2025, 2025, 2025, 2025, 2025] + output: + ema_age_eligible: [true, true, false, false, false, false] + +- name: "Case 3, an earlier Welsh institution start changes the birthday assessment anchor." + period: 2026 + absolute_error_margin: 0.01 + input: + ema_academic_year: [2026, 2026] + ema_date_of_birth: [20100820, 20100820] + ema_residency_conditions_met: [true, true] + ema_financial_category: ["DEPENDENT", "DEPENDENT"] + ema_assessed_income: [0, 0] + ema_income_is_known: [true, true] + ema_other_qualifying_dependants: [0, 0] + ema_course_type: ["FURTHER_EDUCATION", "FURTHER_EDUCATION"] + ema_provider_approved: [true, true] + ema_course_is_full_time: [true, true] + ema_course_learning_hours: [12, 12] + ema_course_duration_weeks: [40, 40] + ema_qualification_level: [2, 2] + ema_payable_weeks: [2, 2] + ema_assessment_country: ["WALES", "WALES"] + ema_school_leaving_academic_year: [2025, 2025] + ema_academic_year_start_date: [0, 20260815] + output: + ema_age_eligible: [true, false] + +- name: "Case 4, Welsh twentieth-year awards require one or two prior awards and institution advice." + period: 2026 + absolute_error_margin: 0.01 + input: + ema_academic_year: [2026, 2026, 2026, 2026, 2026, 2026] + ema_date_of_birth: [20060901, 20060901, 20060901, 20060901, 20060901, 20060901] + ema_residency_conditions_met: [true, true, true, true, true, true] + ema_financial_category: ["DEPENDENT", "DEPENDENT", "DEPENDENT", "DEPENDENT", "DEPENDENT", "DEPENDENT"] + ema_assessed_income: [0, 0, 0, 0, 0, 0] + ema_income_is_known: [true, true, true, true, true, true] + ema_other_qualifying_dependants: [0, 0, 0, 0, 0, 0] + ema_course_type: ["FURTHER_EDUCATION", "FURTHER_EDUCATION", "FURTHER_EDUCATION", "FURTHER_EDUCATION", "FURTHER_EDUCATION", "FURTHER_EDUCATION"] + ema_provider_approved: [true, true, true, true, true, true] + ema_course_is_full_time: [true, true, true, true, true, true] + ema_course_learning_hours: [12, 12, 12, 12, 12, 12] + ema_course_duration_weeks: [40, 40, 40, 40, 40, 40] + ema_qualification_level: [2, 2, 2, 2, 2, 2] + ema_payable_weeks: [2, 2, 2, 2, 2, 2] + ema_assessment_country: ["WALES", "WALES", "WALES", "WALES", "WALES", "WALES"] + ema_school_leaving_academic_year: [2023, 2023, 2023, 2023, 2023, 2022] + ema_supported_years_in_previous_three: [0, 1, 2, 3, 1, 1] + ema_institution_recommends_twentieth_year: [true, true, true, true, false, true] + output: + ema_weekly_award: [0, 40, 40, 0, 0, 0] + +- name: "Case 5, Welsh ordinary support ends after the third elapsed school-leaving academic year." + period: 2026 + absolute_error_margin: 0.01 + input: + ema_academic_year: [2026, 2026, 2026, 2026, 2026] + ema_date_of_birth: [20090401, 20090401, 20090401, 20090401, 20090401] + ema_residency_conditions_met: [true, true, true, true, true] + ema_financial_category: ["DEPENDENT", "DEPENDENT", "DEPENDENT", "DEPENDENT", "DEPENDENT"] + ema_assessed_income: [0, 0, 0, 0, 0] + ema_income_is_known: [true, true, true, true, true] + ema_other_qualifying_dependants: [0, 0, 0, 0, 0] + ema_course_type: ["FURTHER_EDUCATION", "FURTHER_EDUCATION", "FURTHER_EDUCATION", "FURTHER_EDUCATION", "FURTHER_EDUCATION"] + ema_provider_approved: [true, true, true, true, true] + ema_course_is_full_time: [true, true, true, true, true] + ema_course_learning_hours: [12, 12, 12, 12, 12] + ema_course_duration_weeks: [40, 40, 40, 40, 40] + ema_qualification_level: [2, 2, 2, 2, 2] + ema_payable_weeks: [2, 2, 2, 2, 2] + ema_assessment_country: ["WALES", "WALES", "WALES", "WALES", "WALES"] + ema_school_leaving_academic_year: [2024, 2023, 2022, 2027, 0] + output: + ema_weekly_award: [40, 0, 0, 0, 0] + +- name: "Case 6, Welsh academic courses need twelve hours ten weeks and level three or below." + period: 2026 + absolute_error_margin: 0.01 + input: + ema_academic_year: [2026, 2026, 2026, 2026, 2026, 2026] + ema_date_of_birth: [20090401, 20090401, 20090401, 20090401, 20090401, 20090401] + ema_residency_conditions_met: [true, true, true, true, true, true] + ema_financial_category: ["DEPENDENT", "DEPENDENT", "DEPENDENT", "DEPENDENT", "DEPENDENT", "DEPENDENT"] + ema_assessed_income: [0, 0, 0, 0, 0, 0] + ema_income_is_known: [true, true, true, true, true, true] + ema_other_qualifying_dependants: [0, 0, 0, 0, 0, 0] + ema_course_type: ["FURTHER_EDUCATION", "FURTHER_EDUCATION", "FURTHER_EDUCATION", "FURTHER_EDUCATION", "FURTHER_EDUCATION", "FURTHER_EDUCATION"] + ema_provider_approved: [true, true, true, true, true, false] + ema_course_is_full_time: [true, true, true, true, false, true] + ema_course_learning_hours: [12, 11.99, 12, 12, 12, 12] + ema_course_duration_weeks: [10, 10, 9, 10, 10, 10] + ema_qualification_level: [3, 3, 3, 4, 3, 3] + ema_payable_weeks: [2, 2, 2, 2, 2, 2] + ema_assessment_country: ["WALES", "WALES", "WALES", "WALES", "WALES", "WALES"] + ema_school_leaving_academic_year: [2025, 2025, 2025, 2025, 2025, 2025] + output: + ema_weekly_award: [40, 0, 0, 0, 0, 0] + +- name: "Case 7, an approved Welsh preparation programme does not require a qualification level." + period: 2026 + absolute_error_margin: 0.01 + input: + ema_academic_year: 2026 + ema_date_of_birth: 20090401 + ema_residency_conditions_met: true + ema_financial_category: "DEPENDENT" + ema_assessed_income: 0 + ema_income_is_known: true + ema_other_qualifying_dependants: 0 + ema_course_type: "PREPARATION_FOR_LIFE_OR_WORK" + ema_provider_approved: true + ema_course_is_full_time: true + ema_course_learning_hours: 12 + ema_course_duration_weeks: 10 + ema_qualification_level: -1 + ema_payable_weeks: 2 + ema_assessment_country: "WALES" + ema_school_leaving_academic_year: 2025 + output: + ema_weekly_award: 40 + +- name: "Case 8, Welsh statutory financial exemptions are distinct from independence and contribution-based ESA." + period: 2026 + absolute_error_margin: 0.01 + input: + ema_academic_year: [2026, 2026, 2026, 2026, 2026, 2026, 2026, 2026, 2026] + ema_date_of_birth: [20090401, 20090401, 20090401, 20090401, 20090401, 20090401, 20090401, 20090401, 20090401] + ema_residency_conditions_met: [true, true, true, true, true, true, true, true, true] + ema_financial_category: ["IN_LOCAL_AUTHORITY_CARE", "WALES_CARE_LEAVER", "RESPONSIBLE_FOR_OWN_CHILD", "INCOME_SUPPORT", "INCOME_RELATED_ESA", "UNIVERSAL_CREDIT", "YOUTH_JUSTICE", "INDEPENDENT", "CONTRIBUTION_BASED_ESA"] + ema_assessed_income: [100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000] + ema_income_is_known: [false, false, false, false, false, false, false, false, false] + ema_other_qualifying_dependants: [0, 0, 0, 0, 0, 0, 0, 0, 0] + ema_course_type: ["FURTHER_EDUCATION", "FURTHER_EDUCATION", "FURTHER_EDUCATION", "FURTHER_EDUCATION", "FURTHER_EDUCATION", "FURTHER_EDUCATION", "FURTHER_EDUCATION", "FURTHER_EDUCATION", "FURTHER_EDUCATION"] + ema_provider_approved: [true, true, true, true, true, true, true, true, true] + ema_course_is_full_time: [true, true, true, true, true, true, true, true, true] + ema_course_learning_hours: [12, 12, 12, 12, 12, 12, 12, 12, 12] + ema_course_duration_weeks: [40, 40, 40, 40, 40, 40, 40, 40, 40] + ema_qualification_level: [2, 2, 2, 2, 2, 2, 2, 2, 2] + ema_payable_weeks: [2, 2, 2, 2, 2, 2, 2, 2, 2] + ema_assessment_country: ["WALES", "WALES", "WALES", "WALES", "WALES", "WALES", "WALES", "WALES", "WALES"] + ema_school_leaving_academic_year: [2025, 2025, 2025, 2025, 2025, 2025, 2025, 2025, 2025] + output: + ema_weekly_award: [40, 40, 40, 40, 40, 40, 40, 0, 0] + +- name: "Case 9, missing assessment facts do not infer a Welsh award from current age or legacy EMA." + period: 2026 + absolute_error_margin: 0.01 + input: + age: 17 + child_ema: 900 + adult_ema: 300 + output: + education_maintenance_allowance: 0 + ema_weekly_award: 0 + +- name: "Case 10, known income residency approved courses and supported assessments remain necessary." + period: 2026 + absolute_error_margin: 0.01 + input: + ema_academic_year: [2026, 2026, 2026, 2025, 2026] + ema_date_of_birth: [20090401, 20090401, 20090401, 20090401, 20090401] + ema_residency_conditions_met: [true, false, true, true, true] + ema_financial_category: ["DEPENDENT", "DEPENDENT", "DEPENDENT", "DEPENDENT", "DEPENDENT"] + ema_assessed_income: [0, 0, 0, 0, 0] + ema_income_is_known: [false, true, true, true, true] + ema_other_qualifying_dependants: [0, 0, 0, 0, 0] + ema_course_type: ["FURTHER_EDUCATION", "FURTHER_EDUCATION", "UNKNOWN", "FURTHER_EDUCATION", "FURTHER_EDUCATION"] + ema_provider_approved: [true, true, true, true, true] + ema_course_is_full_time: [true, true, true, true, true] + ema_course_learning_hours: [12, 12, 12, 12, 12] + ema_course_duration_weeks: [40, 40, 40, 40, 40] + ema_qualification_level: [2, 2, 2, 2, 2] + ema_payable_weeks: [2, 2, 2, 2, 2] + ema_assessment_country: ["WALES", "WALES", "WALES", "WALES", "WALES"] + ema_school_leaving_academic_year: [2025, 2025, 2025, 2025, 2025] + ema_incompatible_course_funding: [false, false, false, false, true] + output: + ema_weekly_award: [0, 0, 0, 0, 0] diff --git a/policyengine_uk/tests/test_budget_programs.py b/policyengine_uk/tests/test_budget_programs.py index 6391829bc3..777b170947 100644 --- a/policyengine_uk/tests/test_budget_programs.py +++ b/policyengine_uk/tests/test_budget_programs.py @@ -155,6 +155,8 @@ "carer_support_payment", "scottish_carer_supplement", "disability_basic_income", + # Added for issue 220; the preceding entries retain the historical oracle. + "education_maintenance_allowance", ] # The rules those formulas applied: abolishing council tax removed these diff --git a/policyengine_uk/tests/test_education_maintenance_allowance.py b/policyengine_uk/tests/test_education_maintenance_allowance.py new file mode 100644 index 0000000000..d839437a0d --- /dev/null +++ b/policyengine_uk/tests/test_education_maintenance_allowance.py @@ -0,0 +1,229 @@ +"""Focused EMA receipt timing, cash accounting and legacy-input regressions. + +The weekly oracles are GBP40 (Wales) and GBP30 (Northern Ireland), with +institution-qualified NI bonuses of GBP100. Receipt inputs allocate an actual +AY2026/27 award to fiscal years; they do not create a calendar or attendance +ledger. This model adds EMA to HBAI net income as education income and leaves +the HBAI benefits subtotal unchanged. +""" + +import copy + +import numpy as np +import pytest +from policyengine_core.periods import period + +from policyengine_uk import Simulation + + +pytestmark = pytest.mark.usefixtures("cloned_uk_tax_benefit_system") +YEAR = 2026 +PAYMENT = "education_maintenance_allowance" + + +def assessment(country="WALES"): + """A source-qualified assessment; no production eligibility helper is used.""" + facts = { + "ema_assessment_country": country, + "ema_academic_year": 2026, + "ema_date_of_birth": 20090401, + "ema_residency_conditions_met": True, + "ema_financial_category": "DEPENDENT", + "ema_assessed_income": 0, + "ema_income_is_known": True, + "ema_course_type": "FURTHER_EDUCATION", + "ema_provider_approved": True, + "ema_course_is_full_time": True, + "ema_course_learning_hours": 15, + "ema_course_duration_weeks": 40, + "ema_qualification_level": 2, + "ema_school_leaving_academic_year": 2025, + "ema_prior_supported_academic_years": 0, + "ema_prior_positive_or_negative_confirmations": 0, + } + return facts + + +def test_receipts_require_real_inputs_in_the_exact_supported_fiscal_year(): + # The January and June bonuses can belong to different fiscal years. A + # genuine AY assessment may be reused, but received weeks/bonuses may not. + student = { + name: {year: value for year in (2025, 2026, 2027, 2028)} + for name, value in assessment("NORTHERN_IRELAND").items() + } + student["age"] = {2026: 17, 2027: 18} + student["ema_payable_weeks"] = {2025: 2, 2026: 2, 2028: 2} + student["ema_qualifying_bonus_count"] = {2025: 1, 2026: 1, 2028: 1} + situation = { + "people": {"person1": student}, + "benunits": {"benunit": {"members": ["person1"]}}, + "households": {"household": {"members": ["person1"]}}, + } + sim = Simulation(situation=copy.deepcopy(situation)) + assert sim.calculate(PAYMENT, 2026).tolist() == [160] + assert sim.calculate(PAYMENT, 2027).tolist() == [0] + assert sim.calculate(PAYMENT, 2025).tolist() == [0] + assert sim.calculate(PAYMENT, 2028).tolist() == [0] + + derived = Simulation(situation=copy.deepcopy(situation)) + for name, value in (("ema_payable_weeks", 9), ("ema_qualifying_bonus_count", 2)): + derived.get_holder(name).put_in_cache( + np.array([value]), period(2027), derived.branch_name, derived=True + ) + assert derived.calculate(PAYMENT, 2027).tolist() == [0] + + actual = copy.deepcopy(situation) + actual["people"]["person1"]["ema_payable_weeks"][2027] = 3 + actual["people"]["person1"]["ema_qualifying_bonus_count"][2027] = 1 + actual["people"]["person1"]["ema_prior_positive_or_negative_confirmations"] = { + 2026: 0, + 2027: 2, + } + paid = Simulation(situation=actual) + assert paid.calculate(PAYMENT, 2026).tolist() == [160] + assert paid.calculate(PAYMENT, 2027).tolist() == [190] + + +def paired_award(situation): + without = copy.deepcopy(situation) + with_payment = copy.deepcopy(situation) + for source, accepted in ((without, False), (with_payment, True)): + student = source["people"]["person2"] + student.update({name: {YEAR: value} for name, value in assessment().items()}) + student["ema_residency_conditions_met"] = {YEAR: accepted} + student["ema_payable_weeks"] = {YEAR: 2} + return Simulation(situation=without), Simulation(situation=with_payment) + + +def assert_cash_and_neutrality(control, recipient, positive_awards): + np.testing.assert_array_equal(control.calculate(PAYMENT, YEAR), [0, 0]) + np.testing.assert_array_equal(recipient.calculate(PAYMENT, YEAR), [0, 80]) + for name in positive_awards: + assert control.calculate(name, YEAR).sum() > 0, name + for name in ( + "income_tax", + "national_insurance", + "universal_credit", + "housing_benefit", + "council_tax_benefit", + "benefit_cap_reduction", + "hbai_benefits", + ): + np.testing.assert_array_equal( + recipient.calculate(name, YEAR), control.calculate(name, YEAR), err_msg=name + ) + for name in ( + "household_benefits", + "household_net_income", + "hbai_household_net_income", + "gov_spending", + ): + change = ( + recipient.calculate(name, YEAR).sum() - control.calculate(name, YEAR).sum() + ) + assert change == pytest.approx(80, abs=0.01, rel=0), name + change = ( + recipient.calculate("gov_balance", YEAR).sum() + - control.calculate("gov_balance", YEAR).sum() + ) + assert change == pytest.approx(-80, abs=0.01, rel=0) + + +def test_new_welsh_cash_keeps_positive_tax_ni_and_uc_and_adds_education_income_once(): + situation = { + "people": { + "person1": { + "age": {YEAR: 40}, + "employment_income": {YEAR: 20_000}, + "weekly_hours": {YEAR: 35}, + }, + "person2": { + "age": {YEAR: 17}, + "current_education": {YEAR: "UPPER_SECONDARY"}, + }, + }, + "benunits": { + "benunit": { + "members": ["person1", "person2"], + "would_claim_uc": {YEAR: True}, + "would_claim_uc_at_legacy_closure": {YEAR: False}, + } + }, + "households": { + "household": { + "members": ["person1", "person2"], + "region": {YEAR: "WALES"}, + "tenure_type": {YEAR: "RENT_PRIVATELY"}, + "rent": {YEAR: 10_000}, + "council_tax": {YEAR: 1_500}, + } + }, + } + control, recipient = paired_award(situation) + assert_cash_and_neutrality( + control, recipient, ("income_tax", "national_insurance", "universal_credit") + ) + + +def test_new_welsh_cash_keeps_positive_housing_and_council_tax_support(): + situation = { + "people": { + "person1": { + "age": {YEAR: 40}, + "housing_benefit_reported": {YEAR: 1_000}, + "council_tax_benefit_reported": {YEAR: 1_000}, + }, + "person2": { + "age": {YEAR: 17}, + "current_education": {YEAR: "UPPER_SECONDARY"}, + }, + }, + "benunits": { + "benunit": { + "members": ["person1", "person2"], + "would_claim_uc": {YEAR: False}, + "would_claim_uc_at_legacy_closure": {YEAR: False}, + } + }, + "households": { + "household": { + "members": ["person1", "person2"], + "region": {YEAR: "WALES"}, + "local_authority": {YEAR: "CARDIFF"}, + "tenure_type": {YEAR: "RENT_FROM_COUNCIL"}, + "rent": {YEAR: 25_000}, + "council_tax": {YEAR: 1_500}, + } + }, + } + control, recipient = paired_award(situation) + assert_cash_and_neutrality( + control, + recipient, + ("housing_benefit", "council_tax_benefit", "benefit_cap_reduction"), + ) + + +def test_legacy_reported_ema_is_preserved_without_an_explicit_new_assessment(): + # The model cannot tell whether a legacy amount duplicates a supplied new + # award. Input producers must keep those amounts disjoint; this test makes + # no invented automatic mapping or subtraction from reported legacy cash. + sim = Simulation( + situation={ + "people": { + "person1": { + "age": {YEAR: 17}, + "adult_ema": {YEAR: 300}, + "child_ema": {YEAR: 900}, + "education_grants": {YEAR: 200}, + "access_fund": {YEAR: 50}, + } + }, + "benunits": {"benunit": {"members": ["person1"]}}, + "households": {"household": {"members": ["person1"]}}, + } + ) + assert sim.calculate("adult_ema", YEAR).tolist() == [300] + assert sim.calculate("child_ema", YEAR).tolist() == [900] + assert sim.calculate("student_payments", YEAR).tolist() == [1450] + assert sim.calculate(PAYMENT, YEAR).tolist() == [0] diff --git a/policyengine_uk/variables/gov/dfe/education_maintenance_allowance/education_maintenance_allowance.py b/policyengine_uk/variables/gov/dfe/education_maintenance_allowance/education_maintenance_allowance.py new file mode 100644 index 0000000000..4cb13f4c21 --- /dev/null +++ b/policyengine_uk/variables/gov/dfe/education_maintenance_allowance/education_maintenance_allowance.py @@ -0,0 +1,59 @@ +from policyengine_uk.model_api import * +from policyengine_uk.variables.gov.dfe.education_maintenance_allowance.ema_weekly_award import ( + ema_parameters, + ema_routes, + exact_ema_allocation, +) + + +class education_maintenance_allowance(Variable): + value_type = float + entity = Person + definition_period = YEAR + default_value = 0 + quantity_type = FLOW + unit = GBP + label = "Education Maintenance Allowance" + documentation = ( + "Actual annual cash for one explicitly assessed EMA award, using lawfully " + "allocated weeks and qualifying bonuses for the requested model year. " + "Overlapping academic assessments are not automatically reconstructed. New " + "cash must be disjoint from legacy adult_ema, child_ema, education_grants and " + "other supplied income; those legacy channels are not repurposed. This is the " + "sole new cash total, not the weekly assessment amount." + ) + reference = ( + "https://www.gov.wales/sites/default/files/publications/2026-04/the-education-maintenance-allowance-wales-scheme-2026-2027.pdf", + "https://www.highland.gov.uk/downloads/file/962/ema-guidance-notes-2025-26", + "https://www.nidirect.gov.uk/sites/default/files/2026-06/ema-ni-application-notes-2627-e-o-PDF_0.pdf", + "https://www.nidirect.gov.uk/articles/education-maintenance-allowance-explained", + ) + + def formula(person, period, parameters): + shared, wales, scotland, ni = ema_parameters(parameters, period) + in_wales, in_scotland, in_ni = ema_routes(person, period, shared) + weekly = person("ema_weekly_award", period) + weeks = exact_ema_allocation(person, period, "ema_payable_weeks") + previous = person("ema_prior_positive_or_negative_confirmations", period) + ni_weeks = min_(weeks, max_(0, ni.maximum_confirmations - previous)) + weeks = where(in_ni, where(previous >= 0, ni_weeks, 0), weeks) + bonuses = min_( + exact_ema_allocation(person, period, "ema_qualifying_bonus_count"), + ni.maximum_bonus_count, + ) + # Confirmed bonus objectives/signatures/window and ordering are supplied + # facts, not inferred from January/June or reconstructed from counts. + bonus_cash = in_ni * (weekly > 0) * bonuses * ni.bonus_amount + supported_cash = (period.start.year >= shared.first_cash_model_year) & ( + period.start.year <= shared.last_cash_model_year + ) + birth = person("ema_date_of_birth", period) + scottish_start = where( + birth >= scotland.winter_entry_minimum_birth_date, + scotland.winter_payment_start_date, + scotland.autumn_payment_start_date, + ) + fiscal_end = (period.start.year + 1) * 10000 + shared.fiscal_year_end_month_day + # Fiscal2026 includes January-March2027: no calendar-year winter veto. + start_within_cash_year = ~in_scotland | (fiscal_end >= scottish_start) + return supported_cash * start_within_cash_year * (weekly * weeks + bonus_cash) diff --git a/policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_academic_year.py b/policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_academic_year.py new file mode 100644 index 0000000000..c85c808583 --- /dev/null +++ b/policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_academic_year.py @@ -0,0 +1,22 @@ +from policyengine_uk.model_api import * + + +class ema_academic_year(Variable): + value_type = int + entity = Person + definition_period = YEAR + default_value = 0 + quantity_type = STOCK + label = "EMA assessment academic year" + documentation = ( + "The academic assessment year is independent of the requested model cash " + "year. Only the source-supported 2026/27 assessment is in scope; a different " + "fiscal year must not silently select another assessment. This is a supplied " + "assessment or allocation fact, not whole-programme eligibility." + ) + reference = ( + "https://www.gov.wales/sites/default/files/publications/2026-04/the-education-maintenance-allowance-wales-scheme-2026-2027.pdf", + "https://www.highland.gov.uk/downloads/file/962/ema-guidance-notes-2025-26", + "https://www.nidirect.gov.uk/sites/default/files/2026-06/ema-ni-application-notes-2627-e-o-PDF_0.pdf", + "https://www.nidirect.gov.uk/articles/education-maintenance-allowance-explained", + ) diff --git a/policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_academic_year_start_date.py b/policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_academic_year_start_date.py new file mode 100644 index 0000000000..3649cda83b --- /dev/null +++ b/policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_academic_year_start_date.py @@ -0,0 +1,23 @@ +from policyengine_uk.model_api import * + + +class ema_academic_year_start_date(Variable): + value_type = int + entity = Person + definition_period = YEAR + default_value = 0 + quantity_type = STOCK + unit = "date" + label = "EMA institution academic-year start date" + documentation = ( + "Zero selects the source-defined ordinary anchor for the selected scheme. A " + "nonzero value records a genuine earlier institution start only where the " + "scheme supports it; it is not an arbitrary fiscal-date override. This is a " + "supplied assessment or allocation fact, not whole-programme eligibility." + ) + reference = ( + "https://www.gov.wales/sites/default/files/publications/2026-04/the-education-maintenance-allowance-wales-scheme-2026-2027.pdf", + "https://www.highland.gov.uk/downloads/file/962/ema-guidance-notes-2025-26", + "https://www.nidirect.gov.uk/sites/default/files/2026-06/ema-ni-application-notes-2627-e-o-PDF_0.pdf", + "https://www.nidirect.gov.uk/articles/education-maintenance-allowance-explained", + ) diff --git a/policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_age_eligible.py b/policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_age_eligible.py new file mode 100644 index 0000000000..4e978c9f3c --- /dev/null +++ b/policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_age_eligible.py @@ -0,0 +1,47 @@ +from policyengine_uk.model_api import * +from policyengine_uk.variables.gov.dfe.education_maintenance_allowance.ema_weekly_award import ( + ema_parameters, + ema_routes, + wales_birth_routes, + valid_ema_date, +) + + +class ema_age_eligible(Variable): + value_type = bool + entity = Person + definition_period = YEAR + default_value = False + label = "EMA age eligible" + documentation = ( + "Age and birth-cohort eligibility for the explicitly supplied academic " + "assessment. Current fiscal-year age is not a substitute for the scheme " + "cohort." + ) + reference = ( + "https://www.gov.wales/sites/default/files/publications/2026-04/the-education-maintenance-allowance-wales-scheme-2026-2027.pdf", + "https://www.highland.gov.uk/downloads/file/962/ema-guidance-notes-2025-26", + "https://www.nidirect.gov.uk/sites/default/files/2026-06/ema-ni-application-notes-2627-e-o-PDF_0.pdf", + "https://www.nidirect.gov.uk/articles/education-maintenance-allowance-explained", + ) + + def formula(person, period, parameters): + shared, wales, scotland, ni = ema_parameters(parameters, period) + in_wales, in_scotland, in_ni = ema_routes(person, period, shared) + ordinary, twentieth, start = wales_birth_routes(person, period, shared, wales) + birth = person("ema_date_of_birth", period) + scottish = ( + valid_ema_date(birth) + & (birth >= scotland.minimum_birth_date) + & (birth <= scotland.maximum_birth_date) + ) + northern_irish = ( + valid_ema_date(birth) + & (birth >= ni.minimum_birth_date) + & (birth <= ni.maximum_birth_date) + ) + return ( + (in_wales & (ordinary | twentieth)) + | (in_scotland & scottish) + | (in_ni & northern_irish) + ) diff --git a/policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_assessed_income.py b/policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_assessed_income.py new file mode 100644 index 0000000000..8005d6f880 --- /dev/null +++ b/policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_assessed_income.py @@ -0,0 +1,25 @@ +from policyengine_uk.model_api import * + + +class ema_assessed_income(Variable): + value_type = float + entity = Person + definition_period = YEAR + default_value = 0 + quantity_type = STOCK + unit = GBP + label = "EMA assessed annual income" + documentation = ( + "Supply the correctly defined assessment-group total, including an accepted " + "reassessment where applicable. The normal source bases are 2024/25 for Wales " + "and Northern Ireland and 2025/26 for the scoped Highland scheme. Do not " + "substitute current household disposable income or deduct pension and " + "expenses twice. This is an assessment stock, not annual cash flow. This is a " + "supplied assessment or allocation fact, not whole-programme eligibility." + ) + reference = ( + "https://www.gov.wales/sites/default/files/publications/2026-04/the-education-maintenance-allowance-wales-scheme-2026-2027.pdf", + "https://www.highland.gov.uk/downloads/file/962/ema-guidance-notes-2025-26", + "https://www.nidirect.gov.uk/sites/default/files/2026-06/ema-ni-application-notes-2627-e-o-PDF_0.pdf", + "https://www.nidirect.gov.uk/articles/education-maintenance-allowance-explained", + ) diff --git a/policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_assessment_country.py b/policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_assessment_country.py new file mode 100644 index 0000000000..772fb46fa6 --- /dev/null +++ b/policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_assessment_country.py @@ -0,0 +1,22 @@ +from policyengine_uk.model_api import * +from policyengine_uk.variables.household.demographic.country import Country + + +class ema_assessment_country(Variable): + value_type = Enum + entity = Person + definition_period = YEAR + possible_values = Country + default_value = Country.UNKNOWN + label = "EMA assessment country" + documentation = ( + "Funding scheme being assessed; no inference from legacy EMA or provider " + "country. This is a supplied assessment or allocation fact, not " + "whole-programme eligibility." + ) + reference = ( + "https://www.gov.wales/sites/default/files/publications/2026-04/the-education-maintenance-allowance-wales-scheme-2026-2027.pdf", + "https://www.highland.gov.uk/downloads/file/962/ema-guidance-notes-2025-26", + "https://www.nidirect.gov.uk/sites/default/files/2026-06/ema-ni-application-notes-2627-e-o-PDF_0.pdf", + "https://www.nidirect.gov.uk/articles/education-maintenance-allowance-explained", + ) diff --git a/policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_course_duration_weeks.py b/policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_course_duration_weeks.py new file mode 100644 index 0000000000..cbce0bbc07 --- /dev/null +++ b/policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_course_duration_weeks.py @@ -0,0 +1,20 @@ +from policyengine_uk.model_api import * + + +class ema_course_duration_weeks(Variable): + value_type = int + entity = Person + definition_period = YEAR + default_value = 0 + quantity_type = STOCK + label = "EMA course duration weeks" + documentation = ( + "Total scheduled programme duration; source minimum computed in code. This is " + "a supplied assessment or allocation fact, not whole-programme eligibility." + ) + reference = ( + "https://www.gov.wales/sites/default/files/publications/2026-04/the-education-maintenance-allowance-wales-scheme-2026-2027.pdf", + "https://www.highland.gov.uk/downloads/file/962/ema-guidance-notes-2025-26", + "https://www.nidirect.gov.uk/sites/default/files/2026-06/ema-ni-application-notes-2627-e-o-PDF_0.pdf", + "https://www.nidirect.gov.uk/articles/education-maintenance-allowance-explained", + ) diff --git a/policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_course_eligible.py b/policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_course_eligible.py new file mode 100644 index 0000000000..a4b6afba17 --- /dev/null +++ b/policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_course_eligible.py @@ -0,0 +1,73 @@ +from policyengine_uk.model_api import * +from policyengine_uk.variables.gov.dfe.education_maintenance_allowance.ema_weekly_award import ( + ema_parameters, + ema_routes, +) + + +class ema_course_eligible(Variable): + value_type = bool + entity = Person + definition_period = YEAR + default_value = False + label = "EMA course eligible" + documentation = ( + "Course and provider conditions for the selected scoped EMA route, separate " + "from income, residence and attendance." + ) + reference = ( + "https://www.gov.wales/sites/default/files/publications/2026-04/the-education-maintenance-allowance-wales-scheme-2026-2027.pdf", + "https://www.highland.gov.uk/downloads/file/962/ema-guidance-notes-2025-26", + "https://www.nidirect.gov.uk/sites/default/files/2026-06/ema-ni-application-notes-2627-e-o-PDF_0.pdf", + "https://www.nidirect.gov.uk/articles/education-maintenance-allowance-explained", + ) + + def formula(person, period, parameters): + shared, wales, scotland, ni = ema_parameters(parameters, period) + in_wales, in_scotland, in_ni = ema_routes(person, period, shared) + course = person("ema_course_type", period) + types = course.possible_values + school = course == types.SCHOOL + college = course == types.FURTHER_EDUCATION + preparation = course == types.PREPARATION_FOR_LIFE_OR_WORK + full_time = person("ema_course_is_full_time", period) + hours = person("ema_course_learning_hours", period) + level = person("ema_qualification_level", period) + recognised = person("ema_provider_approved", period) & ~person( + "ema_incompatible_course_funding", period + ) + welsh_qualification = ( + (school | college) + & (level >= 0) + & (level <= wales.maximum_qualification_level) + & ( + person("ema_course_duration_weeks", period) + >= wales.minimum_course_weeks + ) + ) + welsh = ( + full_time + & (hours >= wales.minimum_learning_hours) + & (welsh_qualification | preparation) + ) + # Highland permits the documented hours/mode exception only for the + # specified vulnerable-student or young-carer circumstances. + flexible_category = np.isin( + person("ema_extended_duration_category", period).decode_to_str(), + list(scotland.extended_duration_categories), + ) + flexible_arrangement = ( + person("ema_flexible_learning_arrangement", period) & flexible_category + ) + scottish = school & ( + (full_time & (hours >= scotland.minimum_learning_hours)) + | flexible_arrangement + ) + northern_irish = ( + ((school & full_time) | (college & (hours >= ni.minimum_college_hours))) + & (level >= 0) + & (level <= ni.maximum_qualification_level) + ) + return recognised & ( + (in_wales & welsh) | (in_scotland & scottish) | (in_ni & northern_irish) + ) diff --git a/policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_course_is_full_time.py b/policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_course_is_full_time.py new file mode 100644 index 0000000000..21a434a018 --- /dev/null +++ b/policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_course_is_full_time.py @@ -0,0 +1,19 @@ +from policyengine_uk.model_api import * + + +class ema_course_is_full_time(Variable): + value_type = bool + entity = Person + definition_period = YEAR + default_value = False + label = "EMA course is full time" + documentation = ( + "Course mode fact; do not infer from imputed education stage. This is a " + "supplied assessment or allocation fact, not whole-programme eligibility." + ) + reference = ( + "https://www.gov.wales/sites/default/files/publications/2026-04/the-education-maintenance-allowance-wales-scheme-2026-2027.pdf", + "https://www.highland.gov.uk/downloads/file/962/ema-guidance-notes-2025-26", + "https://www.nidirect.gov.uk/sites/default/files/2026-06/ema-ni-application-notes-2627-e-o-PDF_0.pdf", + "https://www.nidirect.gov.uk/articles/education-maintenance-allowance-explained", + ) diff --git a/policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_course_learning_hours.py b/policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_course_learning_hours.py new file mode 100644 index 0000000000..2928c4f847 --- /dev/null +++ b/policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_course_learning_hours.py @@ -0,0 +1,22 @@ +from policyengine_uk.model_api import * + + +class ema_course_learning_hours(Variable): + value_type = float + entity = Person + definition_period = YEAR + default_value = 0 + quantity_type = STOCK + label = "EMA course learning hours" + documentation = ( + "Count the source-defined scheduled guided or learning-session hours. It is " + "an assessment stock, not an annual hours total to divide over periods. This " + "is a supplied assessment or allocation fact, not whole-programme " + "eligibility." + ) + reference = ( + "https://www.gov.wales/sites/default/files/publications/2026-04/the-education-maintenance-allowance-wales-scheme-2026-2027.pdf", + "https://www.highland.gov.uk/downloads/file/962/ema-guidance-notes-2025-26", + "https://www.nidirect.gov.uk/sites/default/files/2026-06/ema-ni-application-notes-2627-e-o-PDF_0.pdf", + "https://www.nidirect.gov.uk/articles/education-maintenance-allowance-explained", + ) diff --git a/policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_course_type.py b/policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_course_type.py new file mode 100644 index 0000000000..3abc27a4af --- /dev/null +++ b/policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_course_type.py @@ -0,0 +1,29 @@ +from policyengine_uk.model_api import * + + +class EMACourseType(Enum): + UNKNOWN = "Unknown" + SCHOOL = "School" + FURTHER_EDUCATION = "Further education" + PREPARATION_FOR_LIFE_OR_WORK = "Preparation for life or work" + + +class ema_course_type(Variable): + value_type = Enum + entity = Person + definition_period = YEAR + possible_values = EMACourseType + default_value = EMACourseType.UNKNOWN + label = "EMA course type" + documentation = ( + "This is the actual course type at the assessment, not an education stage " + "imputed from age. Only source-supported school, further-education or " + "approved preparation routes can qualify. This is a supplied assessment or " + "allocation fact, not whole-programme eligibility." + ) + reference = ( + "https://www.gov.wales/sites/default/files/publications/2026-04/the-education-maintenance-allowance-wales-scheme-2026-2027.pdf", + "https://www.highland.gov.uk/downloads/file/962/ema-guidance-notes-2025-26", + "https://www.nidirect.gov.uk/sites/default/files/2026-06/ema-ni-application-notes-2627-e-o-PDF_0.pdf", + "https://www.nidirect.gov.uk/articles/education-maintenance-allowance-explained", + ) diff --git a/policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_date_of_birth.py b/policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_date_of_birth.py new file mode 100644 index 0000000000..b3cc732528 --- /dev/null +++ b/policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_date_of_birth.py @@ -0,0 +1,23 @@ +from policyengine_uk.model_api import * + + +class ema_date_of_birth(Variable): + value_type = int + entity = Person + definition_period = YEAR + default_value = 0 + quantity_type = STOCK + unit = "date" + label = "EMA verified date of birth" + documentation = ( + "Use an actual YYYYMMDD birth record, not a date inferred from current " + "fiscal-year age. Zero is unknown. Country-specific birth cohorts are " + "calculated separately. This is a supplied assessment or allocation fact, not " + "whole-programme eligibility." + ) + reference = ( + "https://www.gov.wales/sites/default/files/publications/2026-04/the-education-maintenance-allowance-wales-scheme-2026-2027.pdf", + "https://www.highland.gov.uk/downloads/file/962/ema-guidance-notes-2025-26", + "https://www.nidirect.gov.uk/sites/default/files/2026-06/ema-ni-application-notes-2627-e-o-PDF_0.pdf", + "https://www.nidirect.gov.uk/articles/education-maintenance-allowance-explained", + ) diff --git a/policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_duration_eligible.py b/policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_duration_eligible.py new file mode 100644 index 0000000000..0cff0d4aaa --- /dev/null +++ b/policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_duration_eligible.py @@ -0,0 +1,57 @@ +from policyengine_uk.model_api import * +from policyengine_uk.variables.gov.dfe.education_maintenance_allowance.ema_weekly_award import ( + ema_parameters, + ema_routes, + wales_birth_routes, +) + + +class ema_duration_eligible(Variable): + value_type = bool + entity = Person + definition_period = YEAR + default_value = False + label = "EMA duration eligible" + documentation = ( + "Source-defined elapsed or supported-year limits for the supplied assessment " + "and historical facts." + ) + reference = ( + "https://www.gov.wales/sites/default/files/publications/2026-04/the-education-maintenance-allowance-wales-scheme-2026-2027.pdf", + "https://www.highland.gov.uk/downloads/file/962/ema-guidance-notes-2025-26", + "https://www.nidirect.gov.uk/sites/default/files/2026-06/ema-ni-application-notes-2627-e-o-PDF_0.pdf", + "https://www.nidirect.gov.uk/articles/education-maintenance-allowance-explained", + ) + + def formula(person, period, parameters): + shared, wales, scotland, ni = ema_parameters(parameters, period) + in_wales, in_scotland, in_ni = ema_routes(person, period, shared) + ordinary, twentieth, start = wales_birth_routes(person, period, shared, wales) + leaving_year = person("ema_school_leaving_academic_year", period) + elapsed = person("ema_academic_year", period) - leaving_year + welsh = ( + (leaving_year > 0) + & (elapsed >= 0) + & ( + ((elapsed < wales.ordinary_academic_year_window) & ordinary) + | ((elapsed < wales.extended_academic_year_window) & twentieth) + ) + ) + previous = person("ema_prior_supported_academic_years", period) + extended = np.isin( + person("ema_extended_duration_category", period).decode_to_str(), + list(scotland.extended_duration_categories), + ) + scottish_limit = where( + extended, + scotland.extended_supported_years, + scotland.ordinary_supported_years, + ) + scottish = (previous >= 0) & (previous < scottish_limit) + confirmations = person("ema_prior_positive_or_negative_confirmations", period) + northern_irish = ( + (previous >= 0) + & (previous < ni.maximum_supported_years) + & (confirmations >= 0) + ) + return (in_wales & welsh) | (in_scotland & scottish) | (in_ni & northern_irish) diff --git a/policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_extended_duration_category.py b/policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_extended_duration_category.py new file mode 100644 index 0000000000..8e66884685 --- /dev/null +++ b/policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_extended_duration_category.py @@ -0,0 +1,27 @@ +from policyengine_uk.model_api import * + + +class EMAExtendedDurationCategory(Enum): + NONE = "No extended-duration category" + VULNERABLE = "Source-defined vulnerable student" + YOUNG_CARER = "Source-defined young carer" + + +class ema_extended_duration_category(Variable): + value_type = Enum + entity = Person + definition_period = YEAR + possible_values = EMAExtendedDurationCategory + default_value = EMAExtendedDurationCategory.NONE + label = "EMA extended duration category" + documentation = ( + "Scotland vulnerable/young-carer extended duration category; source " + "definitions required. This is a supplied assessment or allocation fact, not " + "whole-programme eligibility." + ) + reference = ( + "https://www.gov.wales/sites/default/files/publications/2026-04/the-education-maintenance-allowance-wales-scheme-2026-2027.pdf", + "https://www.highland.gov.uk/downloads/file/962/ema-guidance-notes-2025-26", + "https://www.nidirect.gov.uk/sites/default/files/2026-06/ema-ni-application-notes-2627-e-o-PDF_0.pdf", + "https://www.nidirect.gov.uk/articles/education-maintenance-allowance-explained", + ) diff --git a/policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_financial_category.py b/policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_financial_category.py new file mode 100644 index 0000000000..b28d8a3fd1 --- /dev/null +++ b/policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_financial_category.py @@ -0,0 +1,39 @@ +from policyengine_uk.model_api import * + + +class EMAFinancialCategory(Enum): + UNKNOWN = "Unknown" + DEPENDENT = "Dependent applicant" + INDEPENDENT = "Independent applicant" + IN_LOCAL_AUTHORITY_CARE = "In local authority care" + WALES_CARE_LEAVER = "Wales statutory care leaver" + RESPONSIBLE_FOR_OWN_CHILD = "Responsible for their own child" + INCOME_SUPPORT = "Income Support" + INCOME_RELATED_ESA = "Income-related Employment and Support Allowance" + CONTRIBUTION_BASED_ESA = "Contribution-based Employment and Support Allowance" + UNIVERSAL_CREDIT = "Universal Credit" + YOUTH_JUSTICE = "Specified Wales youth-justice custody or detention" + + +class ema_financial_category(Variable): + value_type = Enum + entity = Person + definition_period = YEAR + possible_values = EMAFinancialCategory + default_value = EMAFinancialCategory.UNKNOWN + label = "EMA financial assessment category" + documentation = ( + "This records the verified assessment category and supporting historical " + "facts, not whole-programme eligibility. Wales statutory care-leaver status " + "requires its specific care history. Scottish exemption for care means " + "current local-authority care, not every care leaver. NI independence " + "categories do not automatically exempt assessed income. Income-related and " + "contribution-based ESA are distinct. This is a supplied assessment or " + "allocation fact, not whole-programme eligibility." + ) + reference = ( + "https://www.gov.wales/sites/default/files/publications/2026-04/the-education-maintenance-allowance-wales-scheme-2026-2027.pdf", + "https://www.highland.gov.uk/downloads/file/962/ema-guidance-notes-2025-26", + "https://www.nidirect.gov.uk/sites/default/files/2026-06/ema-ni-application-notes-2627-e-o-PDF_0.pdf", + "https://www.nidirect.gov.uk/articles/education-maintenance-allowance-explained", + ) diff --git a/policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_flexible_learning_arrangement.py b/policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_flexible_learning_arrangement.py new file mode 100644 index 0000000000..632cf18528 --- /dev/null +++ b/policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_flexible_learning_arrangement.py @@ -0,0 +1,21 @@ +from policyengine_uk.model_api import * + + +class ema_flexible_learning_arrangement(Variable): + value_type = bool + entity = Person + definition_period = YEAR + default_value = False + label = "EMA flexible learning arrangement" + documentation = ( + "True records a specific institution-documented Highland vulnerable or " + "young-carer flexible learning arrangement. It does not waive all provider, " + "course or other eligibility conditions. This is a supplied assessment or " + "allocation fact, not whole-programme eligibility." + ) + reference = ( + "https://www.gov.wales/sites/default/files/publications/2026-04/the-education-maintenance-allowance-wales-scheme-2026-2027.pdf", + "https://www.highland.gov.uk/downloads/file/962/ema-guidance-notes-2025-26", + "https://www.nidirect.gov.uk/sites/default/files/2026-06/ema-ni-application-notes-2627-e-o-PDF_0.pdf", + "https://www.nidirect.gov.uk/articles/education-maintenance-allowance-explained", + ) diff --git a/policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_income_eligible.py b/policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_income_eligible.py new file mode 100644 index 0000000000..aab31df0f4 --- /dev/null +++ b/policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_income_eligible.py @@ -0,0 +1,68 @@ +from policyengine_uk.model_api import * +from policyengine_uk.variables.gov.dfe.education_maintenance_allowance.ema_weekly_award import ( + ema_parameters, + ema_routes, +) + + +class ema_income_eligible(Variable): + value_type = bool + entity = Person + definition_period = YEAR + default_value = False + label = "EMA income eligible" + documentation = ( + "Financial assessment condition for the selected scheme, respecting its own " + "assessed-income thresholds and exemption categories." + ) + reference = ( + "https://www.gov.wales/sites/default/files/publications/2026-04/the-education-maintenance-allowance-wales-scheme-2026-2027.pdf", + "https://www.highland.gov.uk/downloads/file/962/ema-guidance-notes-2025-26", + "https://www.nidirect.gov.uk/sites/default/files/2026-06/ema-ni-application-notes-2627-e-o-PDF_0.pdf", + "https://www.nidirect.gov.uk/articles/education-maintenance-allowance-explained", + ) + + def formula(person, period, parameters): + shared, wales, scotland, ni = ema_parameters(parameters, period) + in_wales, in_scotland, in_ni = ema_routes(person, period, shared) + category = person("ema_financial_category", period) + known_category = category != category.possible_values.UNKNOWN + names = category.decode_to_str() + welsh_exempt = np.isin(names, list(wales.income_exempt_categories)) + scottish_exempt = np.isin(names, list(scotland.income_exempt_categories)) + other = person("ema_other_qualifying_dependants", period) + income = person("ema_assessed_income", period) + known = ( + person("ema_income_is_known", period) + & np.isfinite(income) + & (other >= 0) + & known_category + ) + welsh_limit = where( + other >= wales.higher_band_minimum_other_dependants, + wales.multiple_dependants_income_limit, + wales.single_dependant_income_limit, + ) + scottish_limit = where( + other >= scotland.higher_band_minimum_other_dependants, + scotland.multiple_dependants_income_limit, + scotland.single_dependant_income_limit, + ) + ni_limit = where( + other >= ni.higher_band_minimum_other_dependants, + ni.multiple_dependants_income_limit, + ni.single_dependant_income_limit, + ) + return ( + ( + in_wales + & known_category + & (welsh_exempt | (known & (income <= welsh_limit))) + ) + | ( + in_scotland + & known_category + & (scottish_exempt | (known & (income <= scottish_limit))) + ) + | (in_ni & known & (income <= ni_limit)) + ) diff --git a/policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_income_is_known.py b/policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_income_is_known.py new file mode 100644 index 0000000000..fc44a328f4 --- /dev/null +++ b/policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_income_is_known.py @@ -0,0 +1,21 @@ +from policyengine_uk.model_api import * + + +class ema_income_is_known(Variable): + value_type = bool + entity = Person + definition_period = YEAR + default_value = False + label = "EMA income assessment is known" + documentation = ( + "False denotes a missing financial assessment, not zero income. A " + "source-defined income-exempt category can bypass the income test while all " + "other conditions still apply. This is a supplied assessment or allocation " + "fact, not whole-programme eligibility." + ) + reference = ( + "https://www.gov.wales/sites/default/files/publications/2026-04/the-education-maintenance-allowance-wales-scheme-2026-2027.pdf", + "https://www.highland.gov.uk/downloads/file/962/ema-guidance-notes-2025-26", + "https://www.nidirect.gov.uk/sites/default/files/2026-06/ema-ni-application-notes-2627-e-o-PDF_0.pdf", + "https://www.nidirect.gov.uk/articles/education-maintenance-allowance-explained", + ) diff --git a/policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_incompatible_course_funding.py b/policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_incompatible_course_funding.py new file mode 100644 index 0000000000..c4ca9719a4 --- /dev/null +++ b/policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_incompatible_course_funding.py @@ -0,0 +1,21 @@ +from policyengine_uk.model_api import * + + +class ema_incompatible_course_funding(Variable): + value_type = bool + entity = Person + definition_period = YEAR + default_value = False + label = "EMA incompatible course funding" + documentation = ( + "Record the selected scheme prohibition on paid course or placement, training " + "allowance or overlapping public support. This does not replace the remaining " + "course conditions. This is a supplied assessment or allocation fact, not " + "whole-programme eligibility." + ) + reference = ( + "https://www.gov.wales/sites/default/files/publications/2026-04/the-education-maintenance-allowance-wales-scheme-2026-2027.pdf", + "https://www.highland.gov.uk/downloads/file/962/ema-guidance-notes-2025-26", + "https://www.nidirect.gov.uk/sites/default/files/2026-06/ema-ni-application-notes-2627-e-o-PDF_0.pdf", + "https://www.nidirect.gov.uk/articles/education-maintenance-allowance-explained", + ) diff --git a/policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_institution_recommends_twentieth_year.py b/policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_institution_recommends_twentieth_year.py new file mode 100644 index 0000000000..47c7e46aeb --- /dev/null +++ b/policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_institution_recommends_twentieth_year.py @@ -0,0 +1,20 @@ +from policyengine_uk.model_api import * + + +class ema_institution_recommends_twentieth_year(Variable): + value_type = bool + entity = Person + definition_period = YEAR + default_value = False + label = "EMA institution recommends twentieth year" + documentation = ( + "True records the institution advice required by the Wales twentieth-birthday " + "route; it does not qualify every 20-year-old. This is a supplied assessment " + "or allocation fact, not whole-programme eligibility." + ) + reference = ( + "https://www.gov.wales/sites/default/files/publications/2026-04/the-education-maintenance-allowance-wales-scheme-2026-2027.pdf", + "https://www.highland.gov.uk/downloads/file/962/ema-guidance-notes-2025-26", + "https://www.nidirect.gov.uk/sites/default/files/2026-06/ema-ni-application-notes-2627-e-o-PDF_0.pdf", + "https://www.nidirect.gov.uk/articles/education-maintenance-allowance-explained", + ) diff --git a/policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_other_qualifying_dependants.py b/policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_other_qualifying_dependants.py new file mode 100644 index 0000000000..c016102b37 --- /dev/null +++ b/policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_other_qualifying_dependants.py @@ -0,0 +1,22 @@ +from policyengine_uk.model_api import * + + +class ema_other_qualifying_dependants(Variable): + value_type = int + entity = Person + definition_period = YEAR + default_value = 0 + quantity_type = STOCK + label = "Other qualifying dependants in the EMA assessment" + documentation = ( + "Exclude the applicant and use the selected scheme definition of other people " + "sharing the assessment income. Do not substitute generic household size or " + "children under 16. The assessment facts must establish the count. This is a " + "supplied assessment or allocation fact, not whole-programme eligibility." + ) + reference = ( + "https://www.gov.wales/sites/default/files/publications/2026-04/the-education-maintenance-allowance-wales-scheme-2026-2027.pdf", + "https://www.highland.gov.uk/downloads/file/962/ema-guidance-notes-2025-26", + "https://www.nidirect.gov.uk/sites/default/files/2026-06/ema-ni-application-notes-2627-e-o-PDF_0.pdf", + "https://www.nidirect.gov.uk/articles/education-maintenance-allowance-explained", + ) diff --git a/policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_payable_weeks.py b/policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_payable_weeks.py new file mode 100644 index 0000000000..869b45c53c --- /dev/null +++ b/policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_payable_weeks.py @@ -0,0 +1,24 @@ +from policyengine_uk.model_api import * + + +class ema_payable_weeks(Variable): + value_type = int + entity = Person + definition_period = YEAR + default_value = 0 + quantity_type = FLOW + label = "EMA payable weeks" + documentation = ( + "Actual lawfully payable weeks of this one academic assessment, allocated by " + "the caller to this exact requested model year. They must already respect " + "agreement, progress, authorised absence, holidays, application or backdating " + "and any reassessment timing. No automatic 52-week award or chronological " + "ledger is inferred; an earlier-year input is not a new allocation. This is a " + "supplied assessment or allocation fact, not whole-programme eligibility." + ) + reference = ( + "https://www.gov.wales/sites/default/files/publications/2026-04/the-education-maintenance-allowance-wales-scheme-2026-2027.pdf", + "https://www.highland.gov.uk/downloads/file/962/ema-guidance-notes-2025-26", + "https://www.nidirect.gov.uk/sites/default/files/2026-06/ema-ni-application-notes-2627-e-o-PDF_0.pdf", + "https://www.nidirect.gov.uk/articles/education-maintenance-allowance-explained", + ) diff --git a/policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_prior_positive_or_negative_confirmations.py b/policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_prior_positive_or_negative_confirmations.py new file mode 100644 index 0000000000..2cc7cb40b2 --- /dev/null +++ b/policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_prior_positive_or_negative_confirmations.py @@ -0,0 +1,24 @@ +from policyengine_uk.model_api import * + + +class ema_prior_positive_or_negative_confirmations(Variable): + value_type = int + entity = Person + definition_period = YEAR + default_value = -1 + quantity_type = STOCK + label = "EMA prior positive or negative confirmations" + documentation = ( + "Northern Ireland positive and negative weekly confirmations before the " + "allocated block, under the lifetime limit. Actual current payable weeks must " + "already exclude current negative confirmations and positives after " + "exhaustion; a total cannot reconstruct their order. Minus one is unknown. " + "This is a supplied assessment or allocation fact, not whole-programme " + "eligibility." + ) + reference = ( + "https://www.gov.wales/sites/default/files/publications/2026-04/the-education-maintenance-allowance-wales-scheme-2026-2027.pdf", + "https://www.highland.gov.uk/downloads/file/962/ema-guidance-notes-2025-26", + "https://www.nidirect.gov.uk/sites/default/files/2026-06/ema-ni-application-notes-2627-e-o-PDF_0.pdf", + "https://www.nidirect.gov.uk/articles/education-maintenance-allowance-explained", + ) diff --git a/policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_prior_supported_academic_years.py b/policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_prior_supported_academic_years.py new file mode 100644 index 0000000000..d992b240ce --- /dev/null +++ b/policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_prior_supported_academic_years.py @@ -0,0 +1,22 @@ +from policyengine_uk.model_api import * + + +class ema_prior_supported_academic_years(Variable): + value_type = int + entity = Person + definition_period = YEAR + default_value = -1 + quantity_type = STOCK + label = "EMA prior supported academic years" + documentation = ( + "Count source-defined prior supported academic years. Minus one means " + "unknown; zero means verified none. Do not infer this history from current " + "age. This is a supplied assessment or allocation fact, not whole-programme " + "eligibility." + ) + reference = ( + "https://www.gov.wales/sites/default/files/publications/2026-04/the-education-maintenance-allowance-wales-scheme-2026-2027.pdf", + "https://www.highland.gov.uk/downloads/file/962/ema-guidance-notes-2025-26", + "https://www.nidirect.gov.uk/sites/default/files/2026-06/ema-ni-application-notes-2627-e-o-PDF_0.pdf", + "https://www.nidirect.gov.uk/articles/education-maintenance-allowance-explained", + ) diff --git a/policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_provider_approved.py b/policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_provider_approved.py new file mode 100644 index 0000000000..e93503fa03 --- /dev/null +++ b/policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_provider_approved.py @@ -0,0 +1,21 @@ +from policyengine_uk.model_api import * + + +class ema_provider_approved(Variable): + value_type = bool + entity = Person + definition_period = YEAR + default_value = False + label = "EMA provider approved" + documentation = ( + "This factual approval includes the source-required institution and course " + "recognition or funding. It does not assert the age, income, duration, " + "attendance or residence conditions. This is a supplied assessment or " + "allocation fact, not whole-programme eligibility." + ) + reference = ( + "https://www.gov.wales/sites/default/files/publications/2026-04/the-education-maintenance-allowance-wales-scheme-2026-2027.pdf", + "https://www.highland.gov.uk/downloads/file/962/ema-guidance-notes-2025-26", + "https://www.nidirect.gov.uk/sites/default/files/2026-06/ema-ni-application-notes-2627-e-o-PDF_0.pdf", + "https://www.nidirect.gov.uk/articles/education-maintenance-allowance-explained", + ) diff --git a/policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_qualification_level.py b/policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_qualification_level.py new file mode 100644 index 0000000000..1dd8d8dab3 --- /dev/null +++ b/policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_qualification_level.py @@ -0,0 +1,21 @@ +from policyengine_uk.model_api import * + + +class ema_qualification_level(Variable): + value_type = int + entity = Person + definition_period = YEAR + default_value = -1 + quantity_type = STOCK + label = "EMA qualification level" + documentation = ( + "Actual qualification level; -1unknown/not applicable for separately approved " + "preparation route. This is a supplied assessment or allocation fact, not " + "whole-programme eligibility." + ) + reference = ( + "https://www.gov.wales/sites/default/files/publications/2026-04/the-education-maintenance-allowance-wales-scheme-2026-2027.pdf", + "https://www.highland.gov.uk/downloads/file/962/ema-guidance-notes-2025-26", + "https://www.nidirect.gov.uk/sites/default/files/2026-06/ema-ni-application-notes-2627-e-o-PDF_0.pdf", + "https://www.nidirect.gov.uk/articles/education-maintenance-allowance-explained", + ) diff --git a/policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_qualifying_bonus_count.py b/policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_qualifying_bonus_count.py new file mode 100644 index 0000000000..4f2a0f4ba2 --- /dev/null +++ b/policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_qualifying_bonus_count.py @@ -0,0 +1,23 @@ +from policyengine_uk.model_api import * + + +class ema_qualifying_bonus_count(Variable): + value_type = int + entity = Person + definition_period = YEAR + default_value = 0 + quantity_type = FLOW + label = "EMA qualifying bonus count" + documentation = ( + "Actual institution-qualified Northern Ireland bonuses allocated to this " + "exact cash year, including required objectives, signatures and timing. " + "January or June alone does not establish a bonus, and the caller must not " + "allocate the same earned bonus twice. This is a supplied assessment or " + "allocation fact, not whole-programme eligibility." + ) + reference = ( + "https://www.gov.wales/sites/default/files/publications/2026-04/the-education-maintenance-allowance-wales-scheme-2026-2027.pdf", + "https://www.highland.gov.uk/downloads/file/962/ema-guidance-notes-2025-26", + "https://www.nidirect.gov.uk/sites/default/files/2026-06/ema-ni-application-notes-2627-e-o-PDF_0.pdf", + "https://www.nidirect.gov.uk/articles/education-maintenance-allowance-explained", + ) diff --git a/policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_residency_conditions_met.py b/policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_residency_conditions_met.py new file mode 100644 index 0000000000..9bd9a2b5da --- /dev/null +++ b/policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_residency_conditions_met.py @@ -0,0 +1,21 @@ +from policyengine_uk.model_api import * + + +class ema_residency_conditions_met(Variable): + value_type = bool + entity = Person + definition_period = YEAR + default_value = False + label = "EMA residency conditions met" + documentation = ( + "This supplied determination covers the selected scheme nationality, " + "residence timing, temporary-absence and transitional categories. Current " + "household country or nationality alone does not establish it. This is a " + "supplied assessment or allocation fact, not whole-programme eligibility." + ) + reference = ( + "https://www.gov.wales/sites/default/files/publications/2026-04/the-education-maintenance-allowance-wales-scheme-2026-2027.pdf", + "https://www.highland.gov.uk/downloads/file/962/ema-guidance-notes-2025-26", + "https://www.nidirect.gov.uk/sites/default/files/2026-06/ema-ni-application-notes-2627-e-o-PDF_0.pdf", + "https://www.nidirect.gov.uk/articles/education-maintenance-allowance-explained", + ) diff --git a/policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_school_leaving_academic_year.py b/policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_school_leaving_academic_year.py new file mode 100644 index 0000000000..34ac3b77e6 --- /dev/null +++ b/policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_school_leaving_academic_year.py @@ -0,0 +1,22 @@ +from policyengine_uk.model_api import * + + +class ema_school_leaving_academic_year(Variable): + value_type = int + entity = Person + definition_period = YEAR + default_value = 0 + quantity_type = STOCK + label = "EMA school leaving academic year" + documentation = ( + "Wales uses an elapsed window from the academic year compulsory school age " + "ceased. This is not the number of awards already paid. Zero is unknown. This " + "is a supplied assessment or allocation fact, not whole-programme " + "eligibility." + ) + reference = ( + "https://www.gov.wales/sites/default/files/publications/2026-04/the-education-maintenance-allowance-wales-scheme-2026-2027.pdf", + "https://www.highland.gov.uk/downloads/file/962/ema-guidance-notes-2025-26", + "https://www.nidirect.gov.uk/sites/default/files/2026-06/ema-ni-application-notes-2627-e-o-PDF_0.pdf", + "https://www.nidirect.gov.uk/articles/education-maintenance-allowance-explained", + ) diff --git a/policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_scotland_highland_school.py b/policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_scotland_highland_school.py new file mode 100644 index 0000000000..0fd0478edd --- /dev/null +++ b/policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_scotland_highland_school.py @@ -0,0 +1,21 @@ +from policyengine_uk.model_api import * + + +class ema_scotland_highland_school(Variable): + value_type = bool + entity = Person + definition_period = YEAR + default_value = False + label = "EMA scotland highland school" + documentation = ( + "True selects only the source-audited Highland school EMA route for 2026/27. " + "Other Scottish councils, colleges, home-education and action-plan routes are " + "not inferred from residence or general course approval. This is a supplied " + "assessment or allocation fact, not whole-programme eligibility." + ) + reference = ( + "https://www.gov.wales/sites/default/files/publications/2026-04/the-education-maintenance-allowance-wales-scheme-2026-2027.pdf", + "https://www.highland.gov.uk/downloads/file/962/ema-guidance-notes-2025-26", + "https://www.nidirect.gov.uk/sites/default/files/2026-06/ema-ni-application-notes-2627-e-o-PDF_0.pdf", + "https://www.nidirect.gov.uk/articles/education-maintenance-allowance-explained", + ) diff --git a/policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_supported_years_in_previous_three.py b/policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_supported_years_in_previous_three.py new file mode 100644 index 0000000000..067e86293b --- /dev/null +++ b/policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_supported_years_in_previous_three.py @@ -0,0 +1,22 @@ +from policyengine_uk.model_api import * + + +class ema_supported_years_in_previous_three(Variable): + value_type = int + entity = Person + definition_period = YEAR + default_value = -1 + quantity_type = STOCK + label = "EMA supported years in previous three" + documentation = ( + "Count receipt in the three academic years before this assessment, for the " + "Wales twentieth-birthday route. Minus one is unknown; zero is verified no " + "receipt. This is a supplied assessment or allocation fact, not " + "whole-programme eligibility." + ) + reference = ( + "https://www.gov.wales/sites/default/files/publications/2026-04/the-education-maintenance-allowance-wales-scheme-2026-2027.pdf", + "https://www.highland.gov.uk/downloads/file/962/ema-guidance-notes-2025-26", + "https://www.nidirect.gov.uk/sites/default/files/2026-06/ema-ni-application-notes-2627-e-o-PDF_0.pdf", + "https://www.nidirect.gov.uk/articles/education-maintenance-allowance-explained", + ) diff --git a/policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_weekly_award.py b/policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_weekly_award.py new file mode 100644 index 0000000000..87311ce014 --- /dev/null +++ b/policyengine_uk/variables/gov/dfe/education_maintenance_allowance/ema_weekly_award.py @@ -0,0 +1,124 @@ +from policyengine_uk.model_api import * +from policyengine_uk.variables.household.demographic.country import Country + + +def ema_parameters(parameters, period): + """Read the fixed source-cohort rules independently of the cash year.""" + anchor = parameters( + period + ).gov.dfe.education_maintenance_allowance.assessment_rule_anchor_date + anchor_date = ( + f"{anchor // 10000:04d}-{(anchor // 100) % 100:02d}-{anchor % 100:02d}" + ) + rules = parameters(anchor_date).gov + return ( + rules.dfe.education_maintenance_allowance, + rules.welsh_government.education_maintenance_allowance, + rules.scottish_government.education_maintenance_allowance, + rules.northern_ireland.dfe.education_maintenance_allowance, + ) + + +def ema_routes(person, period, shared): + """Source-supported assessment and provider routes; no population imputation.""" + country = person("ema_assessment_country", period) + supported = person("ema_academic_year", period) == shared.supported_academic_year + return ( + supported & (country == Country.WALES), + supported + & (country == Country.SCOTLAND) + & person("ema_scotland_highland_school", period), + supported & (country == Country.NORTHERN_IRELAND), + ) + + +def valid_ema_date(value): + """Validate YYYYMMDD using Gregorian calendar constants, not an imputed age.""" + year = value // 10000 + month = (value // 100) % 100 + day = value % 100 + leap = (year % 4 == 0) & ((year % 100 != 0) | (year % 400 == 0)) + days = np.select( + [month == 2, np.isin(month, [4, 6, 9, 11])], [28 + leap, 30], default=31 + ) + return ( + (year >= 1) + & (year <= 9999) + & (month >= 1) + & (month <= 12) + & (day >= 1) + & (day <= days) + ) + + +def wales_birth_routes(person, period, shared, wales): + birth = person("ema_date_of_birth", period) + supplied_start = person("ema_academic_year_start_date", period) + start = where(supplied_start == 0, wales.academic_start_date, supplied_start) + start_valid = ( + valid_ema_date(start) + & (start // 10000 == shared.supported_academic_year) + & (start <= wales.academic_start_date) + ) + year = start // 10000 + month_day = start % 10000 + ordinary = ( + birth >= (year - wales.maximum_ordinary_birthday) * 10000 + month_day + ) & (birth < (year + 1 - wales.minimum_ordinary_birthday) * 10000 + month_day) + twentieth = (birth >= (year - wales.extended_birthday) * 10000 + month_day) & ( + birth < (year + 1 - wales.extended_birthday) * 10000 + month_day + ) + prior = person("ema_supported_years_in_previous_three", period) + twentieth &= ( + (prior >= wales.minimum_prior_receipt_years) + & (prior <= wales.maximum_prior_receipt_years) + & person("ema_institution_recommends_twentieth_year", period) + ) + valid = valid_ema_date(birth) & start_valid + return valid & ordinary, valid & twentieth, start + + +def exact_ema_allocation(person, period, name): + """Read only a receipt allocation genuinely supplied for this exact period.""" + holder = person.get_holder(name) + if period not in holder.get_input_periods(person.simulation.branch_name): + return person.empty_array() + return max_(0, person(name, period)) + + +class ema_weekly_award(Variable): + value_type = float + entity = Person + definition_period = YEAR + default_value = 0 + quantity_type = STOCK + unit = GBP + label = "EMA weekly award" + documentation = ( + "Weekly award for one explicit source-supported academic assessment, separate " + "from the actual weeks paid in a requested model year. This is a stock " + "assessment amount; it is not divided by 12 on a monthly query." + ) + reference = ( + "https://www.gov.wales/sites/default/files/publications/2026-04/the-education-maintenance-allowance-wales-scheme-2026-2027.pdf", + "https://www.highland.gov.uk/downloads/file/962/ema-guidance-notes-2025-26", + "https://www.nidirect.gov.uk/sites/default/files/2026-06/ema-ni-application-notes-2627-e-o-PDF_0.pdf", + "https://www.nidirect.gov.uk/articles/education-maintenance-allowance-explained", + ) + + def formula(person, period, parameters): + shared, wales, scotland, ni = ema_parameters(parameters, period) + in_wales, in_scotland, in_ni = ema_routes(person, period, shared) + eligible = ( + person("ema_age_eligible", period) + & person("ema_course_eligible", period) + & person("ema_duration_eligible", period) + & person("ema_income_eligible", period) + & person("ema_residency_conditions_met", period) + ) + rate = select( + [in_wales, in_scotland, in_ni], + [wales.weekly_amount, scotland.weekly_amount, ni.weekly_amount], + default=0, + ) + return eligible * rate diff --git a/policyengine_uk/variables/gov/gov_spending.py b/policyengine_uk/variables/gov/gov_spending.py index f8ff6bd218..81029811e9 100644 --- a/policyengine_uk/variables/gov/gov_spending.py +++ b/policyengine_uk/variables/gov/gov_spending.py @@ -61,6 +61,7 @@ "carer_support_payment", "scottish_carer_supplement", "disability_basic_income", + "education_maintenance_allowance", ] diff --git a/policyengine_uk/variables/household/income/hbai_household_net_income.py b/policyengine_uk/variables/household/income/hbai_household_net_income.py index 734f3d6b91..18bf2f5542 100644 --- a/policyengine_uk/variables/household/income/hbai_household_net_income.py +++ b/policyengine_uk/variables/household/income/hbai_household_net_income.py @@ -39,6 +39,8 @@ "universal_credit", "working_tax_credit", "child_tax_credit", + # HBAI includes education grants separately from state support. + "education_maintenance_allowance", "attendance_allowance", "afcs", "bsp",