PolicyEngine / PolicyEngine/policyengine-uk
Use April dates for uprating indices to align with UK fiscal year
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 50
- Forks
- 33
- Avg merge
- 20h 58m
- Merged PRs (30d)
- 14
Description
Context
UK benefits and tax thresholds are typically uprated in April (fiscal year start), based on September CPI of the prior year. However, the current uprating system uses January 1 dates throughout.
Current Implementation
- OBR indices stored at January 1 dates (annual calendar year forecasts) in
yoy_growth.yaml create_economic_assumption_indices.pygenerates indices at January 1 dates (line 53:f"{year}-01-01")uprate_parametersin policyengine-core adds new parameter values at the same dates as the uprating indexconvert_to_fiscal_year_parameterspost-processes by sampling at April 30 and setting that as the year value
This works for annual simulations but has limitations:
- Intra-year queries don't reflect the actual April uprating date
- The fiscal year conversion is a workaround rather than correct modeling
- Parameters show January 1 dates in values_list even though actual policy changes April 6
Ideal Approach
- Store/generate uprating indices at April 1 or April 6 dates (representing fiscal years)
- Uprating would then naturally produce values at April dates
- Remove the fiscal year conversion post-processing step
This would:
- Be more accurate (uprating happens at the correct date)
- Eliminate the
convert_to_fiscal_year_parametersworkaround - Handle mid-year policy changes correctly by default
- Allow specific date queries to work properly (e.g.,
param("2026-03-15")vsparam("2026-05-15"))
Implementation Notes
Would require changes to:
policyengine_uk/parameters/gov/economic_assumptions/yoy_growth.yaml- change dates from January 1 to April 1/6policyengine_uk/parameters/gov/economic_assumptions/create_economic_assumption_indices.py- generate at April dates- Potentially
policyengine-core'suprate_parametersif any assumptions about January dates - Remove or modify
convert_to_fiscal_year_parametersinutils/parameters.py
Priority
Low - current approach works correctly for annual simulations after PR #1435 extended the fiscal year conversion range. This is an enhancement for more accurate intra-year modeling.
Related
- PR #1435: Extended fiscal year conversion range to 2040
- Issue #1436: On-the-fly fiscal year conversion (alternative approach)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with policyengine_uk/parameters/gov/economic_assumptions/yoy_growth.yaml, create_economic_assumption_indices.py, and utils/parameters.py; then inspect policyengine-core's uprate_parameters and related PR #1435. Verify whether April 1 or April 6 is appropriate, and check issue #1436 for the alternative. Done means indices and parameter values use the intended April dates without the fiscal-year conversion workaround, while intra-year queries distinguish before and after uprating.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100