From 4a5df1324ab2108e074b0d23e8518dee17e538b8 Mon Sep 17 00:00:00 2001 From: vahid-ahmadi Date: Wed, 18 Nov 2026 10:18:57 +0000 Subject: [PATCH 01/24] Add NEF deck on the OBR macroeconomic model 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 --- lib/slideshows.ts | 2 + slideshows/nef-2026/README.md | 79 ++ slideshows/nef-2026/SPEAKER-NOTES.md | 259 +++++ slideshows/nef-2026/config.ts | 70 ++ slideshows/nef-2026/content.ts | 435 ++++++++ slideshows/nef-2026/slides/deck.module.css | 698 +++++++++++++ slideshows/nef-2026/slides/figures.tsx | 172 ++++ slideshows/nef-2026/slides/index.tsx | 1054 ++++++++++++++++++++ 8 files changed, 2769 insertions(+) create mode 100644 slideshows/nef-2026/README.md create mode 100644 slideshows/nef-2026/SPEAKER-NOTES.md create mode 100644 slideshows/nef-2026/config.ts create mode 100644 slideshows/nef-2026/content.ts create mode 100644 slideshows/nef-2026/slides/deck.module.css create mode 100644 slideshows/nef-2026/slides/figures.tsx create mode 100644 slideshows/nef-2026/slides/index.tsx diff --git a/lib/slideshows.ts b/lib/slideshows.ts index 5c8548b6..53defd6a 100644 --- a/lib/slideshows.ts +++ b/lib/slideshows.ts @@ -33,8 +33,10 @@ import { autumnBudget2026Config } from "@/slideshows/autumn-budget-2026/config"; import { prop40Webinar2026Config } from "@/slideshows/prop40-webinar-2026/config"; import { appam2026Config } from "@/slideshows/appam-2026/config"; import { studentDebt2026Config } from "@/slideshows/student-debt-2026/config"; +import { nef2026Config } from "@/slideshows/nef-2026/config"; export const slideshows: SlideshowConfig[] = [ + nef2026Config, appam2026Config, prop40Webinar2026Config, autumnBudget2026Config, diff --git a/slideshows/nef-2026/README.md b/slideshows/nef-2026/README.md new file mode 100644 index 00000000..4b21690c --- /dev/null +++ b/slideshows/nef-2026/README.md @@ -0,0 +1,79 @@ +# New Economics Foundation meeting, November 2026 + +26 slides at `/slides/nef-2026`, for a meeting with the New Economics +Foundation (NEF) on working together on the OBR macroeconomic model. The deck +is private (`private: true`), because the macro platform it shows isn't +launched yet. The exact meeting date isn't fixed, so `config.ts` uses +`2026-11-01`, which renders as "November 2026"; change it, and the footer, +once the date is set. + +Five parts, after a title, an agenda and a slide on PolicyEngine: + +1. The OBR model in Python: why an open version, what the OBR publishes and + what we built, the inputs, how it runs, and the line-by-line review of the + published listing (slides 4–8) +2. How well it fits: anchoring to the October 2026 EFO, the two numbers that + are easy to misread, and the free-running scorecard (slides 9–11) +3. Policy shocks and limits: results against the OBR's published multipliers, + income tax, corporation tax and capital spending, Bank Rate, and the known + limits (slides 12–16) +4. The macro platform: the seven models, a DEFINE-UK green investment example, + the forecast record, code and AI-agent access, and the link from + microsimulation to the OBR model (slides 17–21) +5. Working together: a demo plan, collaboration areas, questions for NEF and + proposed next steps (slides 22–25) + +It follows PolicyEngine's July 2025 meeting with NEF, which covered the +tax-benefit microsimulation (`NEF x PolicyEngine.pptx` in +`PolicyEngine/obr-presentation`, commit `f4f819a7`). + +## Editing and presenting + +- `config.ts` controls the slide order and meeting metadata. +- `content.ts` holds every number on the slides, each with its source pinned + to a commit, plus the tables and lists. +- `slides/index.tsx` contains the slides. +- `slides/figures.tsx` draws the scorecard table, the multiplier dot plot, the + income-tax bars and the Bank Rate bars (HTML and CSS, no chart library). +- `SPEAKER-NOTES.md` gives the presenter track, the detail behind each slide + and what not to claim. + +Run `bun install --frozen-lockfile`, then +`NEXT_PUBLIC_PRIVATE_PASSWORD= bun dev`. Open +`http://localhost:3000/slides/nef-2026`. Arrow keys, Page Up and Page Down +(a clicker) move between slides. Export with +`NEXT_PUBLIC_PRIVATE_PASSWORD= bun run export nef-2026 /path/to/output.pdf`. + +## Evidence + +Checked on 18 November 2026: + +- `PolicyEngine/obr-macroeconomic-model` main + `0fe04c9afa8e4e316d24bae40aacc9bba9cd5084`, after #70 (opt-in VAT price + pass-through and the capital-spending investment closure), #71 (household + taxes held on their data path) and #72 (docs and caveats). Every OBR-model + number comes from this repo: the README limits table, + `docs/calibration_scorecard.md`, `docs/demo.md`, + `results/demo_shocks.json` (model commit `f0f61c5`, the #70 branch; demo.md + says defaults are unchanged by it) and `results/site_figures.json`. +- `PolicyEngine/macro` main `2e5dffe7a2b35d189c8df60ff2012abbdb675367`, after + #275: the README model table, the model comparison + (`models/index.html`), the DEFINE-UK page, the forecast record + (`forecasts/scorecard.json` and `forecasts/index.html`), and the tool counts + (28 `@mcp.tool` functions in `mcp_server.py`, 27 `@main.command` functions + in `cli.py`; the README's own count of 26 tools is stale). + +Where the two repos disagree, the model repo wins: at `2e5dffe7` the macro +site's OBR page still quotes the pre-#71 free-running GDP error (4.25%) and +calls capital spending dead without the #70 investment-closure route. + +What the deck deliberately does not claim: + +- the free-running GDP error (4.05%) is not an OBR forecast error, and the + anchored error (0.44%) is not forecast skill; +- the held-add-factor forecast fit (0.35% GDP) is left off the slides: the + forecasting framework calls its GDP line "close to circular"; +- the forecast record contains no OBR-emulator forecasts; +- no DEFINE-UK multiplier: which one to headline is an open decision; +- no poverty figures: the platform's population tool returns decile changes and + winners and losers, not poverty rates. diff --git a/slideshows/nef-2026/SPEAKER-NOTES.md b/slideshows/nef-2026/SPEAKER-NOTES.md new file mode 100644 index 00000000..d9f35b05 --- /dev/null +++ b/slideshows/nef-2026/SPEAKER-NOTES.md @@ -0,0 +1,259 @@ +# NEF presenter notes + +Meeting with the New Economics Foundation, November 2026. Presenters: Vahid +Ahmadi and Max Ghenis. Goal: show the open OBR model and the macro platform, +and agree where to work together. About 30 minutes plus discussion: 7 on part +1, 4 on part 2, 7 on part 3, 7 on part 4, 5 on part 5 (the demo can stretch). + +Every number below is in `content.ts`, with its source pinned to a commit. + +## 1. Title + +## 2. Today + +Five parts. Say up front that the platform isn't launched, and that we'll be +direct about limits. + +## 3. PolicyEngine + +We met NEF in July 2025 about the tax-benefit microsimulation (the two-child +limit and a NICs example). This meeting is the macro side. + +## 4. Why an open OBR model + +The OBR publishes its EViews code and variable list. Running them needs an +engine. Our version makes each equation inspectable and runnable, lets users +shock any exogenous variable against the EFO baseline, and connects to +PolicyEngine's microsimulation. Keep it neutral: the point is inspectability, +not a claim about the OBR's forecasts. + +## 5. What the OBR publishes, and what we built + +Three layers, from the repo's roadmap: the model (published, all 372 equations +transpiled), the engine (EViews; we have a Gauss-Seidel solver, closures and +add-factors, not the full engine, and no stochastic simulation), and the +judgement (the forecasters' add-factors and off-model assumptions, not +published). A user of our model supplies their own judgement. + +## 6. The inputs + +- The OBR listing and variable list of 15 October 2025, still the latest on + obr.uk on 16 November 2026. +- The October 2026 EFO detailed forecast tables (28 October 2026). +- 355 ONS series, pulled 11 July 2026 with 8 recovered on 22 September: of 261 + endogenous variables the EFO doesn't publish, 199 had ONS codes. +- 82 of the 372 equations drop in at least one quarter of the pinned reform + solve because an input has no data; each is listed in the code, or the + solve raises. +- Cost-of-capital constants (DB, DP, DV) are estimated from statute and the + EFO gilt path; COCU is a declared seed. Two large level anchors (OSHH, GGVA) + are documented in the README. + +## 7. How it runs + +The key step is 03: in the OBR's file GDP is an input and inventories balance +the expenditure identity. We delete that equation, hold inventories on the EFO +path and make GDP endogenous, so a demand shock can move GDP. The default +closure also switches on the OBR's commented-out l.690 (the nominal-GDP pin); +without it no quarter converges. + +## 8. Reading the published listing line by line + +A list of 53 points about the OBR's model circulated in September 2026; we +checked each against the published files (`docs/published_model_review.md`). +Don't name or characterise its author. The four on the slide are problems in +the published files rather than design choices; G6 and G7 leave nominal GDP / +the investment deflator and unemployment / participation not uniquely +determined. The OBR's workfile may resolve them; the release doesn't show how. +H3 (household interest payments respond to Bank Rate, receipts don't) is the +design choice with the clearest behavioural consequence, if asked. + +## 9. Anchored to the October 2026 EFO + +- 0.44% GDP and 0.72% consumption MAPE over 2025Q1–2027Q4, by construction: + add-factors are EFO minus model. Only consumption is re-derived; the other + GDP terms sit on the EFO. +- Reforms are scored as deltas from the anchored baseline, so the add-factors + cancel. +- Every baseline and shocked solve in the demo set converges in 12 of 12 + quarters ("converged" covers the equations that evaluate). +- Unemployment is not anchored: 3.75% against 5.07% at 2027Q4 (and 1.05% + against 4.17% by 2031Q1, on slide 16). The anchored GDP gap reaches 1.24% by + 2031Q1. + +## 10. Two numbers that are easy to misread + +Say this one carefully. The ~4% free-running error is not the OBR's forecast +error: in the OBR's model GDP is an input, so it can't miss it. The gap +measures our closure swap plus the inputs the OBR doesn't publish. The +platform's registry labels the emulator "anchored to the October 2026 EFO, not +validated as a forecaster; predictive and policy checks weak". + +If asked about the held-add-factor forecast (0.35% GDP, 7 of 8 in band): its +GDP line is close to circular, because household income is handed to the +model, so it isn't evidence of forecast skill. + +## 11. Free-running scorecard + +Default closure, October 2026 EFO, 2025Q1–2027Q4. Bands: rates within 1.0pp, +net balances within 1.5% of GDP, levels within 10% MAPE. Employment scores +0.00% because it is an identity of two passthrough inputs. RPI inflation decays +because the RPI index history the OBR doesn't publish runs out. Company profits +are a residual of nominal GDP. The other 10 headline variables (exports, +imports, CPI, earnings and others) are held at the OBR's value. + +## 12. Shocks against the OBR's multipliers + +Ratios at quarters 1, 4 and 12, from `docs/demo.md`. Tax rows are current-price +GDP per pound of revenue (the OBR's basis); government consumption is real GDP +per real pound; government investment is real GDP per nominal pound. OBR +benchmarks are the June 2010 estimates restated in EFO July 2015 Box 3.2, all +tapering. + +- Government consumption is about 1 by construction: the shock lands in the + expenditure identity. `published_conventions=True` can impose the OBR's 0.6 + fading path as a labelled add-factor (0.60 / 0.51 / 0.27). +- Income tax and employee NICs: the same channel and the same ratios. +- VAT barely moves GDP by default: CPI is exogenous in the listing. The opt-in + pass-through overlay lands near the OBR at quarter 4 (0.345 against 0.35) but + keeps building; the match isn't a calibration. +- Government investment works only under the opt-in investment closure, as + identity pass-through with no taper. + +## 13. Income tax + ++1p on the basic rate, £1,725m a quarter (HMRC ready reckoner, June 2025, +2026-27 column, £6.9bn a year divided by four), sustained from 2025Q1. Real +GDP falls 161 at quarter 1, 335 at quarter 4 and 569 at quarter 12 (£m). Ratio +0.10 / 0.21 / 0.38 against the OBR's 0.3, which fades. Receipts and borrowing +move one for one; lower consumption doesn't reduce other receipts. GDP change +equals the consumption change to the pound. + +## 14. Corporation tax and capital spending + +The investment closure freezes MSGVA, PIF and PIRHH; without the guard, a +zero-shock baseline runs business investment from £86bn to £522bn by 2027Q4. + +- Corporation tax +5pp: nothing in quarters 1–2, then −£78m at quarter 4 and + −£384m at quarter 12 (0.05% of GDP), 40% of a plateau of about £0.96bn a + quarter. The OBR multiplier table the repo encodes has no corporation-tax + row. +- Government investment +£3bn a quarter: +£3,075m / +£2,901m / +£2,932m at + quarters 1 / 4 / 12. Under the default closure IF has no live equation, so + the channel is dead and `run_reform` warns. + +## 15. Bank Rate + ++1pp for four quarters, peak at quarter 4: −0.057% of GDP in the default run +(mortgage rate held, a lower bound), −0.149% with `monetary_conditioning=True` +(mortgage rate moved at the 0.9 pass-through in the OBR's l.623). The Bank of +England's range for the same experiment is −0.2% to −0.35% after about a year +(Quarterly Bulletin 1999 Q2). About −0.16% is the ceiling even with mortgage +and deposit rates both moved. CPI and unemployment don't respond, by design. + +## 16. Known limits + +- Bank Rate: about a quarter of the BoE range unconditioned, about half with + the mortgage rate moved. +- Unemployment drifts to 1.05% against 4.17% by 2031Q1: l.163 and l.175 are one + identity, so nothing holds participation on the EFO path. Anchoring PART16 is + an open decision. +- Spending multiplier: 1.01 on impact, 1.05 by quarter 12, against 0.6. + Borrowing doesn't move, because the nominal spending identity is commented + out. A nominal-consistent spending shock is an open decision. +- VAT: the pass-through overlay is labelled judgement, not the shipped listing. +- Household taxes (#71): their ONS components aren't seasonally adjusted while + the aggregate is, which put a −10.6% / −12.5% first-quarter dip into + household income. Holding them on their data path took the free-running GDP + error from 4.25% to 4.05% and household income from 4.30% to 3.08%. That is + an artefact removed, not better fit. Seasonally adjusting the components is + the follow-up. +- Every result is a point estimate. + +## 17. The macro platform + +Not yet launched. Seven public models (`site_contract.py`'s list), each with +its own repo. Results from different model classes are complementary, not +comparable, and the scoring tool won't average them. FRB/US and HANK refuse +reform scoring on purpose: no mapping from a PolicyEngine reform exists, and +inventing one would give plausible-looking wrong numbers. + +## 18. DEFINE-UK: green public investment + +Ecological stock-flow consistent model; upstream R code run unmodified at +commit 846081a. Green public investment of about £15–16bn a year in 2027–31, +financed with green bonds, minus the current-policies baseline, in 2035: real +GDP +0.91%, emissions −54 Mt CO2e a year (−18.4%), unemployment −0.22pp, real +consumption +1.01%. Deltas only; the baseline sits far from outturns; no +numeric v1.1 scenario results are published, so this is a partial replication. +Public debt and interest aren't among the served outputs. Don't quote a +multiplier: which one to headline (2.25, 2.30 or 3.26) is open. + +## 19. A scored forecast record + +Rounds are committed to git before the outturn exists and are append-only. +Nine forecasts of five outturns scored (5 live, 4 retroactive); 4 of 5 live +forecasts inside the 68% band; average miss 0.34pp against 0.47pp for no +change; bias −0.33pp, low on 8 of 9. All from the BoE SVAR and its +unemployment satellite. The page itself says: too few to show skill. The SVAR +has no forecast skill against a drifting random walk in its own evaluation. + +## 20. Use it from code or an AI agent + +- Hosted MCP server: 28 tools at the pinned commit (the README still says 26). + No install, account or key; scales to zero, so the first call may take about + 10 seconds. +- CLI: 27 commands. The `[models]` extra pins each git dependency to a full + SHA; OG-UK and DEFINE-UK's R runtime are local-only. +- Dated data snapshots under `data/vintages/`, never edited, so any score can + be reproduced against the data it saw. + +## 21. From a microsimulation reform to GDP + +`score_reform(model="obr")`: a PolicyEngine-UK reform is costed per year with +the population microsimulation, enters the OBR model as a quarterly +`HHDI_ADDFACTOR` path, and GDP, consumption and investment come out. It is a +demand-side approximation, not a general incidence model; corporation-tax +reforms are refused. Distribution comes from the microsimulation itself. When +we report poverty we headline before housing costs, with after housing costs +alongside; the platform's population tool doesn't return poverty rates yet. +The static costing of 1p on the basic rate (£6.55bn, 2026-27) is 5.1% below +HMRC's ready reckoner (£6.9bn): static and survey-based against +post-behavioural and administrative. + +## 22. Demo + +Before the session: `uv sync` and run one `run_reform` call, because the first +build takes a few minutes. If using `score_reform`, start it through +`start_job` before the meeting: a five-year score takes over ten minutes. + +1. `run_reform(name="demo", var="CGG", shock=1250, periods=12)`, then income + tax (`var="TYEM", shock=1725`). +2. VAT with `price_passthrough=True`; Bank Rate (`var="R", shock=1.0, + periods=4`) with `monetary_conditioning=True`. Overlays are local only: the + hosted server pins the model at 2965e82, before #70. Defaults match to the + pound. +3. The dashboard at obr-macroeconomic-model.vercel.app. +4. In Claude with the MCP connector: "Score raising the UK basic rate of income + tax to 21p." + +Don't run live: government investment under the default closure (GDP doesn't +move), corporation tax as receipts (`NNSCTP`, GDP exactly zero), or the +published closure in a demand run (no quarter converges). + +## 23. Where we could work together + +Options to discuss, not commitments. Each maps to something open in the repo: +the closure choice and a spending shock that moves borrowing; the investment +closure and DEFINE-UK; macro paths back into household results; the published +listing's open problems (G6, G7, N5); anchoring participation; joint write-ups. + +## 24. Questions for NEF + +Listen more than talk here. + +## 25. Proposed next steps + +Proposals for NEF to react to; agree owners and dates in the room. + +## 26. Thank you diff --git a/slideshows/nef-2026/config.ts b/slideshows/nef-2026/config.ts new file mode 100644 index 00000000..c8e9503b --- /dev/null +++ b/slideshows/nef-2026/config.ts @@ -0,0 +1,70 @@ +import type { SlideshowConfig } from "@/lib/types"; +import { + AccessSlide, + AgendaSlide, + AnchoringSlide, + ArchitectureSlide, + BankRateSlide, + ClosingSlide, + ClosuresSlide, + CollaborateSlide, + DefineSlide, + DemoSlide, + FitSlide, + ForecastRecordSlide, + IncomeTaxSlide, + InputsSlide, + LimitsSlide, + MicroMacroSlide, + MultipliersSlide, + NextStepsSlide, + PlatformSlide, + PublishedVsBuiltSlide, + QuestionsSlide, + ReviewSlide, + ScorecardSlide, + TitleSlide, + WhoWeAreSlide, + WhyOpenSlide, +} from "./slides"; + +export const nef2026Config: SlideshowConfig = { + id: "nef-2026", + title: "Opening up the OBR macroeconomic model", + description: + "PolicyEngine's open-source Python implementation of the OBR's published macroeconomic model: how it runs, how well it fits, and where to work together.", + // The exact meeting date isn't fixed; a day of 01 renders as "November 2026". + date: "2026-11-01", + location: "New Economics Foundation", + footerText: "New Economics Foundation · November 2026", + private: true, + clickerKeys: true, + slides: [ + TitleSlide, + AgendaSlide, + WhoWeAreSlide, + WhyOpenSlide, + PublishedVsBuiltSlide, + InputsSlide, + ArchitectureSlide, + ReviewSlide, + AnchoringSlide, + FitSlide, + ScorecardSlide, + MultipliersSlide, + IncomeTaxSlide, + ClosuresSlide, + BankRateSlide, + LimitsSlide, + PlatformSlide, + DefineSlide, + ForecastRecordSlide, + AccessSlide, + MicroMacroSlide, + DemoSlide, + CollaborateSlide, + QuestionsSlide, + NextStepsSlide, + ClosingSlide, + ], +}; diff --git a/slideshows/nef-2026/content.ts b/slideshows/nef-2026/content.ts new file mode 100644 index 00000000..a981ddd1 --- /dev/null +++ b/slideshows/nef-2026/content.ts @@ -0,0 +1,435 @@ +// Every figure on the slides comes from a file read at a pinned commit, checked +// on 18 November 2026: +// - PolicyEngine/obr-macroeconomic-model main 0fe04c9a (after #70, #71, #72); +// - PolicyEngine/macro main 2e5dffe7 (after #275); +// - PolicyEngine/obr-presentation main f4f819a7 (the July 2025 NEF deck). +// OBR-model numbers are taken from the model repo, not from the macro site, +// which still quoted the pre-#71 scorecard (4.25%) at this commit. +const obrCommit = "0fe04c9afa8e4e316d24bae40aacc9bba9cd5084"; +const macroCommit = "2e5dffe7a2b35d189c8df60ff2012abbdb675367"; +const priorDeckCommit = "f4f819a786dc6d33f5836aae22d4d5f93aa778da"; + +const obr = `https://github.com/PolicyEngine/obr-macroeconomic-model/blob/${obrCommit}`; +const macro = `https://github.com/PolicyEngine/macro/blob/${macroCommit}`; + +export type Source = { label: string; href: string }; + +export const sources = { + obrReadme: { label: "OBR model README", href: `${obr}/README.md` }, + scorecard: { + label: "Calibration scorecard", + href: `${obr}/docs/calibration_scorecard.md`, + }, + demo: { label: "Demo shocks", href: `${obr}/docs/demo.md` }, + demoResults: { + label: "demo_shocks.json", + href: `${obr}/results/demo_shocks.json`, + }, + siteFigures: { + label: "site_figures.json", + href: `${obr}/results/site_figures.json`, + }, + review: { + label: "Published-model review", + href: `${obr}/docs/published_model_review.md`, + }, + roadmap: { label: "OBR model roadmap", href: `${obr}/docs/ROADMAP.md` }, + forecasting: { + label: "Forecasting framework", + href: `${obr}/docs/forecasting_framework.md`, + }, + monetary: { + label: "Monetary conditioning", + href: `${obr}/docs/monetary_conditioning.md`, + }, + tywhh: { + label: "TYWHH changelog (#71)", + href: `${obr}/changelog.d/tywhh-seasonal-basis.fixed.md`, + }, + passthrough: { + label: "Price pass-through changelog (#70)", + href: `${obr}/changelog.d/price-passthrough-60.added.md`, + }, + macroReadme: { label: "Macro platform README", href: `${macro}/README.md` }, + compare: { label: "Model comparison page", href: `${macro}/models/index.html` }, + definePage: { label: "DEFINE-UK model page", href: `${macro}/define/index.html` }, + forecastPage: { + label: "Forecast track record", + href: `${macro}/forecasts/index.html`, + }, + forecastScores: { + label: "scorecard.json", + href: `${macro}/forecasts/scorecard.json`, + }, + forecastRules: { + label: "Forecast archive rules", + href: `${macro}/forecasts/README.md`, + }, + mcpServer: { + label: "mcp_server.py", + href: `${macro}/integration/src/policyengine_macro/mcp_server.py`, + }, + cli: { label: "cli.py", href: `${macro}/integration/src/policyengine_macro/cli.py` }, + capabilities: { + label: "capabilities.py", + href: `${macro}/integration/src/policyengine_macro/capabilities.py`, + }, + hostedPin: { + label: "integration/pyproject.toml", + href: `${macro}/integration/pyproject.toml`, + }, + connect: { label: "Use page (MCP, CLI, Python)", href: `${macro}/connect/index.html` }, + priorDeck: { + label: "July 2025 NEF deck", + href: `https://github.com/PolicyEngine/obr-presentation/blob/${priorDeckCommit}/NEF%20x%20PolicyEngine.pptx`, + }, + obrRepo: { + label: "PolicyEngine/obr-macroeconomic-model", + href: "https://github.com/PolicyEngine/obr-macroeconomic-model", + }, + macroRepo: { + label: "PolicyEngine/macro", + href: "https://github.com/PolicyEngine/macro", + }, +} satisfies Record; + +// --------------------------------------------------------------------------- +// What the OBR publishes and what we built (README "Features" and "Pins"; +// ROADMAP "What 'what the OBR has' decomposes into"; forecasting_framework.md +// "The data that made it work"). +export const listing = { + equations: 372, + // Dropped in at least one quarter of the pinned 2025Q1–2027Q4 reform solve + // because an input has no data (README; demo.md "Closure"). + droppedEquations: 82, + onsSeries: 355, + // Endogenous variables the model referenced but the EFO did not publish, and + // how many of them had ONS codes (forecasting_framework.md). + missingEndogenous: 261, + missingWithOnsCodes: 199, + listingDate: "15 October 2025", + efo: "October 2026 EFO", + efoPublished: "28 October 2026", +}; + +export const layers = [ + { + title: "The model", + obr: "372 equations and a variable list, published as EViews code", + ours: "All 372 parsed and transpiled to Python", + status: "built", + }, + { + title: "The engine", + obr: "EViews solves the system, swaps closures, holds add-factors", + ours: "A Gauss-Seidel solver, closures and add-factors in Python", + status: "partial", + }, + { + title: "The judgement", + obr: "Forecasters' add-factors and off-model assumptions, not published", + ours: "Not reproduced: a user supplies their own, labelled as such", + status: "gap", + }, +] as const; + +export const pipeline = [ + { title: "Transpile", text: "EViews listing to Python equations" }, + { title: "Fill inputs", text: "355 ONS series for what the EFO omits" }, + { title: "Close", text: "GDP endogenous; inventories held on the EFO path" }, + { title: "Solve", text: "Gauss-Seidel, quarter by quarter" }, + { title: "Anchor", text: "Add-factors put the baseline on the EFO" }, + { title: "Score", text: "Shocked run minus baseline, per quarter" }, +]; + +// --------------------------------------------------------------------------- +// Line-by-line review of the published listing (published_model_review.md, +// "Summary"). +export const review = { + points: 53, + accurate: 42, + documented: 22, + notFlagged: 20, + partly: 8, + uncheckable: 3, +}; + +export const reviewFindings = [ + { + code: "G7", + text: "Unemployment is undetermined: l.163 and l.175 are one identity", + }, + { + code: "G6", + text: "Nominal GDP and the investment deflator: l.337 and l.688 repeat", + }, + { code: "N5", text: "Apparent sign error in corporate FISIM (l.637)" }, + { code: "V5", text: "Pre-Brexit EU payment equations are still live" }, +]; + +// --------------------------------------------------------------------------- +// Anchoring and fit (README "Read this before quoting a number"; +// calibration_scorecard.md; site_figures.json "anchored_horizon"). +export const anchored = { + gdpMape: 0.44, + consMape: 0.72, + window: "2025Q1–2027Q4", + convergedQuarters: 12, +}; + +export const freeRunning = { + gdpMape: 4.05, + gdpMapeBefore71: 4.25, + householdIncome: 3.08, + householdIncomeBefore71: 4.3, + computed: 11, + headline: 21, + withinBand: 8, +}; + +// The macro platform's registry status for the emulator, verbatim +// (README model table, from capabilities.py). +export const registryStatus = + "anchored to the October 2026 EFO, not validated as a forecaster; predictive and policy checks weak"; + +export type ScoreRow = { + variable: string; + error: string; + status: "good" | "fair" | "poor" | "trivial"; +}; + +// calibration_scorecard.md table, default closure (nominal-GDP pin), +// October 2026 EFO, 2025Q1–2027Q4. +export const scorecardRows: ScoreRow[] = [ + { variable: "Real GDP", error: "4.05%", status: "fair" }, + { variable: "Consumption", error: "6.92%", status: "fair" }, + { variable: "Business investment", error: "7.34%", status: "fair" }, + { variable: "Household income", error: "3.08%", status: "fair" }, + { variable: "Real household income", error: "3.29%", status: "fair" }, + { variable: "Current account", error: "0.91% of GDP", status: "fair" }, + { variable: "Trade balance", error: "0.41% of GDP", status: "good" }, + { variable: "Employment", error: "0.00%", status: "trivial" }, + { variable: "Unemployment rate", error: "1.17pp", status: "poor" }, + { variable: "RPI inflation", error: "2.32pp", status: "poor" }, + { variable: "Company profits", error: "11.66%", status: "poor" }, +]; + +// --------------------------------------------------------------------------- +// Shocks against the OBR's published multipliers (demo.md table; ratios are +// current-price GDP per pound of current-price revenue for the tax rows, real +// GDP per pound for spending; OBR benchmarks from EFO July 2015 Box 3.2 as +// encoded in the repo). +export type MultiplierRow = { + label: string; + setting: string; + q1: number; + q4: number; + q12: number; + obr: number; + obrLabel: string; + /** The q1 / q4 / q12 ratios exactly as demo.md prints them. */ + display: string; +}; + +export const multiplierRows: MultiplierRow[] = [ + { + label: "Government consumption", + setting: "Default closure", + q1: 1.01, + q4: 1.03, + q12: 1.05, + obr: 0.6, + obrLabel: "0.6, fading", + display: "1.01 / 1.03 / 1.05", + }, + { + label: "Income tax, basic rate +1p", + setting: "Default closure", + q1: 0.1, + q4: 0.21, + q12: 0.38, + obr: 0.3, + obrLabel: "0.3, fading", + display: "0.10 / 0.21 / 0.38", + }, + { + label: "VAT +1pp", + setting: "Default closure", + q1: 0.013, + q4: 0.026, + q12: 0.043, + obr: 0.35, + obrLabel: "0.35, fading", + display: "0.013 / 0.026 / 0.043", + }, + { + label: "VAT +1pp", + setting: "Opt-in price pass-through", + q1: 0.175, + q4: 0.345, + q12: 0.643, + obr: 0.35, + obrLabel: "0.35, fading", + display: "0.175 / 0.345 / 0.643", + }, + { + label: "Government investment", + setting: "Opt-in investment closure", + q1: 1.03, + q4: 0.97, + q12: 0.98, + obr: 1.0, + obrLabel: "1.0, tapering", + display: "1.03 / 0.97 / 0.98", + }, +]; + +// Income tax +1p on the basic rate, £1,725m a quarter (HMRC ready reckoner, +// June 2025, 2026-27 column, £6.9bn a year / 4), sustained 2025Q1–2027Q4. +// Real GDP change, £m a quarter: results/demo_shocks.json "income_tax", +// rounded to the pound as in demo.md. +export const incomeTax = { + revenuePerQuarter: "£1,725m", + revenuePerYear: "£6.9bn", + gdpPath: [-161, -227, -285, -335, -381, -422, -456, -485, -510, -532, -551, -569], +}; + +// Corporation tax +5pp under the investment closure (demo.md row 5 and +// "One line on each"); government investment +£3bn a quarter (row 7). +export const corporationTax = { + gdpQ1: 0, + gdpQ4: -78, + gdpQ12: -384, + plateauFraction: "40%", + plateau: "£0.96bn", +}; + +export const capitalSpending = { + shock: "£3bn", + gdpQ1: 3075, + gdpQ4: 2901, + gdpQ12: 2932, +}; + +// Bank Rate +1pp for four quarters, peak fall in real GDP (demo.md rows 6 and +// 6b; BoE range from Quarterly Bulletin 1999 Q2, as cited there). +export const bankRate = [ + { label: "Default run (mortgage rate held)", value: 0.057, display: "−0.057%", kind: "model" }, + { label: "Mortgage rate moved with Bank Rate", value: 0.149, display: "−0.149%", kind: "model" }, + { label: "Bank of England, low end", value: 0.2, display: "−0.2%", kind: "benchmark" }, + { label: "Bank of England, high end", value: 0.35, display: "−0.35%", kind: "benchmark" }, +] as const; + +// Unemployment rate under the anchored long horizon, model vs EFO +// (site_figures.json "anchored_horizon.lfsur_pct"). +export const unemploymentDrift = [ + { quarter: "2027Q4", model: 3.75, efo: 5.07 }, + { quarter: "2031Q1", model: 1.05, efo: 4.17 }, +]; + +// --------------------------------------------------------------------------- +// The macro platform (macro README model table; models/index.html compare +// section, "compared by country, question, reform scoring and run surface"). +export type PlatformModel = { + name: string; + country: string; + answers: string; + scoresReforms: boolean; + runs: string; +}; + +export const platformModels: PlatformModel[] = [ + { + name: "PolicyEngine microsimulation", + country: "UK, US", + answers: "Household and population tax-benefit effects", + scoresReforms: true, + runs: "Hosted", + }, + { + name: "OBR emulator", + country: "UK", + answers: "Near-term UK fiscal and macro scenarios", + scoresReforms: true, + runs: "Hosted", + }, + { + name: "BoE SVAR", + country: "UK", + answers: "What drove the UK economy; short-run forecasts", + scoresReforms: false, + runs: "Hosted", + }, + { + name: "DEFINE-UK", + country: "UK", + answers: "UK climate-policy scenario deltas", + scoresReforms: false, + runs: "Local", + }, + { + name: "OG-UK", + country: "UK", + answers: "Long-run work, saving and capital", + scoresReforms: true, + runs: "Local", + }, + { + name: "FRB/US", + country: "US", + answers: "US monetary and fiscal shocks, by quarter", + scoresReforms: false, + runs: "Hosted, raw shocks", + }, + { + name: "US HANK", + country: "US", + answers: "How US shocks spread across household wealth", + scoresReforms: false, + runs: "Hosted, stylized shocks", + }, +]; + +// DEFINE-UK green public investment scenario minus the current-policies +// baseline, cached pinned run (upstream commit 846081a), from the DEFINE-UK +// model page. Deltas only; partial replication. +export const defineGreen = { + spending: "£15–16bn a year in 2027–31", + gdp2035: "+0.91%", + emissions2035: "−54 Mt", + emissionsShare2035: "−18.4%", + unemployment2035: "−0.22pp", + consumption2035: "+1.01%", +}; + +// Forecast track record (forecasts/scorecard.json and the generated status +// block of forecasts/index.html, last scored 16 Nov 2026). +export const forecastRecord = { + scored: 9, + live: 5, + liveIn68: 4, + retroactive: 4, + outturns: 5, + averageMiss: "0.34pp", + noChangeMiss: "0.47pp", + bias: "−0.33pp", + ranLow: "8 of 9", + rounds: 4, +}; + +// Tool counts at the pinned commit: @mcp.tool functions in mcp_server.py and +// @main.command functions in cli.py (the README's own count of 26 tools is +// stale against the code). +export const access = { mcpTools: 28, cliCommands: 27, publicModels: 7 }; + +// The OBR bridge's own benchmark (capabilities.py): static costing of a 1p +// basic-rate rise against HMRC's ready reckoner, 2026-27. +export const bridgeBenchmark = { + policyEngine: "£6.55bn", + hmrc: "£6.9bn", + gap: "5.1% below", +}; + +// The hosted MCP server's OBR pin (integration/pyproject.toml), which +// predates the opt-in overlays merged in #70. +export const hostedObrPin = "2965e82"; diff --git a/slideshows/nef-2026/slides/deck.module.css b/slideshows/nef-2026/slides/deck.module.css new file mode 100644 index 00000000..a8fad86b --- /dev/null +++ b/slideshows/nef-2026/slides/deck.module.css @@ -0,0 +1,698 @@ +/* NEF deck: every colour comes from a design token (app/globals.css). */ + +/* Leave space for the viewer's controls beside the footer text. */ +.deck :global(.gradient-footer) { + padding-right: 15rem; +} + +/* Figure slides: centre the body below the title, clear of the sources line. */ +.centerBody { + display: flex; + min-height: 0; + flex: 1; + flex-direction: column; + justify-content: center; + padding-bottom: 2.5rem; +} + +.takeaway { + margin-top: 1.75rem; + border-left: 4px solid var(--pe-teal); + padding-left: 1.25rem; + color: var(--pe-dark); + font-size: 1.45rem; + line-height: 1.4; +} + +/* Agenda rows. */ +.agenda { + display: grid; +} + +.agendaRow { + display: grid; + grid-template-columns: 4.5rem 1fr; + align-items: baseline; + gap: 1.5rem; + border-bottom: 1px solid var(--color-gray-200); + padding: 0.7rem 0; +} + +.agendaRow > span { + color: var(--pe-teal); + font-size: 2.25rem; + font-weight: 600; +} + +.agendaRow h2 { + color: var(--pe-dark); + font-size: 1.6rem; + font-weight: 600; + line-height: 1.25; +} + +.agendaRow p { + margin-top: 0.2rem; + color: var(--color-gray-600); + font-size: 1.3rem; + line-height: 1.4; +} + +/* Icon list: short items, one icon each. */ +.iconList { + display: grid; + gap: 1.35rem; +} + +.iconList.twoCol { + grid-template-columns: repeat(2, minmax(0, 1fr)); + column-gap: 3rem; +} + +.iconItem { + display: grid; + grid-template-columns: 3.25rem 1fr; + align-items: start; + gap: 1.1rem; +} + +.iconBadge { + display: flex; + height: 3.25rem; + width: 3.25rem; + align-items: center; + justify-content: center; + border-radius: 9999px; + background: var(--pe-light); + color: var(--pe-teal); +} + +.iconItem h2 { + color: var(--pe-dark); + font-size: 1.6rem; + font-weight: 600; + line-height: 1.25; +} + +.iconItem p { + margin-top: 0.2rem; + color: var(--color-gray-600); + font-size: 1.25rem; + line-height: 1.4; +} + +/* Cards in a grid. */ +.cardGrid { + display: grid; + gap: 1.5rem; +} + +.cols2 { + grid-template-columns: repeat(2, minmax(0, 1fr)); +} + +.cols3 { + grid-template-columns: repeat(3, minmax(0, 1fr)); +} + +.cols4 { + grid-template-columns: repeat(4, minmax(0, 1fr)); +} + +.card { + border: 1px solid var(--color-gray-200); + border-left: 4px solid var(--pe-teal); + border-radius: 0.5rem; + background: var(--bg-card); + padding: 1.25rem 1.4rem; + box-shadow: 0 1px 2px var(--shadow-light); +} + +.card h2 { + display: flex; + align-items: center; + gap: 0.6rem; + color: var(--pe-dark); + font-size: 1.45rem; + font-weight: 600; + line-height: 1.25; +} + +.card h2 svg { + flex-shrink: 0; + color: var(--pe-teal); +} + +.card p { + margin-top: 0.5rem; + color: var(--color-gray-600); + font-size: 1.2rem; + line-height: 1.4; +} + +.cardAmber { + border-left-color: var(--pe-amber); +} + +.cardAmber h2 svg { + color: var(--pe-amber-dark); +} + +/* Big numbers. */ +.card .stat { + color: var(--pe-teal); + font-size: 3.25rem; + font-weight: 700; + line-height: 1.05; + font-variant-numeric: tabular-nums; +} + +.card .statAmber { + color: var(--pe-amber-dark); +} + +.card .statLabel { + margin-top: 0.4rem; + color: var(--pe-dark); + font-size: 1.3rem; + font-weight: 600; + line-height: 1.3; +} + +.card .statNote { + margin-top: 0.35rem; + color: var(--color-gray-600); + font-size: 1.1rem; + line-height: 1.35; +} + +/* Three layers: what the OBR publishes and what we built. */ +.layers { + display: grid; + grid-template-columns: 14rem 1fr 1fr 9rem; + border: 1px solid var(--color-gray-200); + border-radius: 0.75rem; + overflow: hidden; + background: var(--bg-card); +} + +.layers > div { + border-bottom: 1px solid var(--color-gray-200); + padding: 1.15rem 1.35rem; + font-size: 1.3rem; + line-height: 1.35; + color: var(--color-gray-700); +} + +.layers .layerHead { + background: var(--bg-secondary); + color: var(--color-gray-500); + font-size: 0.95rem; + font-weight: 700; + letter-spacing: 0.12em; + text-transform: uppercase; +} + +.layers .layerName { + color: var(--pe-dark); + font-size: 1.5rem; + font-weight: 700; +} + +.layers > div:nth-last-child(-n + 4) { + border-bottom: none; +} + +.chip { + display: inline-flex; + align-items: center; + gap: 0.35rem; + border-radius: 9999px; + padding: 0.25rem 0.8rem; + font-size: 1rem; + font-weight: 600; + white-space: nowrap; +} + +.chipGood { + background: var(--pe-light); + color: var(--pe-teal-dark); +} + +.chipMid { + background: var(--bg-secondary); + color: var(--pe-amber-dark); +} + +.chipBad { + background: var(--bg-tertiary); + color: var(--color-gray-700); +} + +/* Pipeline: six steps with arrows. */ +.pipeline { + display: grid; + grid-template-columns: repeat(6, minmax(0, 1fr)); + gap: 1.1rem; +} + +.step { + position: relative; + border: 1px solid var(--color-gray-200); + border-top: 4px solid var(--pe-teal); + border-radius: 0.5rem; + background: var(--bg-card); + padding: 1.1rem 1rem 1.2rem; + box-shadow: 0 1px 2px var(--shadow-light); +} + +.step:not(:last-child)::after { + content: ""; + position: absolute; + top: 50%; + right: -0.85rem; + border-top: 0.45rem solid transparent; + border-bottom: 0.45rem solid transparent; + border-left: 0.55rem solid var(--color-gray-400); + transform: translateY(-50%); +} + +.step .stepNum { + color: var(--pe-teal); + font-size: 1rem; + font-weight: 700; + letter-spacing: 0.12em; +} + +.step h2 { + margin-top: 0.35rem; + color: var(--pe-dark); + font-size: 1.45rem; + font-weight: 700; +} + +.step p { + margin-top: 0.35rem; + color: var(--color-gray-600); + font-size: 1.1rem; + line-height: 1.35; +} + +.surfaces { + margin-top: 2rem; + display: grid; + grid-template-columns: repeat(3, minmax(0, 1fr)); + gap: 1.1rem; +} + +.surface { + display: flex; + align-items: center; + gap: 0.85rem; + border-radius: 0.5rem; + background: var(--bg-secondary); + padding: 0.9rem 1.1rem; + color: var(--pe-dark); + font-size: 1.25rem; + font-weight: 600; +} + +.surface svg { + color: var(--pe-teal); + flex-shrink: 0; +} + +.surface span { + color: var(--color-gray-600); + font-weight: 400; +} + +/* Tables. */ +.table { + width: 100%; + border-collapse: collapse; + font-size: 1.2rem; +} + +.table th { + border-bottom: 2px solid var(--color-gray-300); + padding: 0.55rem 0.9rem; + color: var(--color-gray-500); + font-size: 0.95rem; + font-weight: 700; + letter-spacing: 0.1em; + text-align: left; + text-transform: uppercase; +} + +.table td { + border-bottom: 1px solid var(--color-gray-200); + padding: 0.42rem 0.9rem; + color: var(--color-gray-700); + line-height: 1.3; +} + +.table td:first-child { + color: var(--pe-dark); + font-weight: 600; +} + +.num { + text-align: right !important; + font-variant-numeric: tabular-nums; +} + +.yes { + color: var(--pe-teal); +} + +.no { + color: var(--color-gray-400); +} + +/* Multiplier dot plot. */ +.dotPlot { + display: grid; + grid-template-columns: 20rem 1fr 15rem; + align-items: center; + row-gap: 0.4rem; + column-gap: 1.5rem; +} + +.dotLabel h2 { + color: var(--pe-dark); + font-size: 1.35rem; + font-weight: 600; + line-height: 1.2; +} + +.dotLabel p { + color: var(--color-gray-500); + font-size: 1.05rem; +} + +.track { + position: relative; + height: 3.6rem; + border-bottom: 1px solid var(--color-gray-200); +} + +.trackLine { + position: absolute; + top: 50%; + height: 4px; + border-radius: 2px; + background: var(--color-teal-200); + transform: translateY(-50%); +} + +.dot { + position: absolute; + top: 50%; + display: flex; + height: 1.9rem; + width: 1.9rem; + align-items: center; + justify-content: center; + border-radius: 9999px; + background: var(--pe-teal); + color: white; + font-size: 0.75rem; + font-weight: 700; + transform: translate(-50%, -50%); +} + +.dotQ1 { + background: var(--color-teal-200); + color: var(--pe-dark); +} + +.dotQ4 { + background: var(--color-teal-400); +} + +.dotQ12 { + background: var(--color-teal-700); +} + +.benchmark { + position: absolute; + top: 0.15rem; + bottom: 0.15rem; + width: 4px; + border-radius: 2px; + background: var(--pe-amber); + transform: translateX(-50%); +} + +.dotValue { + white-space: nowrap; + color: var(--color-gray-600); + font-size: 1.1rem; + font-variant-numeric: tabular-nums; + text-align: right; +} + +.axis { + position: relative; + height: 1.8rem; + color: var(--color-gray-500); + font-size: 1rem; +} + +.axis span { + position: absolute; + top: 0.25rem; + transform: translateX(-50%); +} + +.legend { + margin-top: 1.25rem; + display: flex; + flex-wrap: wrap; + gap: 1.75rem; + color: var(--color-gray-600); + font-size: 1.1rem; +} + +.legend span { + display: inline-flex; + align-items: center; + gap: 0.5rem; +} + +.legendDot { + display: inline-block; + height: 1rem; + width: 1rem; + border-radius: 9999px; +} + +.legendTick { + display: inline-block; + height: 1.2rem; + width: 4px; + border-radius: 2px; + background: var(--pe-amber); +} + +/* Quarterly bar path (income tax). */ +.bars { + display: grid; + grid-template-columns: repeat(12, minmax(0, 1fr)); + align-items: start; + gap: 0.7rem; + height: 22rem; + border-top: 2px solid var(--color-gray-300); +} + +.barCol { + display: flex; + height: 100%; + flex-direction: column; + align-items: center; +} + +.bar { + width: 100%; + border-radius: 0 0 0.3rem 0.3rem; + background: var(--pe-teal); +} + +.barValue { + margin-top: 0.35rem; + color: var(--pe-dark); + font-size: 1rem; + font-weight: 600; + font-variant-numeric: tabular-nums; +} + +.barAxis { + display: grid; + grid-template-columns: repeat(12, minmax(0, 1fr)); + gap: 0.7rem; + margin-top: 0.5rem; + color: var(--color-gray-500); + font-size: 1rem; + text-align: center; +} + +/* Horizontal bars (Bank Rate). */ +.hbars { + display: grid; + grid-template-columns: 30rem 1fr; + align-items: center; + row-gap: 1.1rem; + column-gap: 1.5rem; +} + +.hbarLabel { + color: var(--pe-dark); + font-size: 1.3rem; + font-weight: 600; + line-height: 1.25; +} + +.hbarTrack { + display: flex; + align-items: center; + gap: 0.8rem; +} + +.hbar { + height: 2.6rem; + border-radius: 0 0.35rem 0.35rem 0; + background: var(--pe-teal); +} + +.hbarBenchmark { + background: var(--pe-amber); +} + +.hbarValue { + color: var(--pe-dark); + font-size: 1.35rem; + font-weight: 700; + font-variant-numeric: tabular-nums; +} + +/* Flow: microsim to macro. */ +.flow { + display: grid; + grid-template-columns: repeat(4, minmax(0, 1fr)); + gap: 1.6rem; +} + +.flowBox { + position: relative; + border: 1px solid var(--color-gray-200); + border-radius: 0.6rem; + background: var(--bg-card); + padding: 1.15rem 1.2rem; + box-shadow: 0 1px 2px var(--shadow-light); +} + +.flowBox:not(:last-child)::after { + content: ""; + position: absolute; + top: 50%; + right: -1.15rem; + border-top: 0.5rem solid transparent; + border-bottom: 0.5rem solid transparent; + border-left: 0.6rem solid var(--color-gray-400); + transform: translateY(-50%); +} + +.flowBox h2 { + display: flex; + align-items: center; + gap: 0.55rem; + color: var(--pe-dark); + font-size: 1.35rem; + font-weight: 700; +} + +.flowBox h2 svg { + color: var(--pe-teal); + flex-shrink: 0; +} + +.flowBox p { + margin-top: 0.4rem; + color: var(--color-gray-600); + font-size: 1.15rem; + line-height: 1.35; +} + +.flowBox code, +.mono { + font-family: var(--font-mono); + font-size: 0.95em; + color: var(--pe-dark); +} + +.flowOut { + margin-top: 1.6rem; + display: grid; + grid-template-columns: repeat(2, minmax(0, 1fr)); + gap: 1.6rem; +} + +/* Demo steps. */ +.demoSteps { + display: grid; + gap: 1rem; +} + +.demoStep { + display: grid; + grid-template-columns: 3.5rem 1fr 26rem; + align-items: center; + gap: 1.25rem; + border-bottom: 1px solid var(--color-gray-200); + padding-bottom: 1rem; +} + +.demoStep > span { + display: flex; + height: 3rem; + width: 3rem; + align-items: center; + justify-content: center; + border-radius: 9999px; + background: var(--pe-teal); + color: white; + font-size: 1.3rem; + font-weight: 700; +} + +.demoStep h2 { + color: var(--pe-dark); + font-size: 1.5rem; + font-weight: 600; +} + +.demoStep p { + margin-top: 0.15rem; + color: var(--color-gray-600); + font-size: 1.15rem; +} + +.demoStep code { + border-radius: 0.4rem; + background: var(--bg-secondary); + padding: 0.5rem 0.75rem; + color: var(--pe-dark); + font-family: var(--font-mono); + font-size: 1rem; +} + +/* Section slide. */ +.sectionKicker { + margin-bottom: 0.75rem; + color: var(--pe-teal); + font-size: 1rem; + font-weight: 700; + letter-spacing: 0.16em; + text-transform: uppercase; +} diff --git a/slideshows/nef-2026/slides/figures.tsx b/slideshows/nef-2026/slides/figures.tsx new file mode 100644 index 00000000..525f34d1 --- /dev/null +++ b/slideshows/nef-2026/slides/figures.tsx @@ -0,0 +1,172 @@ +import { Fragment } from "react"; +import { + bankRate, + incomeTax, + multiplierRows, + scorecardRows, + type ScoreRow, +} from "../content"; +import styles from "./deck.module.css"; + +// HTML and CSS figures, no chart library. Every value comes from content.ts. + +const statusChip: Record = { + good: { label: "Good", className: styles.chipGood }, + fair: { label: "Fair", className: styles.chipGood }, + poor: { label: "Poor", className: styles.chipMid }, + trivial: { label: "Trivial identity", className: styles.chipBad }, +}; + +/** Free-running scorecard: the 11 computed headline variables. */ +export function ScorecardTable() { + const half = Math.ceil(scorecardRows.length / 2); + const columns = [scorecardRows.slice(0, half), scorecardRows.slice(half)]; + return ( +
+ {columns.map((rows, index) => ( + + + + + + + + + + {rows.map((row) => ( + + + + + + ))} + +
VariableError, 3 yearsBand
{row.variable}{row.error} + + {statusChip[row.status].label} + +
+ ))} +
+ ); +} + +const plotMax = 1.1; +const pct = (value: number) => `${(Math.min(value, plotMax) / plotMax) * 100}%`; + +/** GDP per pound at q1, q4 and q12 against the OBR's published multiplier. */ +export function MultiplierPlot() { + const ticks = [0, 0.25, 0.5, 0.75, 1]; + return ( +
+
+ {multiplierRows.map((row) => { + const low = Math.min(row.q1, row.q4, row.q12); + const high = Math.max(row.q1, row.q4, row.q12); + return ( + +
+

{row.label}

+

{row.setting}

+
+
+
+
+
+ 1 +
+
+ 4 +
+
+ 12 +
+
+
+ {row.display} +
+ OBR {row.obrLabel} +
+ + ); + })} +
+
+ {ticks.map((tick) => ( + + {tick.toFixed(2)} + + ))} +
+
+
+
+ + + Quarter 1 + + + + Quarter 4 + + + + Quarter 12 + + + + OBR published multiplier (impact) + +
+
+ ); +} + +/** Real GDP change per quarter for the income-tax shock (bars hang down). */ +export function IncomeTaxBars() { + const max = Math.max(...incomeTax.gdpPath.map((value) => Math.abs(value))); + return ( +
+
+ {incomeTax.gdpPath.map((value, index) => ( +
+
+ {value.toLocaleString("en-GB")} +
+ ))} +
+
+ {incomeTax.gdpPath.map((_, index) => ( + q{index + 1} + ))} +
+
+ ); +} + +/** Peak fall in GDP for a 1pp Bank Rate rise held four quarters. */ +export function BankRateBars() { + const max = Math.max(...bankRate.map((row) => row.value)); + return ( +
+ {bankRate.map((row) => ( + +

{row.label}

+
+
+ {row.display} +
+ + ))} +
+ ); +} diff --git a/slideshows/nef-2026/slides/index.tsx b/slideshows/nef-2026/slides/index.tsx new file mode 100644 index 00000000..5a33060a --- /dev/null +++ b/slideshows/nef-2026/slides/index.tsx @@ -0,0 +1,1054 @@ +import { Fragment, type ReactNode } from "react"; +import { + IconAdjustmentsHorizontal, + IconAlertTriangle, + IconArrowsShuffle, + IconBolt, + IconBook, + IconBrandGithub, + IconBrandPython, + IconBuildingBank, + IconCalendarEvent, + IconChartBar, + IconChartLine, + IconCode, + IconDatabase, + IconEye, + IconFileCode, + IconGitCompare, + IconLeaf, + IconLink, + IconMail, + IconMessageQuestion, + IconPlugConnected, + IconRobot, + IconScale, + IconSearch, + IconTarget, + IconTerminal2, + IconUsers, + IconUsersGroup, + IconWorld, + IconWritingSign, + type Icon, +} from "@tabler/icons-react"; +import Slide from "@/components/core/Slide"; +import CoverSlide from "@/components/layout/CoverSlide"; +import SlideHeader from "@/components/layout/SlideHeader"; +import SlideTitle from "@/components/layout/SlideTitle"; +import { speakers } from "@/lib/speakers"; +import { + access, + anchored, + bridgeBenchmark, + capitalSpending, + corporationTax, + defineGreen, + forecastRecord, + freeRunning, + hostedObrPin, + incomeTax, + layers, + listing, + pipeline, + platformModels, + registryStatus, + review, + reviewFindings, + sources, + unemploymentDrift, + type Source, +} from "../content"; +import styles from "./deck.module.css"; +import { + BankRateBars, + IncomeTaxBars, + MultiplierPlot, + ScorecardTable, +} from "./figures"; + +const agenda = [ + { + title: "The OBR model in Python", + text: "What the OBR publishes, what we built, how it runs", + }, + { + title: "How well it fits", + text: "Anchored, free-running, and what each number means", + }, + { + title: "Policy shocks and limits", + text: "Results against the OBR's published multipliers", + }, + { + title: "The macro platform", + text: "Seven models, a forecast record, and AI-agent access", + }, + { + title: "Working together", + text: "Where NEF and PolicyEngine could collaborate", + }, +]; + +const sections = agenda.map( + (item, index) => `${index + 1} · ${item.title}`, +); + +function ExternalLink({ + children, + href, + className = "", +}: { + children: ReactNode; + href: string; + className?: string; +}) { + return ( + + {children} + + ); +} + +function SourceLine({ items }: { items: Source[] }) { + return ( +
+ Sources + {items.map((item) => ( + + {item.label} + + ))} +
+ ); +} + +function Frame({ + section, + title, + subtitle, + children, + references = [], + center = false, +}: { + section?: string; + title: string; + subtitle?: string; + children: ReactNode; + references?: Source[]; + /** Centre the body in the space below the title (for figure slides). */ + center?: boolean; +}) { + return ( + +
+ + {section && ( +

+ {section} +

+ )} + {title} + {subtitle && ( +

+ {subtitle} +

+ )} +
+ {center ?
{children}
: children} +
+ {references.length > 0 && } +
+ ); +} + +type Item = { icon: Icon; title: string; text?: ReactNode }; + +function IconList({ items, twoCol = false }: { items: Item[]; twoCol?: boolean }) { + return ( +
+ {items.map(({ icon: ItemIcon, title, text }) => ( +
+ + +
+

{title}

+ {text &&

{text}

} +
+
+ ))} +
+ ); +} + +function Card({ + icon: CardIcon, + title, + children, + amber = false, +}: { + icon: Icon; + title: string; + children?: ReactNode; + amber?: boolean; +}) { + return ( +
+

+

+ {children &&

{children}

} +
+ ); +} + +function Stat({ + value, + label, + note, + amber = false, +}: { + value: ReactNode; + label: string; + note?: ReactNode; + amber?: boolean; +}) { + return ( +
+

{value}

+

{label}

+ {note &&

{note}

} +
+ ); +} + +// --------------------------------------------------------------------------- +// Opening + +export function TitleSlide() { + return ( + + ); +} + +export function AgendaSlide() { + return ( + +
+ {agenda.map((item, index) => ( +
+ {String(index + 1).padStart(2, "0")} +
+

{item.title}

+

{item.text}

+
+
+ ))} +
+ + ); +} + +export function WhoWeAreSlide() { + return ( + + + + ); +} + +export function WhyOpenSlide() { + return ( + + + + ); +} + +const layerStatus = { + built: { label: "Built", className: styles.chipGood }, + partial: { label: "Partly built", className: styles.chipMid }, + gap: { label: "Left to users", className: styles.chipBad }, +} as const; + +export function PublishedVsBuiltSlide() { + return ( + +
+
Layer
+
The OBR
+
Our Python version
+
Status
+ {layers.map((layer) => ( + +
{layer.title}
+
{layer.obr}
+
{layer.ours}
+
+ + {layerStatus[layer.status].label} + +
+
+ ))} +
+

+ Same equations, but not the OBR's judgements: the forecast a user + gets depends on the judgements they supply +

+ + ); +} + +export function InputsSlide() { + return ( + +
+ + + + +
+

+ Where the OBR publishes an equation but not its inputs, we estimate + them from published sources or seed them, and say which +

+ + ); +} + +export function ArchitectureSlide() { + return ( + +
+ {pipeline.map((step, index) => ( +
+

{String(index + 1).padStart(2, "0")}

+

{step.title}

+

{step.text}

+
+ ))} +
+
+
+
+
+
+
+
+
+ + ); +} + +export function ReviewSlide() { + return ( + +
+
+ + + +
+
+

+ Problems in the published files +

+
+ {reviewFindings.map((finding) => ( +
+ {finding.code} + {finding.text} +
+ ))} +
+
+
+ + ); +} + +// --------------------------------------------------------------------------- +// Fit + +export function AnchoringSlide() { + return ( + + + + ); +} + +export function FitSlide() { + return ( + +
+ + +
+

+ Our platform's label for it: “{registryStatus.split(";")[0]}” +

+ + ); +} + +export function ScorecardSlide() { + return ( + + + + ); +} + +// --------------------------------------------------------------------------- +// Shocks and limits + +export function MultipliersSlide() { + return ( + + + + ); +} + +export function IncomeTaxSlide() { + return ( + +
+ + +
+ + ); +} + +export function ClosuresSlide() { + return ( + +
+
+

Corporation tax +5pp

+
+ + +
+

+ {corporationTax.plateauFraction} of the way to a plateau near{" "} + {corporationTax.plateau} a quarter. No sourced OBR benchmark +

+
+
+

+ Government investment +{capitalSpending.shock} a quarter +

+
+ + +
+

+ Identity pass-through at about 1.0, no taper. Under the default + closure the channel is dead +

+
+
+ + ); +} + +export function BankRateSlide() { + return ( + + +

+ Only consumption and household interest respond. Investment, sterling, + house prices and gilts have no interest-rate equation in the listing +

+ + ); +} + +export function LimitsSlide() { + return ( + + + + ); +} + +// --------------------------------------------------------------------------- +// Platform + +export function PlatformSlide() { + return ( + + + + + + + + + + + + + {platformModels.map((model) => ( + + + + + + + + ))} + +
ModelCountryAnswersScores reformsRuns
{model.name}{model.country}{model.answers} + {model.scoresReforms ? "Yes" : "No"} + {model.runs}
+ + ); +} + +export function DefineSlide() { + return ( + +
+ + + + +
+

+ Deltas only, never levels. A partial replication of the published + model, run locally; public debt and interest are not among its outputs +

+ + ); +} + +export function ForecastRecordSlide() { + return ( + +
+ + + + +
+

+ Too few to show skill. All scored forecasts are from the BoE SVAR and + its unemployment satellite, not the OBR emulator +

+ + ); +} + +export function AccessSlide() { + return ( + + + + ); +} + +export function MicroMacroSlide() { + return ( + +
+
+

+

+

A PolicyEngine-UK parameter change

+
+
+

+

+

Population microsimulation, £bn a year

+
+
+

+

+

+ Quarterly HHDI_ADDFACTOR path +

+
+
+

+

+

GDP, consumption, investment by quarter

+
+
+
+ + Decile changes, winners and losers. Poverty from PolicyEngine-UK, + before housing costs as the headline + + + {`1p on the basic rate: ${bridgeBenchmark.policyEngine} static, against the ready reckoner's ${bridgeBenchmark.hmrc} (${bridgeBenchmark.gap})`} + +
+ + ); +} + +const demoSteps = [ + { + title: "Run a shock in Python", + text: "Government consumption, then income tax, 12 quarters", + code: "run_reform(var=\"CGG\", shock=1250)", + }, + { + title: "Switch on a labelled overlay", + text: "VAT with price pass-through; Bank Rate with mortgage rates", + code: "price_passthrough=True", + }, + { + title: "Open the dashboard", + text: "Scenarios, variables and the equations behind them", + code: "obr-macroeconomic-model.vercel.app", + }, + { + title: "Ask an AI agent", + text: "Score a 21p basic rate through microsimulation and the OBR model", + code: "start_job · score_reform", + }, +]; + +export function DemoSlide() { + return ( + +
+ {demoSteps.map((step, index) => ( +
+ {index + 1} +
+

{step.title}

+

{step.text}

+
+ {step.code} +
+ ))} +
+ + ); +} + +// --------------------------------------------------------------------------- +// Working together + +export function CollaborateSlide() { + return ( + +
+ + Alternatives to our default closure, and a spending shock that moves + borrowing + + + The investment closure beside DEFINE-UK scenarios + + + Macro paths back into household results + + + The listing's open problems, from unemployment to the deflator + + + Anchoring participation so unemployment tracks the EFO + + + Methods notes or scenario analysis, written together + +
+ + ); +} + +export function QuestionsSlide() { + return ( + + + + ); +} + +export function NextStepsSlide() { + return ( + +
+ + Run the model together on a scenario NEF chooses + + + Agree scope, closures and what counts as a check + + + Go through the open equation and closure issues on GitHub + + + Agree a date to review results and a possible write-up + +
+ + ); +} + +const contacts = [ + { label: "policyengine.org", url: "https://policyengine.org", Icon: IconWorld }, + { label: "hello@policyengine.org", url: "mailto:hello@policyengine.org", Icon: IconMail }, + { label: sources.obrRepo.label, url: sources.obrRepo.href, Icon: IconBrandGithub }, + { label: sources.macroRepo.label, url: sources.macroRepo.href, Icon: IconBrandGithub }, +]; + +export function ClosingSlide() { + return ( + +

Thank you

+ +
+ ); +} From 2a617f14a547e4737860415d7e5632c40e15c9c2 Mon Sep 17 00:00:00 2001 From: vahid-ahmadi Date: Wed, 18 Nov 2026 10:25:29 +0000 Subject: [PATCH 02/24] NEF deck: tighten wording and the demo note 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 --- slideshows/nef-2026/README.md | 7 ++++--- slideshows/nef-2026/SPEAKER-NOTES.md | 12 +++++++----- slideshows/nef-2026/content.ts | 5 +++-- slideshows/nef-2026/slides/deck.module.css | 4 ++-- slideshows/nef-2026/slides/index.tsx | 17 ++++++++++------- 5 files changed, 26 insertions(+), 19 deletions(-) diff --git a/slideshows/nef-2026/README.md b/slideshows/nef-2026/README.md index 4b21690c..ce360886 100644 --- a/slideshows/nef-2026/README.md +++ b/slideshows/nef-2026/README.md @@ -23,9 +23,10 @@ Five parts, after a title, an agenda and a slide on PolicyEngine: 5. Working together: a demo plan, collaboration areas, questions for NEF and proposed next steps (slides 22–25) -It follows PolicyEngine's July 2025 meeting with NEF, which covered the -tax-benefit microsimulation (`NEF x PolicyEngine.pptx` in -`PolicyEngine/obr-presentation`, commit `f4f819a7`). +It follows PolicyEngine's July 2025 deck for NEF, which covered the +tax-benefit microsimulation (`NEF x PolicyEngine.pptx` in the private +`PolicyEngine/obr-presentation` repo, commit `f4f819a7`; it isn't linked on +the slides). ## Editing and presenting diff --git a/slideshows/nef-2026/SPEAKER-NOTES.md b/slideshows/nef-2026/SPEAKER-NOTES.md index d9f35b05..cfaa7112 100644 --- a/slideshows/nef-2026/SPEAKER-NOTES.md +++ b/slideshows/nef-2026/SPEAKER-NOTES.md @@ -16,8 +16,9 @@ direct about limits. ## 3. PolicyEngine -We met NEF in July 2025 about the tax-benefit microsimulation (the two-child -limit and a NICs example). This meeting is the macro side. +Our July 2025 deck for NEF (dated 16 July 2025) covered the tax-benefit +microsimulation (the two-child limit and a NICs example). Confirm with Max +whether there has been contact since. This meeting is the macro side. ## 4. Why an open OBR model @@ -230,9 +231,10 @@ build takes a few minutes. If using `score_reform`, start it through 1. `run_reform(name="demo", var="CGG", shock=1250, periods=12)`, then income tax (`var="TYEM", shock=1725`). 2. VAT with `price_passthrough=True`; Bank Rate (`var="R", shock=1.0, - periods=4`) with `monetary_conditioning=True`. Overlays are local only: the - hosted server pins the model at 2965e82, before #70. Defaults match to the - pound. + periods=4`) with `monetary_conditioning=True`. Run overlays locally: hosted + `obr_shock` has no overlay parameter, and the hosted model (2965e82) is 10 + commits behind main, before #70 and #71. #70 left defaults unchanged to the + pound and #71 left reform deltas unchanged, by their own changelogs. 3. The dashboard at obr-macroeconomic-model.vercel.app. 4. In Claude with the MCP connector: "Score raising the UK basic rate of income tax to 21p." diff --git a/slideshows/nef-2026/content.ts b/slideshows/nef-2026/content.ts index a981ddd1..a62b793a 100644 --- a/slideshows/nef-2026/content.ts +++ b/slideshows/nef-2026/content.ts @@ -430,6 +430,7 @@ export const bridgeBenchmark = { gap: "5.1% below", }; -// The hosted MCP server's OBR pin (integration/pyproject.toml), which -// predates the opt-in overlays merged in #70. +// The hosted MCP server's OBR pin (integration/pyproject.toml). GitHub's +// compare view puts it 10 commits behind 0fe04c9a, before #70 (VAT price +// pass-through) and #71; hosted obr_shock exposes no overlay parameter. export const hostedObrPin = "2965e82"; diff --git a/slideshows/nef-2026/slides/deck.module.css b/slideshows/nef-2026/slides/deck.module.css index a8fad86b..34568e59 100644 --- a/slideshows/nef-2026/slides/deck.module.css +++ b/slideshows/nef-2026/slides/deck.module.css @@ -416,7 +416,7 @@ justify-content: center; border-radius: 9999px; background: var(--pe-teal); - color: white; + color: var(--text-inverse); font-size: 0.75rem; font-weight: 700; transform: translate(-50%, -50%); @@ -661,7 +661,7 @@ justify-content: center; border-radius: 9999px; background: var(--pe-teal); - color: white; + color: var(--text-inverse); font-size: 1.3rem; font-weight: 700; } diff --git a/slideshows/nef-2026/slides/index.tsx b/slideshows/nef-2026/slides/index.tsx index 5a33060a..0ce16b77 100644 --- a/slideshows/nef-2026/slides/index.tsx +++ b/slideshows/nef-2026/slides/index.tsx @@ -50,6 +50,7 @@ import { incomeTax, layers, listing, + multiplierRows, pipeline, platformModels, registryStatus, @@ -269,7 +270,7 @@ export function WhoWeAreSlide() { @@ -596,7 +597,7 @@ export function IncomeTaxSlide() { @@ -686,7 +687,7 @@ export function LimitsSlide() { { icon: IconScale, title: "Spending multiplier is about 1", - text: "By construction, against the OBR's 0.6; borrowing does not move", + text: `By construction, against the OBR's ${multiplierRows[0].obr}; borrowing does not move`, }, { icon: IconAdjustmentsHorizontal, @@ -766,7 +767,8 @@ export function DefineSlide() {

Deltas only, never levels. A partial replication of the published - model, run locally; public debt and interest are not among its outputs + model, run locally; public debt and interest are not among the served + outputs

); @@ -877,7 +879,7 @@ export function MicroMacroSlide() { Decile changes, winners and losers. Poverty from PolicyEngine-UK, before housing costs as the headline - + {`1p on the basic rate: ${bridgeBenchmark.policyEngine} static, against the ready reckoner's ${bridgeBenchmark.hmrc} (${bridgeBenchmark.gap})`}
@@ -911,8 +913,9 @@ const demoSteps = [ export function DemoSlide() { return ( From 452b37595960eff13e1793baaf1bb8dfe668c357 Mon Sep 17 00:00:00 2001 From: vahid-ahmadi Date: Wed, 18 Nov 2026 10:50:27 +0000 Subject: [PATCH 03/24] NEF deck: Thibault's review and our answer, live site slide, public deck - 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 --- slideshows/nef-2026/README.md | 29 ++-- slideshows/nef-2026/SPEAKER-NOTES.md | 80 ++++++++--- slideshows/nef-2026/config.ts | 9 +- slideshows/nef-2026/content.ts | 20 +++ slideshows/nef-2026/slides/SiteEmbed.tsx | 84 +++++++++++ slideshows/nef-2026/slides/deck.module.css | 4 + slideshows/nef-2026/slides/embed.module.css | 95 +++++++++++++ slideshows/nef-2026/slides/index.tsx | 149 +++++++++++++++++++- 8 files changed, 432 insertions(+), 38 deletions(-) create mode 100644 slideshows/nef-2026/slides/SiteEmbed.tsx create mode 100644 slideshows/nef-2026/slides/embed.module.css diff --git a/slideshows/nef-2026/README.md b/slideshows/nef-2026/README.md index ce360886..f2fd801f 100644 --- a/slideshows/nef-2026/README.md +++ b/slideshows/nef-2026/README.md @@ -1,27 +1,28 @@ # New Economics Foundation meeting, November 2026 -26 slides at `/slides/nef-2026`, for a meeting with the New Economics -Foundation (NEF) on working together on the OBR macroeconomic model. The deck -is private (`private: true`), because the macro platform it shows isn't -launched yet. The exact meeting date isn't fixed, so `config.ts` uses +30 slides at `/slides/nef-2026`, for a meeting with the New Economics +Foundation (NEF) on working together on the OBR macroeconomic model. The deck is +public. Slide 21 embeds the in-development macro site +(policyengine-macro.vercel.app) live; the site allows this deck's origins to +frame it (PolicyEngine/macro#276). The exact meeting date isn't fixed, so `config.ts` uses `2026-11-01`, which renders as "November 2026"; change it, and the footer, once the date is set. Five parts, after a title, an agenda and a slide on PolicyEngine: 1. The OBR model in Python: why an open version, what the OBR publishes and - what we built, the inputs, how it runs, and the line-by-line review of the - published listing (slides 4–8) + what we built, the inputs, how it runs, and Thibault's review of the published code + and our answer (slides 4–11) 2. How well it fits: anchoring to the October 2026 EFO, the two numbers that - are easy to misread, and the free-running scorecard (slides 9–11) + are easy to misread, and the free-running scorecard (slides 12–14) 3. Policy shocks and limits: results against the OBR's published multipliers, income tax, corporation tax and capital spending, Bank Rate, and the known - limits (slides 12–16) -4. The macro platform: the seven models, a DEFINE-UK green investment example, + limits (slides 15–19) +4. The macro platform: the seven models, the site live, a DEFINE-UK green investment example, the forecast record, code and AI-agent access, and the link from - microsimulation to the OBR model (slides 17–21) + microsimulation to the OBR model (slides 20–25) 5. Working together: a demo plan, collaboration areas, questions for NEF and - proposed next steps (slides 22–25) + proposed next steps (slides 26–29) It follows PolicyEngine's July 2025 deck for NEF, which covered the tax-benefit microsimulation (`NEF x PolicyEngine.pptx` in the private @@ -34,16 +35,18 @@ the slides). - `content.ts` holds every number on the slides, each with its source pinned to a commit, plus the tables and lists. - `slides/index.tsx` contains the slides. +- `slides/SiteEmbed.tsx` frames the live site, with buttons for its main + pages, Expand and New tab (copied from autumn-budget-2026's `DashboardEmbed`). - `slides/figures.tsx` draws the scorecard table, the multiplier dot plot, the income-tax bars and the Bank Rate bars (HTML and CSS, no chart library). - `SPEAKER-NOTES.md` gives the presenter track, the detail behind each slide and what not to claim. Run `bun install --frozen-lockfile`, then -`NEXT_PUBLIC_PRIVATE_PASSWORD= bun dev`. Open +`bun dev`. Open `http://localhost:3000/slides/nef-2026`. Arrow keys, Page Up and Page Down (a clicker) move between slides. Export with -`NEXT_PUBLIC_PRIVATE_PASSWORD= bun run export nef-2026 /path/to/output.pdf`. +`bun run export nef-2026 /path/to/output.pdf`. ## Evidence diff --git a/slideshows/nef-2026/SPEAKER-NOTES.md b/slideshows/nef-2026/SPEAKER-NOTES.md index cfaa7112..54569c91 100644 --- a/slideshows/nef-2026/SPEAKER-NOTES.md +++ b/slideshows/nef-2026/SPEAKER-NOTES.md @@ -58,18 +58,47 @@ path and make GDP endogenous, so a demand shock can move GDP. The default closure also switches on the OBR's commented-out l.690 (the nominal-GDP pin); without it no quarter converges. -## 8. Reading the published listing line by line +## 8. What Thibault found -A list of 53 points about the OBR's model circulated in September 2026; we +- Vahid: Thibault read the OBR's published EViews code and variable list in + September and sent a list of 53 points (his ratings: 6 High, 25 Mid, 22 Low). +- His three headline points, from his email of 23 September: no distributional + effect of fiscal policy, total imports fixed, public debt interest fixed. +- Let Thibault add anything; it's his work. + +## 9. Our answer: all three hold + +- From our reply of 29 September, written up in `docs/published_model_review.md` + (entries R1, V2, H1). +- Trade (R1): X and M are exogenous; the exchange rate moves only prices. +- Debt interest (V2): narrow it to the public debt interest bill. Household + interest payments respond to Bank Rate (l.623), so "many interest payments" + overstates it. +- Distribution (H1): the consumption equation has more than income in it, but + every term is an aggregate. + +## 10. All 53 points, checked line by line + +Thibault's list of 53 points (September 2026); we checked each against the published files (`docs/published_model_review.md`). -Don't name or characterise its author. The four on the slide are problems in +The four on the slide are problems in the published files rather than design choices; G6 and G7 leave nominal GDP / the investment deflator and unemployment / participation not uniquely determined. The OBR's workfile may resolve them; the release doesn't show how. H3 (household interest payments respond to Bank Rate, receipts don't) is the design choice with the clearest behavioural consequence, if asked. -## 9. Anchored to the October 2026 EFO +## 11. Where we agree, and where we would push + +- The two corrections are G2 (taper channels reach consumption, not output) and + R2 (the current account feeds back through investment income). +- Thibault's reply of 13 October put our accuracy at about 80% and disagreed on + how far "it's documented" excuses the OBR. Present it as an open + difference, not a rebuttal. +- Our suggested line: the published model can't reproduce the OBR's own + forecast, because add-factors and calibration aren't published. + +## 12. Anchored to the October 2026 EFO - 0.44% GDP and 0.72% consumption MAPE over 2025Q1–2027Q4, by construction: add-factors are EFO minus model. Only consumption is re-derived; the other @@ -82,7 +111,7 @@ design choice with the clearest behavioural consequence, if asked. against 4.17% by 2031Q1, on slide 16). The anchored GDP gap reaches 1.24% by 2031Q1. -## 10. Two numbers that are easy to misread +## 13. Two numbers that are easy to misread Say this one carefully. The ~4% free-running error is not the OBR's forecast error: in the OBR's model GDP is an input, so it can't miss it. The gap @@ -94,7 +123,7 @@ If asked about the held-add-factor forecast (0.35% GDP, 7 of 8 in band): its GDP line is close to circular, because household income is handed to the model, so it isn't evidence of forecast skill. -## 11. Free-running scorecard +## 14. Free-running scorecard Default closure, October 2026 EFO, 2025Q1–2027Q4. Bands: rates within 1.0pp, net balances within 1.5% of GDP, levels within 10% MAPE. Employment scores @@ -103,7 +132,7 @@ because the RPI index history the OBR doesn't publish runs out. Company profits are a residual of nominal GDP. The other 10 headline variables (exports, imports, CPI, earnings and others) are held at the OBR's value. -## 12. Shocks against the OBR's multipliers +## 15. Shocks against the OBR's multipliers Ratios at quarters 1, 4 and 12, from `docs/demo.md`. Tax rows are current-price GDP per pound of revenue (the OBR's basis); government consumption is real GDP @@ -121,7 +150,7 @@ tapering. - Government investment works only under the opt-in investment closure, as identity pass-through with no taper. -## 13. Income tax +## 16. Income tax +1p on the basic rate, £1,725m a quarter (HMRC ready reckoner, June 2025, 2026-27 column, £6.9bn a year divided by four), sustained from 2025Q1. Real @@ -130,7 +159,7 @@ GDP falls 161 at quarter 1, 335 at quarter 4 and 569 at quarter 12 (£m). Ratio move one for one; lower consumption doesn't reduce other receipts. GDP change equals the consumption change to the pound. -## 14. Corporation tax and capital spending +## 17. Corporation tax and capital spending The investment closure freezes MSGVA, PIF and PIRHH; without the guard, a zero-shock baseline runs business investment from £86bn to £522bn by 2027Q4. @@ -143,7 +172,7 @@ zero-shock baseline runs business investment from £86bn to £522bn by 2027Q4. quarters 1 / 4 / 12. Under the default closure IF has no live equation, so the channel is dead and `run_reform` warns. -## 15. Bank Rate +## 18. Bank Rate +1pp for four quarters, peak at quarter 4: −0.057% of GDP in the default run (mortgage rate held, a lower bound), −0.149% with `monetary_conditioning=True` @@ -152,7 +181,7 @@ England's range for the same experiment is −0.2% to −0.35% after about a yea (Quarterly Bulletin 1999 Q2). About −0.16% is the ceiling even with mortgage and deposit rates both moved. CPI and unemployment don't respond, by design. -## 16. Known limits +## 19. Known limits - Bank Rate: about a quarter of the BoE range unconditioned, about half with the mortgage rate moved. @@ -171,7 +200,7 @@ and deposit rates both moved. CPI and unemployment don't respond, by design. the follow-up. - Every result is a point estimate. -## 17. The macro platform +## 20. The macro platform Not yet launched. Seven public models (`site_contract.py`'s list), each with its own repo. Results from different model classes are complementary, not @@ -179,7 +208,16 @@ comparable, and the scoring tool won't average them. FRB/US and HANK refuse reform scoring on purpose: no mapping from a PolicyEngine reform exists, and inventing one would give plausible-looking wrong numbers. -## 18. DEFINE-UK: green public investment +## 21. The platform, live + +- Click the frame, then use the buttons: Home, Models, Compare, OBR model, + OBR validation, Forecasts. Expand fills the screen; New tab opens the site. +- Say it's in development and not launched; numbers on it follow the pinned + model runs shown on the earlier slides. +- If the frame is blank (offline, or the site's frame headers not yet live), + use New tab. + +## 22. DEFINE-UK: green public investment Ecological stock-flow consistent model; upstream R code run unmodified at commit 846081a. Green public investment of about £15–16bn a year in 2027–31, @@ -190,7 +228,7 @@ numeric v1.1 scenario results are published, so this is a partial replication. Public debt and interest aren't among the served outputs. Don't quote a multiplier: which one to headline (2.25, 2.30 or 3.26) is open. -## 19. A scored forecast record +## 23. A scored forecast record Rounds are committed to git before the outturn exists and are append-only. Nine forecasts of five outturns scored (5 live, 4 retroactive); 4 of 5 live @@ -199,7 +237,7 @@ change; bias −0.33pp, low on 8 of 9. All from the BoE SVAR and its unemployment satellite. The page itself says: too few to show skill. The SVAR has no forecast skill against a drifting random walk in its own evaluation. -## 20. Use it from code or an AI agent +## 24. Use it from code or an AI agent - Hosted MCP server: 28 tools at the pinned commit (the README still says 26). No install, account or key; scales to zero, so the first call may take about @@ -209,7 +247,7 @@ has no forecast skill against a drifting random walk in its own evaluation. - Dated data snapshots under `data/vintages/`, never edited, so any score can be reproduced against the data it saw. -## 21. From a microsimulation reform to GDP +## 25. From a microsimulation reform to GDP `score_reform(model="obr")`: a PolicyEngine-UK reform is costed per year with the population microsimulation, enters the OBR model as a quarterly @@ -222,7 +260,7 @@ The static costing of 1p on the basic rate (£6.55bn, 2026-27) is 5.1% below HMRC's ready reckoner (£6.9bn): static and survey-based against post-behavioural and administrative. -## 22. Demo +## 26. Demo Before the session: `uv sync` and run one `run_reform` call, because the first build takes a few minutes. If using `score_reform`, start it through @@ -243,19 +281,19 @@ Don't run live: government investment under the default closure (GDP doesn't move), corporation tax as receipts (`NNSCTP`, GDP exactly zero), or the published closure in a demand run (no quarter converges). -## 23. Where we could work together +## 27. Where we could work together Options to discuss, not commitments. Each maps to something open in the repo: the closure choice and a spending shock that moves borrowing; the investment closure and DEFINE-UK; macro paths back into household results; the published listing's open problems (G6, G7, N5); anchoring participation; joint write-ups. -## 24. Questions for NEF +## 28. Questions for NEF Listen more than talk here. -## 25. Proposed next steps +## 29. Proposed next steps Proposals for NEF to react to; agree owners and dates in the room. -## 26. Thank you +## 30. Thank you diff --git a/slideshows/nef-2026/config.ts b/slideshows/nef-2026/config.ts index c8e9503b..9baf948d 100644 --- a/slideshows/nef-2026/config.ts +++ b/slideshows/nef-2026/config.ts @@ -13,6 +13,7 @@ import { FitSlide, ForecastRecordSlide, IncomeTaxSlide, + LiveSiteSlide, InputsSlide, LimitsSlide, MicroMacroSlide, @@ -23,6 +24,9 @@ import { QuestionsSlide, ReviewSlide, ScorecardSlide, + ThibAnswerSlide, + ThibDifferSlide, + ThibFoundSlide, TitleSlide, WhoWeAreSlide, WhyOpenSlide, @@ -37,7 +41,6 @@ export const nef2026Config: SlideshowConfig = { date: "2026-11-01", location: "New Economics Foundation", footerText: "New Economics Foundation · November 2026", - private: true, clickerKeys: true, slides: [ TitleSlide, @@ -47,7 +50,10 @@ export const nef2026Config: SlideshowConfig = { PublishedVsBuiltSlide, InputsSlide, ArchitectureSlide, + ThibFoundSlide, + ThibAnswerSlide, ReviewSlide, + ThibDifferSlide, AnchoringSlide, FitSlide, ScorecardSlide, @@ -57,6 +63,7 @@ export const nef2026Config: SlideshowConfig = { BankRateSlide, LimitsSlide, PlatformSlide, + LiveSiteSlide, DefineSlide, ForecastRecordSlide, AccessSlide, diff --git a/slideshows/nef-2026/content.ts b/slideshows/nef-2026/content.ts index a62b793a..24ffd1c6 100644 --- a/slideshows/nef-2026/content.ts +++ b/slideshows/nef-2026/content.ts @@ -15,6 +15,10 @@ const macro = `https://github.com/PolicyEngine/macro/blob/${macroCommit}`; export type Source = { label: string; href: string }; export const sources = { + liveSite: { + label: "PolicyEngine macro site (live, in development)", + href: "https://policyengine-macro.vercel.app", + }, obrReadme: { label: "OBR model README", href: `${obr}/README.md` }, scorecard: { label: "Calibration scorecard", @@ -434,3 +438,19 @@ export const bridgeBenchmark = { // compare view puts it 10 commits behind 0fe04c9a, before #70 (VAT price // pass-through) and #71; hosted obr_shock exposes no overlay parameter. export const hostedObrPin = "2965e82"; + +/** Pages the live-site slide can load into its frame. */ +export const liveSiteViews = [ + { label: "Home", path: "/" }, + { label: "Models", path: "/models" }, + { label: "Compare", path: "/models/compare" }, + { label: "OBR model", path: "/obr" }, + { label: "OBR validation", path: "/obr/validation" }, + { label: "Forecasts", path: "/forecasts" }, +]; + +// Thibault's review (his email of 23 Sep 2026 and the attached list of 53 +// points) and our answer (our emails of 29 Sep and 8 Oct 2026, written up in +// docs/published_model_review.md). The critic's ratings are counted from that +// doc's summary table: 6 High, 25 Mid, 22 Low. +export const thibRatings = { high: 6, mid: 25, low: 22 }; diff --git a/slideshows/nef-2026/slides/SiteEmbed.tsx b/slideshows/nef-2026/slides/SiteEmbed.tsx new file mode 100644 index 00000000..8c91cb01 --- /dev/null +++ b/slideshows/nef-2026/slides/SiteEmbed.tsx @@ -0,0 +1,84 @@ +"use client"; + +import { useState } from "react"; +import { + IconArrowsMaximize, + IconArrowsMinimize, + IconExternalLink, +} from "@tabler/icons-react"; +import styles from "./embed.module.css"; + +/** + * The macro site, live on the slide. Expand stretches the same frame over the + * whole screen, so the page it shows is kept when it + * goes back to the slide. Clicks in the frame go to the site, and so do + * the arrow keys until the slide is clicked outside it. The view buttons in + * the bar load one of the site's pages into the same frame. + */ +export type SiteView = { + label: string; + /** The page path to load, such as "/models/compare". */ + path: string; +}; + +export default function SiteEmbed({ + href, + title, + views = [], +}: { + href: string; + title: string; + /** Buttons that open a page of the site in the frame. */ + views?: SiteView[]; +}) { + const [expanded, setExpanded] = useState(false); + const [src, setSrc] = useState(href); + // Bumped on every view button, so a second click on the same view reloads it. + const [load, setLoad] = useState(0); + const ToggleIcon = expanded ? IconArrowsMinimize : IconArrowsMaximize; + + return ( +
event.stopPropagation()} + > +
+ {views.length > 0 && ( +
+ {views.map((view) => ( + + ))} +
+ )} + + + +
+