Repository navigation
Add NEF deck on the OBR macroeconomic model - #118
vahid-ahmadi wants to merge 25 commits into
Conversation
A private 26-slide deck for a meeting with the New Economics Foundation: PolicyEngine's open-source Python implementation of the OBR's published macroeconomic model (inputs, solver, anchoring, fit, shocks against the OBR's published multipliers, known limits), the macro platform around it, and where to work together. Every figure is in content.ts with its source pinned to a commit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Say why overlays run locally (hosted obr_shock has no overlay switch and the hosted model is 10 commits behind main, before #70), drop the link to a private repo from the sources line, match the README's "right order of magnitude" and "compared with" wording, label the demo slide, take the multipliers quoted in text from content.ts, and use a colour token for white. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Three new slides before and after the 53-point check: what Thibault found (his three headline points and ratings), our answer to each, and where we agree and differ. The review slide now names his list. - New slide 21 frames the macro site live (SiteEmbed, copied from autumn-budget-2026's DashboardEmbed) with buttons for its main pages. - Deck is public (no password). README and speaker notes renumbered (30 slides). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Removed slide 3 (who we are) at Vahid's request; README ranges and speaker notes renumbered (29 slides). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Removed at Vahid's request (the audience knows the case); README ranges and speaker notes renumbered (28 slides). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The previous commit deleted the layerStatus constant along with the slide before it; the published-vs-built slide needs it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review pass over the whole deck (now 27 slides): - Every list item, card, stat, table row, chart row, step and note takes a bare Tabler icon; one list, card, stat, note, strip and table style. - Slide bodies are sized in em of a base that follows the viewport height, so slides look the same at 1920x1080 and 1440x810; sparse slides scale up. - Text cut to a few words an item; the detail moved to SPEAKER-NOTES.md. - New slide 4, the model's modules: 12 tiles from the listing's own sections, with equation counts (sum 372) and what the OBR's file takes as given. - How it runs: three example equations from the listing beside the Python the transpiler emits. - Thibault's review: the findings and our check merged into one slide, and the wording on slides 7 to 9 rewritten for a meeting he is in. - Income tax: a flow from the HMRC ready reckoner input to GDP. - Use it from Claude: connect, ask, tools, from the site's Use page. - DEFINE-UK example slide removed. - No existing figure changed; README and notes renumbered. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Second pass, on Vahid's review of each slide (27 slides):
- Navigation: a section slide opens each of the five parts, and every
slide's header carries a tracker of the parts. The source line is off
the slides; SPEAKER-NOTES.md lists each slide's sources.
- What we built: the judgement row says how it is stood in for (EFO
anchoring and three labelled opt-in overlays); the inputs slide is folded
in as four stats.
- New slide, how the modules connect: links counted from the listing
(module-links.py writes module-links.json), strongest links plus the
demand loop, dashed where they don't reach GDP in the OBR's file.
- How it runs: steps first, a line on Gauss-Seidel, and three equations
from the listing as maths (KaTeX) instead of code.
- Thibault's review and the 53-point check merged into one slide; the
follow-up slide rewritten as three rows, "How to take it to the OBR".
- Fit: anchoring, the two numbers and the scorecard merged into one slide.
- Results slides open with the question and the scenario simulated. The
multipliers say what each shock is and stack overlapping dots; investment
and Bank Rate rewritten in plain words; the income-tax slide says the
model is aggregate and points to the microsimulation for deciles.
- Known limits split by whose they are.
- Micro to macro redrawn as one worked example with two lanes.
- Use it from Claude takes the Python and dashboard items; the demo and
next-steps slides move to the notes; contact is vahid@policyengine.org.
- Body sizing follows the smaller of viewport height and width; three
hedges restored ("about", "near", "had ONS codes").
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
- Investment slide: the four GDP figures are stat cards with icons, as everywhere else, under a one-line heading for each shock. - Fit slide: the anchored figures are labelled as MAPE again. - Speaker notes: the timing line no longer refers to the demo slide. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Removed at Vahid's request (the forecast record is BoE SVAR, not the OBR model; part 2 is a single slide). 25 slides; cross-references, README and speaker notes renumbered; unused imports removed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… slide - Agenda shows the five parts as numbered stops on one line, in talk order. - Each slide's title and body items rise in, staggered, each time the slide is shown; they end fully visible, and reduced motion turns it off. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
juaristi22
left a comment
There was a problem hiding this comment.
Review of the deck at d03d8cd. I checked it against obr-macroeconomic-model at 0fe04c9 (main hasn't moved since) and macro at 2e5dffe.
The numbers hold up. Every figure I checked matches its source: the demo table, README, scorecard, site_figures.json, the review counts, tool counts and the hosted pin. I also regenerated the module counts and the link matrix from the listing, and both match. What needs work is wording on slides 8–9, one diagram bug, a few overstated claims and some clarity and design points.
Before the deck goes public
- The deck is no longer password-protected and this repo is public. Slides 8–9 name Thibault and summarise his email.
SPEAKER-NOTES.mdandcontent.tsadd more from private correspondence: email dates, his reply, and notes on how to handle him in the room. The model repo's own write-up (docs/published_model_review.md) keeps him anonymous as "the critic". Please get his OK to be named, or move the correspondence details and presenter guidance out of the public repo before merging. - Slide 9 says "Thibault writes to the OBR" on a public page. Check that with him beforehand, not in the room.
Slides 8–9 (Thibault's review)
- Debt interest row, "Holds, narrower": this reads as a correction of him, and it isn't from the review doc, which marks V2 plainly true. The check "household interest follows Bank Rate" isn't about public debt interest. Unless his email claimed more than the public debt interest bill, I'd use "Holds", with the check "Debt interest is an input: no link to rates or borrowing".
- "Thibault's finding" column: this paraphrases him. For example, "More activity can't change the trade balance" stands in for "total imports fixed". Since he's in the room, use his own short wording for the three headlines.
- Column header "Our check, in the Python build": the verdicts are about the OBR's code, so "Our check against the published code" fits better. It also matches the slide title.
- "42 accurate / 8 partly true": this can read as grading him. "Confirmed / confirmed in part / about process (can't be checked from the code)" is gentler.
- Slide 9, "The strongest point: it can't reproduce the OBR's own forecast": this ranks our point above his, and it overclaims. What we showed is that our build can't reproduce it from the published files. Suggest "A point to lead with: the published files alone don't reproduce the OBR's forecast".
- Slide 9, "in the OBR's own variable list": "openly documented" in the review means the variable list or code comments.
Numbers and claims
- Slide 6 bug: the GDP and output → finance and balance sheets badge (11, the second-strongest link) is hidden under the public sector → income accounts badge (7). Their midpoints coincide at about (330, 186), so the vertical arrow appears to read 7. Setting
labelAton one of the two links inmoduleLinksfixes it. - Slide 16, "Spending multiplier is about 1": this sits under limits inherited from the OBR's model. But in the OBR's file GDP is an input, so a spending shock moves GDP by nothing. The ~1 comes from our closure swap. What we inherit is that nothing in the equations (imports, prices, crowding out) damps it, and the wording should say that.
- Slide 7, "EViews' standard model solver, so the OBR's file solves as intended": under the published closure no quarter converges (README, solver convergence row). Drop "solves as intended".
- Two PolicyEngine costings of the same 1p: slide 13 gives £1,616m a quarter (about £6.46bn a year); slide 21 gives £6.55bn a year. They're from different vintages, so use one. Slide 13 also says "Same result", but only the ratios are the same. The GDP path scales with the input, and with
HHDI_ADDFACTORreceipts and borrowing don't move. - OBR 0.6 for government consumption: this is the 2010/2015 Box 3.2 figure. The repo's own review (G11) records the OBR's November 2023 figure of 0.45 for public services as an open discrepancy. NEF may know it, so add a line to the notes or label the mark "OBR 2015".
- Slide 14: the switch is described as turning on "the investment identity (l.86)". For corporation tax, what matters is the business-investment equation (l.92), which we rebuilt with its missing bracket closed. That is worth saying.
- Slide 10: the quote of the platform's label drops "predictive and policy checks weak". Quoting it in full avoids looking selective.
- Slide 18: OG-UK shows "Yes" for scoring reforms; the source table says "Yes, none published".
Clarity and design
-
Slide 10: fits to what? The title doesn't say what the model is fitted against. Both numbers measure how closely the model reproduces the OBR's published October 2026 EFO path over 2025Q1–2027Q4: the EFO's outturn quarters to 2026Q2, then its forecast. They are not measured against outturn data. Only the left column names the EFO, so the free-running 4.05% can read as a forecast error against actual data. Suggest a title like "How closely it reproduces the OBR's October 2026 forecast", with the comparison and window stated once for both columns. Label both GDP figures as MAPE so they compare like for like. The agenda item "How well it fits" has the same gap.
-
Slide 12: consolidate the data points. The dot plot uses two styles:
- Government consumption, VAT (default) and government investment have small dots stacked vertically.
- Income tax and VAT with pass-through have large dots on a connecting line.
This makes the rows look like different kinds of result. Use one dot size and one placement rule for every row, for example the same size on the line, offset by the same amount where they would overlap. Either draw the connecting line on every row or on none. Keep the OBR mark and the value column styled the same throughout.
-
Slide 4: "199 of 261 missing variables had ONS codes" under "355 ONS series" leaves the viewer wondering how 199 variables became 355 series. Something like "fills 199 of the 261 variables the EFO doesn't publish" would help.
-
Slide 5: the "Total exogenous" tag should read "Total investment exogenous".
-
Slide 15 is blank in the shared click-through copy of the deck, probably captured mid-animation. Re-capture it, and check the PDF export with the new entrance animation.
Housekeeping
- Speaker notes:
- They put the live demo under slide 20 (it's 19) and the unemployment drift on slide 17 (it's 16).
- The notes for slide 8 say "the four on the slide", then "three of the four"; the review doc lists five problems in the published files (G7, G6, N5, G13, V5).
- The PR body still describes the 30-slide version, including the forecast-record and DEFINE-UK slides that were removed.
docs/demo.mdin the model repo still says not to show hosted results until the pin moves from e4d7faa. The pin is now 2965e82, which has the nominal-GDP pin default, so a presenter reading it on the day would be misled.
Not checked: Thibault's emails, the external benchmarks against their originals (OBR Box 3.2, the BoE 1999 range, HMRC's ready reckoner), and the live deck and embedded site.
Structure - Merge the two module slides into one map: 12 modules in three groups (demand, supply and prices, income and sectors), six arrows between the groups coloured by the group they leave, and four dashed links that don't reach GDP in the OBR's file. module-links.py now defines the groups and writes the group matrix; the 12 x 12 matrix is unchanged. - Drop "How to take it to the OBR"; its points are talking points in the notes. "How it runs" moves after Thibault's review, before the fit slide. - 23 slides; cross-references, README and speaker notes renumbered. Slides - What the OBR publishes: three layer cards (model, engine, judgement), each with what the OBR has, what we built and its own number; closure, add-factor and the EFO are glossed there. - Thibault's review: three headline cards with our check and result, then three errors in the published files, each with a plain line on what it does. - Fit: two mirrored columns; the warning is the subtitle. - Multipliers: default and opt-in groups, three dots on every row, values and the OBR's beside each row, legend in the chart's header. - Income tax: chart with its route above it, and a plain-words panel. - Investment, Bank Rate, limits, Claude, micro to macro: one composition each; no strips or footnote rows under the content. - Platform table: country and spelled-out name under each model, and the macro site's own status label for each, verbatim. - One question and scenario panel on every results slide. - "Scenario" replaces "shock" on the slides; part 3 is "Policy scenarios and limits". Part 4 slides carry "Preview, not yet launched". Cover shows roles only. Motion - Builds on twelve slides (BuildScope, data-step); an export shows each slide once, complete. Per-element motion: lines draw, bars grow, dots slide, numbers count up, columns come from the side, chips pop. Off under reduced motion. - BuildScope also shrinks a slide's body when it would run into the footer. Viewer - SlideshowConfig.counter: "slides" counts slides in the viewer's counter (default "steps", so other decks are unchanged); tested in lib/types. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
- Income tax: the chart is a line over 2025Q1–2027Q4 (UK GDP, £m a quarter below baseline), tagged "Our Python OBR model · input: HMRC costing"; the title says what it is; nothing on the slide is by decile, and the one PolicyEngine line sits apart under "With PolicyEngine". - Agenda: the line draws, each number pops and its card rises in turn, then one highlight passes along the five. - BuildScope measures layout heights, so an entrance animation can't make a slide that fits shrink; it re-fits when content or fonts change. The module map keeps more room under the header. - Platform status chips: the site's best class in teal, middle in grey, weakest in amber. - Root CLAUDE.md: back to its previous text. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The line chart's height is capped in em, so it scales with the slide and the fit guard no longer shrinks the text beside it on a short window. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The "Click or arrow keys" hint in the viewer's bottom bar sat on top of the footer logo in the NEF deck. A deck can now set hideControlsHint: true; the default (shown) is unchanged for every other deck. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Thibault slide: the three headline points use the review write-up's own wording (H1, R1, V2); debt interest reads "Holds", as the write-up's verdict does; the subtitle says confirmed / confirmed in part / about process - Fit slide: the subtitle says what both columns are measured against - Multipliers: the OBR mark is dated (EFO, July 2015) - Income tax: value labels clear of the axis; one PolicyEngine costing in the deck, not two vintages - Investment: the switch names the business-investment line (l.92) too - Limits: the spending multiplier is ours once GDP is solved; what is inherited is that nothing damps it; Bank Rate in the model's own numbers - Platform table: OG-UK carries the site's "none published" - Notes and content comments: no dates of private correspondence; the 2023 multiplier (0.45) and the two costing vintages explained Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The line under each headline point is the heading our write-up gives it, so the slide says "as our write-up records them". The README and notes say the three card titles are our short names and are not from the write-up. Notes: drop an unsourced detail on the fit window and a stale reference to two PolicyEngine lines. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Re-pins every OBR-model source to 0e44ec87 and updates the figures that moved: - Fit slide: anchored MAPE 0.24% GDP, 0.40% consumption; unemployment now on the EFO path by construction (5.07% at 2027Q4), replacing the "isn't anchored" line; free-running 4.24% / 7.23%, 9 of 11 within band, poor on two (RPI, company profits). - Multipliers: government consumption 1.01 / 1.02 / 1.04; income tax 0.37 at q12; VAT with pass-through 0.638; government investment 0.97 at q12. - Income-tax path from demo_shocks.json (q8 -482, q12 -565); government investment +2,903 at q12. - Known limits: unemployment drift removed (fixed by #74); notes say borrowing now rises by the cash cost (#75), receipts still don't respond. - Collaboration: the two items #74 and #75 closed are replaced by open ones from the README (receipts that respond; unemployment that responds). - Notes and README: hosted pin now 21 commits behind; held-add-factor fit 0.63%; history kept where it explains a change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
At 1280x720 the shared header kept its rem sizes while the body scaled down, so the header took a larger share of the slide and the fit guard shrank the body (the platform table to 0.67). The deck's header (tracker, title, subtitle, preview marker) now scales with the viewport, equal to the shared sizes at 1920x1080, and the module map's height reserve follows the same proportions, so the map fills the slide at 1280x720 instead of 70% of it. 1920x1080, and so the PDF, are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The header clamps now reach the shared sizes at 1920x1080 exactly (the earlier ones rounded 20px to 19.97px and moved later rows by a subpixel), so every 1920x1080 capture is pixel-identical to before the scaling change. Slide 17's notes warn that the live site's OBR pages still show the pre-#74 figures (0.44%, 4.25%, unemployment drifting) until the site is re-pinned, and name which hosted pin the notes use. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tform in use Embeds the public preview of "AI and the UK economy: Beyond the forecast" (uk-growth-with-ai), which pairs OG-UK with a PolicyEngine UK household study. Tagged not published, provisional, scenarios not forecasts, alongside the part's preview marker; buttons for Story, Explore and Method. README and speaker notes renumbered (24 slides). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The entrance animation's transform on the embed's ancestors turned the expanded frame's position: fixed into absolute inside its block, so Expand filled the block, not the screen. Live embeds no longer animate; checked at 1600x900: the expanded frame is the full width and the height below its bar, and Back to the slide restores it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…slide The point (PolicyEngine's £1,616m costing gives the same GDP effect per £1) stays in the speaker notes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Main gained the BIST deck (#115), which added the same two viewer options under different names. Take main's countSlides and hideNavHint, drop this branch's counter and hideControlsHint (and the counterLabel helper and its test), and switch the NEF deck config and README to main's names. The registry keeps both decks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Summary
A public deck (
/slides/nef-2026,clickerKeys: true) for a meeting with the New Economics Foundation on working together on the OBR macroeconomic model. 23 slides in five parts, after a title and an agenda; twelve slides build step by step when presenting (44 steps), and a PDF export shows each slide once, complete.config.ts,content.ts(every figure, with its source pinned to a commit),slides/index.tsx,slides/figures.tsx(HTML, CSS and SVG, no chart library),deck.module.css,README.mdandSPEAKER-NOTES.md(the detail and sources behind each slide; the slides carry no source line). Tabler icons, no emoji.The meeting date isn't fixed yet, so
dateis2026-11-01(renders "November 2026").Sources
PolicyEngine/obr-macroeconomic-modelmain0e44ec87(after Start Scottish Government presentation for 9 October 2026 #70–BLS deck: name PolicyEngine's users on the NBER slide #72, BLS deck: why we built the emulator, funding, versions and releases, Axiom, What's next #74 and Add PolicyEngine introduction and Budget planning deck #75)PolicyEngine/macromain2e5dffe7(after #275)Where they disagree, the model repo wins (see the deck README).
Shared files
lib/types.tsandcomponents/core/SlideshowViewer.tsxcarry two opt-ins,counter: "slides"andhideControlsHint; #119 has the same changes. The review pass below touched onlyslideshows/nef-2026/.Overnight review, 19 November (
e8e5e59,f94a7ae,c8fe527)Two review cycles by Opus 5.5 (Fable limit). Each: every slide's final state captured at 1920x1080, 1440x810 and 1280x720 from a production build and looked at; every figure re-read at its pinned commit; flow read as a first-time viewer.
OBR #74 and #75 merged (OBR main
0e44ec8), so the deck moved to it (e8e5e59). Every${obr}link now points at0e44ec87, and each changed figure was re-read there (results/site_figures.json,results/demo_shocks.json, README limits table,docs/calibration_scorecard.md,docs/demo.md,docs/forecasting_framework.md):0fe04c9)0e44ec8)Bank Rate (−0.057% / −0.149%), corporation tax (−£78m / −£384m) and the anchored-fit "by construction" framing are unchanged. The macro pin (
2e5dffe7) is unchanged.demo_shocks.jsonat0e44ec8records model commita822045(the #75 branch); itsdemo.mdsays to regenerate after the merge, and the README now says so.Layout (
f94a7ae). At 1280x720 the shared header kept its rem sizes while the body followed the viewport, so the fit guard shrank bodies (slide 16 to 0.67) and the module map filled about 70% of the width. The deck's header now scales with the viewport (equal to the shared sizes at 1920x1080), and the module map's height reserve follows the same proportions. At 1920x1080 every capture is pixel-identical to before the change (checked by image diff afterc8fe527made the clamps exact), so the PDF layout is unchanged. Smallest gap above the footer: 39px at 1280x720 (slide 5), 46px at 1440x810.Live site (
c8fe527). On 19 November the live site's OBR and OBR validation pages still showed pre-#74 figures (anchored 0.44%, free-running 4.25%, unemployment drifting). Slide 17's notes now warn the presenter, and the README's "where the repos disagree" note covers it. The site catches up when it is re-pinned (PolicyEngine/macro #278).What was re-read at
0e44ec8: README limits table,calibration_scorecard.md,demo.md,forecasting_framework.md,demo_shocks.json,site_figures.json, the changelog paths. Carried forward because their files are identical between0fe04c9and0e44ec8: the listing,transpiler.py,published_model_review.md(53 points; 6 / 25 / 22 ratings re-counted),ROADMAP.md,monetary_conditioning.md. Macro figures were re-read at2e5dffe7: 28 tools, 27 commands, status labels, Use page, £6.55bn / 5.1%. The business-investment artefact (+16% to +24% under the old real-only spending shock) was never on the deck, so nothing changed.Decision log (Opus 5.5 (Fable limit)):
.headindeck.module.css); the sharedSlideHeaderandSlideTitleare untouched2026-11-01("November 2026"), as the README says; the exact day can be set by VahidReview pass, 18 November (
36eb90b,840f936)Every slide was captured at 1920x1080, 1440x810 and 1280x720 from a production build and looked at (slide 17, the live frame, at 1920x1080 and 1440x810, and in the PDF); the smallest gap between content and the footer is 72px at 1080-equivalent height. Changes, each checked against the pinned sources:
docs/published_model_review.mdgives it (H1, R1, V2), in place of our paraphrase, and the header says "as our write-up records them"content.ts: dates of private correspondence removed; the contested "solves as intended" line removed; "the strongest point" rewordedDecisions logged, not changed:
Co-Authored-By: Claude Opus 5.5; the session's attribution rule gives Claude Fable 5.2, the model that wrote these commits, so they carry thatFor Vahid:
Checks
c8fe527:bun --bun run typecheck,lint(0 errors, 34 warnings, unchanged),test(458 passed),build; CI Build, Lint, Tests and the Vercel preview pass. PDF re-exported from the Vercel preview ofc8fe527(23 pages; slide 17 shows the live site; slides 8 and 14 checked for the new figures)Earlier pass (18 November):
bun run typecheck,bun run lint(0 errors; 34 warnings, the same as before this pass),bun run test(458 passed),bun run build840f936: Build, Lint, Tests and the Vercel preview passbun run exportas documented needsnodeon the PATH; this shell has only bun, so the script was run with bun against--urlgit diff --statfor the pass: 6 files, all underslideshows/nef-2026/Round 2: cross-consistency (Opus 5.5 (Fable limit), round 2)
content.ts, the slide components andSPEAKER-NOTES.md, traced to obr-macroeconomic-model0e44ec8(site_figures.json,demo_shocks.json,demo.md,calibration_scorecard.md, README, review doc) and compared with the site on macro #278/#279.pct_gdp. The site compare page shows −0.058:obr_shockrounds to 4 dp before the battery rounds to 3 dp, at about 0.0575. Its validation page shows −0.06%.🤖 Generated with Claude Code