Skip to content

Rerun on policyengine 6.10.2 and certified Microcosm data; fix the intro's fare-reduction figure - #12

Draft
vahid-ahmadi wants to merge 2 commits into
mainfrom
rerun-microcosm-latest
Draft

vahid-ahmadi wants to merge 2 commits into
mainfrom
rerun-microcosm-latest

Conversation

@vahid-ahmadi

@vahid-ahmadi vahid-ahmadi commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Reruns the analysis on the latest policyengine release and its certified Microcosm UK dataset. Draft for review; not for merge until the open items below are settled.

Versions

Before (main) After
Stack policyengine-uk direct policyengine.py managed_microsimulation
policyengine >=4.17.10 (unused for the default run) 6.10.2 (uv.lock)
policyengine-uk 2.89.3 (direct pin) 2.132.6 (pinned by the bundle; direct pin dropped)
Dataset enhanced_frs_2024_25.h5 @ 32543d45 microcosm_uk_2024_25 @ microcosm-uk-2024-25-national-20261019T083323Z-6cba5d71 (sha256 810ba980…1ece)

Two newer Microcosm UK national builds exist on Hugging Face (…20261021T195620Z-a858c100, …20261023T075039Z-a133f37a) but are not certified by any policyengine release, so this PR uses the certified build. The results JSON and the methodology tab now state the policyengine and policyengine-uk versions and the dataset name, revision and SHA-256.

What changed in the code

  • _load_sim() always uses pe.uk.managed_microsimulation(); the Enhanced FRS and BUS_FARE_CAP_POPULACE paths are removed. The token falls back to a saved Hugging Face login.
  • Counterfactual override. In policyengine-uk 2.132.6, current law already contains the announced £2 cap from 1 January 2027 (gov.dft.bus.fares.cap), and person_bus_fare_spending prices imputed journeys (trips × boardings × DfT yield per boarding, single tickets at the cap in force). Running the pipeline unchanged would apply 12.5% to a base that already reflects the £2 cap. The simulation therefore holds the cap at £3 over the model's 2027 cap year (which runs to 5 April 2028). The model's representative uncapped single fare is £2.748, so a £3 cap does not bind and this base equals uncapped fares.
  • Methodology, baseline and announcement text, sources.py descriptions and the README now describe journey pricing rather than LCFS imputation calibrated to DfT, and label the DfT totals as benchmarks rather than calibration targets.

Old vs new

Figure Old (eFRS) New (Microcosm) Change
Cost vs funding expiry (headline) £409m £531m +29.8%
Range £354m–£463m £460m–£602m +30%
£3-to-£2 fare reduction £273m £354m +29.7%
Fare spending base, England outside London £2.182bn £2.834bn +29.9%
Average household, vs funding expiry £18.2/yr £25.5/yr +40.2%
Average household, fare reduction £12.15/yr £17.03/yr +40.2%
People potentially affected 14.34m 37.99m +164.9%
UK bus fare spending £4.23bn £4.89bn +15.5%
UK bus subsidy £3.58bn £3.66bn +2.4%
UK population 70.23m 69.95m -0.4%

Fare reduction cost by income quintile (£m): Q1 84→96, Q2 82→71, Q3 61→65, Q4 35→65, Q5 11→57.
By region (£m): North West 41→64, South East 63→64, West Midlands 31→59, Yorkshire 42→45, South West 25→36, East Midlands 25→30, East of England 19→30, North East 27→26.
By family type (£m): couple with children 54→123, single 109→110, couple no children 105→64, lone parent 5→57.
By age: 65+ share of baseline fares 20.6%→1.1%; 0–15 share 6.1%→12.3%.

Why the figures moved

  • Fare base +30%. The base is now priced at £3-cap (effectively uncapped) single fares of £2.748, against 2024-25 yields earned mostly under the £2 cap. The model adds about £0.55 per single boarding over the 2024-25 reference fare, with a modelled single-ticket share of about 0.87. The model's own current-law base for 2027 (with the £2 cap) is £2.278bn, close to the old £2.182bn and to DfT's £2.07bn outside-London receipts for 2024-25. All cost figures scale with this base, since the 12.5% and 8.3% assumptions are unchanged.
  • Average household +40%. Larger base, and fewer weighted households in the policy geography.
  • People affected +165%. Microcosm gives every person imputed local-bus trips (the lowest use band carries about 3 trips a year; no one has zero), so everyone not eligible for a concessionary pass has some modelled fare spending. The old figure counted people in households with LCFS-reported bus spending. The definition in the code is unchanged, but the figure is no longer comparable; 14.7m people in the policy geography make more than 12 trips a year.
  • Distribution. Concessionary pass holders now pay nothing (65+ falls to near zero; under-5s are zero), and journey-based pricing gives a flatter income gradient (Q1/Q5 cost ratio 1.7 against 7.6 before).

Open items for review

  1. Method choice. The model now prices the cap structurally. Its own £2-cap effect for the 2027 cap year (£2 cap from 6 April to 31 December, uncapped from 1 January to 5 April 2028) is £556m in England outside London, about £750m on a full-year basis, which is roughly double the 12.5% method on the same base. This PR keeps the published 12.5% method. Whether to switch to the in-model cap, or to keep 12.5% on this base, needs a decision.
  2. People affected (38.0m). Not comparable with 14.34m and inflated by the imputed trip floor. It should be redefined or caveated before merge; this PR does not patch it.
  3. The 8.3% cap-existence wedge has no in-model support, because a £3 cap does not bind in policyengine-uk.
  4. The intro sentence about 6.3% is left for PR Fix intro fare-reduction figure to match the 12.5% the pipeline applies #11.

Checks

  • pytest: 9 passed (adds a provenance test)
  • ruff check / ruff format --check: clean
  • bun run build: succeeded
  • Rendered locally with headless Chrome and checked the screenshots: headline cards on both tabs, the announcement chart for every measure × breakdown, the baseline chart for every breakdown, and the methodology tab. All charts render; no console errors.

Also in this PR: the intro's fare-reduction figure (was #11)

The live page's introduction said the estimate "applies DfT's observed 6.3% all-ticket reduction", while the methodology says "We apply a 12.5% all-ticket reduction (range 10–15%)". The pipeline applies 12.5% (src/bus_fare_cap/sources.py:45-47, used at pipeline.py:196). The introduction now gives 12.5% and names DfT's 6.3% as the figure it is derived from. This text change moves no numbers and applies to the old and new data alike.

Against official benchmarks

Benchmark Official Before (eFRS) After (Microcosm)
UK bus fare spending £4.02bn £4.23bn (+5%) £4.89bn (+22%)
UK bus subsidy £3.55bn £3.58bn (+1%) £3.66bn (+3%)
UK population (weights) 68.3m 70.2m (+3%) 69.9m (+2%)
Cost of the £2 cap £400m funding backs the cap (£454m total extra; >£500m reported by PA) £409m £531m (£460m–£602m)
People paying bus fares no official count 19.4m 48.5m

Sources:

  • Fare spending: DfT Annual Bus Statistics BUS05aii, £3.4bn of England fare receipts (year to March 2025), uplifted to the UK by population (×1.18).
  • Subsidy: DfT BUS05bii, £3.0bn of net government support in England, uplifted the same way.
  • Funding: the 22 July 2026 announcement.

The previous run sits closer to every benchmark:

  • Fare spending. Microcosm overstates DfT fare receipts by 22%, against 5% before. That gap explains most of the 30% rise in cost: every trip is priced at the assumed uncapped £2.748 single fare (gov.dft.bus.uncapped_single_fare).
  • Fare payers. 48.5m fare payers is 71% of the UK population. That does not fit NTS0705a, which puts the top income quintile at 13 local bus trips a year. It follows from Microcosm's floor of about 3 trips a year per person, which also drives "people affected" to 38.0m.
  • Subsidy and population. Both runs match these, so the gap is in fare spending, not in the weights.

Recommendation: keep this PR in draft and do not publish it before the Budget. The fix belongs upstream: calibrate fare spending to DfT receipts in Microcosm or policyengine-uk, and drop the trip floor. Then rerun.

🤖 Generated with Claude Code

Make managed_microsimulation on the bundle-certified microcosm_uk_2024_25
build the only simulation path, holding the £3 cap all year because
policyengine-uk 2.132.6 current law already applies the £2 cap from 2027.
Drop the direct policyengine-uk pin, add uv.lock, record model and data
provenance in the results JSON and on the page, regenerate results and
update methodology text.

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

vercel Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
bus-fare-cap Ready Ready Preview Oct 24, 2026 11:08am UTC

Request Review

The intro said the estimate applies DfT's observed 6.3% all-ticket
reduction; the pipeline applies the derived 12.5% (range 10-15%), as the
Announcement and Methodology tabs already say. Keep 6.3% as the observed
evaluation figure the 12.5% is derived from.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vahid-ahmadi vahid-ahmadi changed the title Rerun on policyengine 6.10.2 and certified Microcosm UK data Rerun on policyengine 6.10.2 and certified Microcosm data; fix the intro's fare-reduction figure Oct 24, 2026
@juaristi22

Copy link
Copy Markdown

@vahid-ahmadi this re-runs the PR on the certified data and checks the fare base against the published receipts. The base is too high, but most of the +22% in "Against official benchmarks" comes from comparing different things. With matching cap rules, the model is 4.2% above the published receipts for the UK without Wales, and 6.8% above for England outside London.

Reproduction. On policyengine 6.10.2, policyengine-uk 2.132.6 and microcosm_uk_2024_25 at microcosm-uk-2024-25-national-20261019T083323Z-6cba5d71 (sha256 checked), the PR's figures reproduce: £2,278m current-law base outside London, £2,834m counterfactual base, £4.89bn UK fare spending, 48.5m fare payers and 38.0m people affected.

Like-for-like comparison

Model year 2024 under current law applies the FY2024-25 cap schedule (£2 to 31 December 2024, then £3). That is the regime behind the published receipts.

Series Model, 2024 Published, FY2024-25 Gap
London buses (all residents' trips) £1,374m £1,347m (BUS05ai) +2.0%
Other local bus, England outside London £2,210m £2,070m (BUS05ai) +6.8%
Scotland £390m £391m (Scottish Transport Statistics) −0.2%
Northern Ireland £152m £150m (DfI) +1.2%
Wales £128m none –
UK without Wales £4.13bn £3.96bn +4.2%

Boardings match BUS01a: 1,844m against 1,851m outside London, and 1,850m against 1,821m on London buses. Subsidy and population also match. So the weights and the journeys are right, and the gap outside London is in the fare-paying share (2 below).

Bridge from £4.02bn to £4.89bn

  • +£0.56bn: no-cap pricing of the 2027 counterfactual (1).
  • +£0.17bn: the like-for-like overstatement above, of which £0.13bn is the concessionary mismatch outside London (2).
  • +£0.06bn: population growth from 2024 to 2027.
  • +£0.14bn: Wales, which has no published receipts.
  • −£0.07bn: England × 1.18 is above the sum of the published nation receipts (£3.96bn without Wales).

For the policy base outside London (£2,834m against £2,070m, +£764m):

  • £524m (69%): the no-cap add-back (1).
  • £169m (22%): the concessionary mismatch (2). This is £136m at the published yield, plus £34m of add-back on those boardings.
  • £41m (5%): London bus trips (3).
  • £31m (4%): population growth.

Causes

1. The £3-cap counterfactual is priced as no cap (policyengine-uk)

  • gov.dft.bus.uncapped_single_fare gives every single ticket one fare of £2.748. The value is solved from the FY2024-25 BUS05bi fare-cap grant (£515.7m) and a 0.70 single-ticket share. A £3 cap does not bind at £2.748. So the "£3 cap all year" base is an uncapped base, and it adds the whole grant back.
  • BUS05ai receipts exclude the grant (BUS05bi lists it as support), so nothing counts twice. But the published receipts are capped receipts. The headline comparison therefore sets uncapped prices against capped receipts.
  • The add-back applies only to single-ticket boardings. Their boarding-weighted share is 0.70, the share the derivation uses, so at published volumes the add-back equals the grant. The 0.87 in the PR body is the person-weighted mean (0.865). It does not drive the cost.
  • Current law has the same feature. policyengine-uk 2.132.6 raises fares outside London by 25% from 2024 to 2025 (£2,244m to £2,813m), because the £3 cap of 2025-26 does not bind either. DfT's fares index for England outside London (BUS0415) rises 11.2% from the FY2024-25 mean to the calendar-2025 mean.
  • The anchor moves between years. The BUS05bi fare-cap line outside London is £279.0m for FY2023-24 (a full year at £2) and £515.7m for FY2024-25 (nine months at £2, three at £3). The derivation gives all of FY2024-25 to the £2 months. This values a full year of the £2 cap against no cap at £697m at published volumes. The £151m that sources.py cites for the 2025 £3 cap has no counterpart in the model.
  • Open item 1 inherits this. The in-model £2 cap (£556m for the 2027 cap year) comes from the same representative fare.

2. Two definitions of concessionary boardings outside London (Microcosm and policyengine-uk)

  • The yield is receipts over non-concessionary boardings, y = R / (B − C). Outside London, C is the BUS01c "total concessionary" count: 519.1m boardings, of which 402.8m are older and disabled and 116.3m are other concessions.
  • Microcosm's assign_bus_pass_eligibility makes only people aged 66 and over, or under 5, travel free outside London. That is 420m boardings.
  • So about 99m boardings that the yield removes as concessionary are priced as fare-paying. Fare-paying boardings are 1,417m in the model against 1,331m published (+6.5%). This adds £134m in FY2024-25 terms.
  • The stage declaration says disabled passes and child half-fares "are absorbed by the yield". The yield cannot absorb them, because its denominator already excludes them.
  • The London rule (60 and over, or under 18) and the Scotland rule (60 and over, or under 22) match their concessionary counts: 504m eligible London boardings against 498m. Only the rule outside London is out of line.
  • The fix is being scoped separately: which repository, and whether to change the yield or the eligibility.

3. London bus trips in the policy base (this dashboard)

  • The pipeline sums person_bus_fare_spending over residents of England outside London. That sum includes their London bus trips at London fares: £41m in 2027. The cap does not cover London buses.
  • Recommendation: fix this in this PR. Build the policy base from the other-local-bus series only. For example, leave out the London term of the pricing (bus_in_london_trips × boardings_per_trip.LONDON × yield_per_boarding.LONDON for fare payers), or price other_local_bus_trips on its own. This lowers the base by 1.4% before any other change.

4. The trip floor (Microcosm nts_bus_travel) changes the counts, not the level

  • The stage gives each person the diary mean of their interview frequency band. The lowest band ("less than once a year or never") has a mean of about 3 trips a year. So the method gives every person some trips.
  • The band share is right: 55.6% of residents outside London are in it, against 49.5% of people in England in NTS0313 (2024). The band holds 4.9% of trips and fares (£111m in 2027), so the level depends little on it.
  • The counts depend on it. People affected fall from 38.0m to 17.0m without the lowest band, and UK fare payers fall from 48.5m to 24.7m. Outside London, 11.1m fare payers make more than 12 trips a year.
  • It also flattens the income gradient. Model trips per person fall from 39.1 (Q1) to 19.1 (Q5), a ratio of 2.0. NTS0705a gives 47.6 to 13.0, a ratio of 3.7. The two income measures differ.

5. Microcosm's fare rows do not constrain what policyengine-uk reports (Microcosm)

  • The calibration measures Microcosm's stored bus_fare_spending column. Its final England estimate (£3,528.6m) equals the stored column times the 2025 weights. policyengine-uk moves that column to bus_fare_spending_reported and prices the journeys again. So the fitted rows do not bind its output from 2025 onwards.
  • The stored column is at calendar-2024 prices (a factor of 0.965 outside London). The England target is uprated to calendar 2025 with BUS0415 (×1.057). At matching prices, the England row sits about 5% above its target, not 2.3% below, and the part outside London about 9% above. The 2025-price target hides most of 2.

Effects outside the model

  • Yields stay at FY2024-25 nominal levels. Fare growth to 2027 would raise the true base.
  • There is no demand response. Uncapped prices at capped-era volumes overstate uncapped revenue.

Size of the corrections (indicative)

  • Fixing 2 and 3 lowers the base by £210m (7.4%), to £2,624m. All the costs scale with the base: £354m becomes about £328m, and £531m becomes about £492m.
  • A base at a £3-cap level from published data gives £2.34bn (the BUS0415 rise) to £2.47bn (the grant less the £151m £3-cap cost). That gives £292m to £309m for the 12.5% measure, and £437m to £463m against funding expiry. These figures depend on how open item 1 defines the base.

Notes on the PR body

  • The +22% is not a like-for-like gap. With matching cap rules, the gap is +4.2% (UK without Wales).
  • The extra £0.55 applies to single-ticket boardings (70% of fare-paying boardings), not to every trip.
  • Calibrating fare spending to DfT receipts in Microcosm would not close the gap by itself. Microcosm already binds the receipts (England −2.3%), but on a column that policyengine-uk replaces, and causes 1 and 2 sit in the pricing.
  • "UK population 69.9m against 68.3m" compares a 2027 projection with mid-2023. The 2024 weights give 68.9m, against 69.3m in the ONS mid-2024 estimate.

All figures are weighted totals at nation or region level, computed with this PR's locked environment.

🤖 Generated with Claude Code

@juaristi22

Copy link
Copy Markdown

@vahid-ahmadi a follow-up to the comment above. Two of the five causes are already fixed upstream. Both fixes landed after the certified build, and the comment above describes the pinned versions without saying so.

No policyengine release certifies these yet: 6.10.2 still pins policyengine-uk 2.132.6.

The same certified data on policyengine-uk 2.152.7, fares of residents of England outside London:

  • 2024: £2,244m, unchanged.
  • 2025: £2,539m, against £2,813m on 2.132.6. This is +13.2% on 2024, in line with the index.
  • 2027, current law: £2,518m.
  • 2027, this PR's £3-cap counterfactual: £2,669m, against £2,834m. The base now follows the index to 2027 (×1.175) and adds no grant. The counterfactual reform works as written: on 2.152.7 the reference cap after the last published quarter is £3, so the reform adds no cap term.
  • The in-model effect of the £2 cap for the 2027 model year (6 April 2027 to 5 April 2028, uncapped from January 2028) is £151m, against £556m on 2.132.6. This is relevant to open item 1.

Causes 2 and 3 remain on 2.152.7. Fixing both gives a base of about £2,468m. At 12.5% that is about £309m, and against funding expiry about £462m. This replaces the indicative range in the comment above, which was at 2024-25 fares.

Remaining fixes:

All figures are weighted totals at nation or region level.

🤖 Generated with Claude Code

This branch was successfully deployed

1 active deployment
Preview – bus-fare-cap — 592c5133 Deployed Oct 24, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants