Published 8-sector results predate the July 2026 MTR fix in OG-UK

Aperta
#2 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

@vahid-ahmadi ci sta già lavorando.

Dal 23/9/2026.

  • #3 di @vahid-ahmadi — aperta

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
30/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
javascript, python

Direzione di ricerca

Start with src/data/tpiData.json and the cited OG-UK api.py changes and commits; review the reproduction scripts and current transition-path traces mentioned in the issue. Done means either regenerating the published series on current OG-UK or adding provenance that records the OG-UK commit, policyengine version, generation date, and the MTR and terminal-condition caveats.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

src/data/tpiData.json was generated on 28 April 2026 (commit d57e012). Since then OG-UK has fixed a bug in its marginal-tax-rate estimation that materially changes the tax functions feeding the model. The published sector3 and sector24 series therefore rest on tax rates that OG-UK itself now treats as wrong.

The bug that was fixed

From oguk/api.py:410-416 (OG-UK, commit 3c3ce10, 22 July 2026 — "Support policyengine-uk >= 2.89; fix the silent MTR bugs the pin was masking"):

"the previous code did not divide at all, so 1 - delta went negative for every multi-adult household and np.clip floored it to ZERO (measured: 80% of GBP 25-35k earners at a 0.000 labour MTR)"

Measured on current code, the weighted-mean labour MTR is 0.26. Under the April code path it was ~0 for most middle earners. That is the tax schedule the household block was solving against when these results were produced.

Timeline

date commit event
21 Apr 2026 3a16cff (OG-UK) last OG-UK commit before the dashboard data
28 Apr 2026 d57e012 (here) tpiData.json generated
22 Jul 2026 3c3ce10 (OG-UK) MTR fix
29-31 Aug 2026 ad30d7b, fe857a8, d0e6ae5 (OG-UK) resource-constraint checks restored/retuned

oguk/industry_params.py and oguk/oguk_default_parameters.json are byte-identical between April and now, so the sectoral calibration itself has not changed. Only oguk/api.py did (~360 lines).

A second, separate problem

Reproducing an 8-sector transition path on current OG-UK, the solve does not converge over the full horizon:

RuntimeError: Transition path equlibrium not found (RC_error)

The resource-constraint error grows roughly geometrically from t≈4 and the path is non-finite from t=20:

t |RC|max D/Y
0 5.7e-3 0.950
3 1.3e-4 0.881
4 2.9e-3 0.854
7 1.4e-2 0.931
10 8.5e-2 0.922
12-15 > RC_TPI = 0.2 —
20+ nan nan

Eliminated by experiment as causes: TPI outer method (Picard and Anderson give bit-identical failures), the level of alpha_G (SS-calibrated 0.252 vs default 0.209), fiscal-closure timing (tG1 4 vs 20, tG2 20 vs 45, rho_G 0.6 vs 0.15), start_year (2026 and 2027), and the MTR change itself (zeroing labour MTRs to emulate the April bug reproduces the divergence exactly). The 8-sector steady state converges cleanly (5.9 min, FOC errors ~1e-12), and the 1-sector transition path converges (6.5 min) — so neither the sectoral calibration nor the transition machinery is broken on its own.

Relevant to this dashboard: the published series covers 2026-2030 only, which is precisely the region where the path is still well-behaved (RC ~1e-3). So these five years may be fine in isolation — but they were solved as part of a global path whose terminal condition is not met, and households are forward-looking. That should be stated rather than assumed.

Suggested actions

  1. Regenerate tpiData.json on current OG-UK, or
  2. Add a provenance note recording the OG-UK commit, policyengine version and generation date behind the published figures, and flag that the 8-sector series predates the MTR fix.

I can prepare either. Reproduction scripts and the full per-period traces are available.

Lingua principale
JavaScript
Stelle
0
Fork
0
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di PolicyEngine/og-model-dashboard

Tutte le issue di PolicyEngine/og-model-dashboard

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.