Repository navigation
Bring the growth factors page into line with the uprating map - #2779
Conversation
Fixes #2778 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
juaristi22
left a comment
There was a problem hiding this comment.
Reviewed ac9e5c658c42559d71034b91042e689239764e55. One nonblocking documentation point remains.
A1 — Qualify the water/rent projection horizon. The new water paragraph at growthfactors.md:154 describes Scottish Water growth and flat supplied Northern Ireland charges without a horizon. Those country-specific dataset routes stop at 2032. From 2033 Core uses the water variable's Ofwat index in every country; rent has no class-level index and holds at its last materialized value. Please add a short horizon/fallback qualification to this paragraph and the rewritten Rent section.
All 127 mapped names are under their correct indices, and all 191 checked table cells match the parameter YAML to the displayed precision. Only documentation/changelog change. This is a documentation correction; no model defect or material evidence gap was found. Documentation, Lint, Fix evidence and Result checks passed at this head; skipped model jobs are not counted as executed tests.
|
Picking this up for the UK hub. Reply here if you're mid-change and I'll stop. Generated by Claude Code |
The dataset projection carries the country water routes and the tenure rent routes to 2032. From 2033 Core grows water charges by the Ofwat index in every country until that index stops in 2039, and holds rent. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LwQq6HXy8MjqHUMEtSD65y
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LwQq6HXy8MjqHUMEtSD65y
Main added seven gambling duty base series to uprating_indices.yaml, so the page gains a section that lists each duty's names and rates. Main also derives where the indices end, so the Ofwat index now grows to 2074. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LwQq6HXy8MjqHUMEtSD65y
|
Generated by Claude Code |
|
Generated by Claude Code |
|
Ready for hub review Head Step 1: where each route stops (code read at
|
| Route | Where its series ends | Last year | Later years |
|---|---|---|---|
Water, England and Wales (ofwat.water_bills) |
extend_single_year_dataset stops at PROJECTION_END_YEAR = 2032 (policyengine_uk/data/economic_assumptions.py:172, applied at :355); uprate_water_and_sewerage_charges at :758 |
2032 (2029's 5.0% rate holds for 2030–2032) | Core grows the stored 2032 value by indices.ofwat.water_bills (water_and_sewerage_charges.py:10; Core simulation.py:1832–1871) |
Water, Scotland (scottish_water.water_bills) |
same, :758 |
2032 (4.1% held from 2029) | the Ofwat index, as above (COUNTRY_UPRATED_INPUTS, :110, keeps the dataset step from also applying it before 2033) |
Water, Northern Ireland (None, held flat) |
same, :104 |
2032 | grows by the Ofwat index from 2033 |
Rent (uprate_rent, :792: ons.private_rental_prices.<region> for private renters, obr.social_rent otherwise) |
same PROJECTION_END_YEAR |
2032 (2031 rates, 2.6% UK private and 3.0% social, hold for 2032) | rent declares no uprating, so Core's auto-carry-over (Core simulation.py:1878) holds the 2032 value |
| Ofwat index itself | create_economic_assumption_indices.py:75 compounds to growth_horizon (:21), the last year any yoy_growth series covers |
2074 | flat from 2075 |
The default capital gains projection (legacy_gdp_per_capita) sets no end_year, so the horizon falls to 2032. A finite CGT scenario can shorten it (:355).
Households. I built 8 hand-made households (London, Wales, Scotland and Northern Ireland, each one private and one council renter), with £500 water and £10,000 rent in 2031, and ran them through Microsimulation. The dataset materialised years [2031, 2032].
| water 2031 | 2032 | 2033 | 2034 | 2073 | 2074 | 2075 | rent 2031 | 2032 | 2033 | 2075 | |
|---|---|---|---|---|---|---|---|---|---|---|---|
| London / Wales, private | 500.00 | 525.00 | 551.25 | 578.81 | 3,880.80 | 4,074.84 | 4,074.84 | 10,000 | 10,260 | 10,260 | 10,260 |
| Scotland, private | 500.00 | 520.50 | 546.52 | 573.85 | 3,847.53 | 4,039.91 | 4,039.91 | 10,000 | 10,260 | 10,260 | 10,260 |
| Northern Ireland, private | 500.00 | 500.00 | 525.00 | 551.25 | 3,696.00 | 3,880.80 | 3,880.80 | 10,000 | 10,260 | 10,260 | 10,260 |
| Social rows (same water) | 10,000 | 10,300 | 10,300 | 10,300 |
So in 2033 Scotland and Northern Ireland both switch to Ofwat's 5%, and rent stops moving.
Where the code differs from the review. On ac9e5c658 the review's account holds, plus one detail: the Ofwat index compounded only to 2039 (range(start_year + 1, 2040)), so water held from 2040. I measured this before the merge: water was 738.72 in 2039, 2040 and 2041. Main's #2756 (cb4ab7ba) now derives the horizon, so at the final head the index runs to 2074. The page states the final-head behaviour.
Step 2: page (docs/book/assumptions/growthfactors.md)
:154(water) adds two sentences: the country routes run to 2032; from 2033 Core grows every household's charges by the Ofwat index, Scotland and Northern Ireland included; the index grows to 2074 and charges hold from 2075.:197(Rent) adds: both series run to 2032, which takes each series' 2031 rate; from 2033rentholds at its 2032 value because the variable declares no uprating index.
Step 3: merge main
c29ca80a merges origin/main at 52b30809 with no conflicts. Since ac9e5c658, main changed:
uprating_indices.yaml: Project the gambling duty bases with the OBR's October 2026 betting and gaming forecast #2761 added 7obr.per_capita.gambling_duty_bases.*indices with 13 names, and Keep stored household ISA totals after 2032 #2781 changed only a comment.yoy_growth.yaml: the 7 gambling series.economic_assumptions.py: Keep stored household ISA totals after 2032 #2781'sSTORED_HOUSEHOLD_TOTALS, which leaves the rent and water code unchanged.create_economic_assumption_indices.py: Derive economic assumption index horizon from the growth series #2756's derived horizon, described above.
Main did not change growthfactors.md. Fixes in 529b5e9d:
- I added a
## Gambling duty basessection at:214, with a 2025–2031 table fromyoy_growth.yamland each duty's names in a list. - I changed the water sentence's 2039 to 2074.
Tests at 529b5e9d
- Docs build (
make documentation, aspr_docs_changes.yamlruns it): not run to completion.jupyter book build --htmlfails because the session's egress policy refusesapi.mystmd.org:443("Problem with template link … 403 Forbidden"; proxy:connect_rejected). The Documentation check will need to run in CI. - Body's check (uncommitted script):
At
names: 143 found, 0 missing, 143 in map, 22 indices read from the loaded parameters, not the YAML: ['obr.lagged_average_earnings', 'obr.private_pension_index'] tables: 28 rows, 240 cells checked, 0 mismatches, 15 exact .x5 ties shown either way; rows mapped but absent: []ac9e5c658the same script gives 127 found, 0 missing, and 191 cells with 0 mismatches. Those counts match the review's. check_fix_pr.pyon the posted title and body, run as the workflow runs it:Fix evidence: PASS … Not a fix PR, exit 0.uvx ruff@0.17.2 format --check .: 2174 files already formatted.ruff check .and--select F811,F821 policyengine_uk: all checks passed.git diff --check ac9e5c658..HEAD: clean.git merge-tree --write-tree --name-only HEAD origin/main(main52b30809): tree86ea893c…, no conflicts, exit 0.uv run pytest policyengine_uk/tests/code_health -n 4: 3091 passed.- Mutation and revert checks: none apply, because this change touches documentation only.
Skipped
- Survey-dataset tests (no private data).
- The full suite, which CI covers.
Judgment calls
-
Rounding ties in the check. Fifteen cells sit exactly on a .x5 value, and the page rounds them both ways (e.g. 1.2985 → 129.9%, 0.0065 → 0.6%). The check accepts a cell within half a unit of the exact decimal value. I left those pre-existing cells unchanged.
-
Derived parameters.
lagged_average_earningsandprivate_pension_indexhave no YAML values; the build derives them. The check reads them from the loaded parameters. -
PR body. Besides the new horizon line, I corrected three stale facts the merge created:
- 29/127 names became 42/143;
- "127 found" became "143 found";
- the "Adds sections" line now names gambling duty bases.
Without these, the body would misstate the head.
-
Gambling Duty 2026 cell. It shows 0.0% for −0.000114, not −0.0%.
-
Scope. The page describes dataset projection. Inputs given directly in a situation grow by the Ofwat index in every country from the first year (checked: Scotland and Northern Ireland £500 in 2030 → £525.00 in 2031), and their rent carries flat. I did not add this to the page, so the edit stays within two sentences per section.
Generated by Claude Code
The water paragraph's last sentence gave two facts in one; the rent and gambling duty sentences now name who applies each rate, in place of a dangling "which takes" and a be-verb definition. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
juaristi22
left a comment
There was a problem hiding this comment.
Re-reviewed exact head af3758c642827f2d5c22ab711799fc707e601ec0. Review COMPLETE, with no material evidence gaps. A1 is resolved: the adopted page now distinguishes the dataset projection through 2032 from later Core water/rent behavior, and the Ofwat horizon agrees with pinned Core 3.34.1.
S1 — Correct or omit the added-name count in the actual PR description. It says the page adds 42 names; the current base-to-head comparison adds 45 (29 other names plus 16 gambling bases). The page itself correctly contains all 143 mapped names.
Independent checks passed for 143 names and 240 table cells, plus the 2074/2075 index boundary. The separate branch and author hand-off were not substituted for the adopted head. No model test suite was rerun for this documentation-only change.
Approval is withheld while S1 remains; the rest of the documentation review is complete.
|
The description now says 45: the page at the base names 98 of the 143, and the head names all 143. 🤖 Generated with Claude Code |
juaristi22
left a comment
There was a problem hiding this comment.
Re-reviewed af3758c642827f2d5c22ab711799fc707e601ec0. COMPLETE; no open findings or material gaps.
S1 is resolved: the actual description now says 45 newly documented names, matching the retained independent check (143 total names, 98 previously documented). A1 remains resolved. The reviewed documentation and code dependencies are unchanged, so the prior 143-name/240-table-cell validation remains applicable; no model or documentation build was rerun for this description-only fix.
The PR is ready and current-head required checks pass. Approving this head.
Fixes #2778
axiom: n/a: documentation only
This corrects
docs/book/assumptions/growthfactors.mdand changes no model code.Moves the capital gains variables to a new section on their own index, and the two property values to a new house prices section.
Adds the 45 names the page omitted, so each of the 143 names in
uprating_indices.yamlnow sits under its own index.Corrects the road fuel table for 2028 to 2031.
Rewrites the Rent section around what
uprate_rentdoes: private rents by region, every other rent byobr.social_rent. The old table showedobr.rent, which projects no rent.Adds sections for Northern Ireland domestic rates, water and sewerage charges, gambling duty bases and rail usage, with tables from
yoy_growth.yaml.States that the OBR stops forecasting mortgage interest after 2029, how
council_tax_benefit_reportedgrows, howemployee_pension_contributions_reportedgrows, and that the student loan routes apply only to new loans.States where the water and rent routes stop: both run to the end of the dataset projection in 2032. From 2033 policyengine-core grows water charges in every country by the Ofwat index, which compounds to 2074, and holds
rentat its 2032 value.We checked the result with a script that reads each name in the map and looks for it in the section of its index (143 found, 0 missing), and compared every other table on the page with
yoy_growth.yamlto one decimal place.#2131 and #2638 edit the per capita GDP list too. The second to merge keeps the names from both.
🤖 Generated with Claude Code