Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion connect/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ <h2>Connect in three steps.</h2>
<span>OG-UK long-run scoring (<code>score_reform</code> with
<code>model='og'</code>) and <code>dynamic_reform_impact</code> take
tens of minutes — the hosted server points you to the local CLI.
Everything else here runs hosted.</span></p>
The three <code>define_*</code> tools likewise return run instructions rather than results when called on the hosted server &mdash; the unlicensed upstream is never hosted. Everything else here runs hosted.</span></p>
</div>
</div>
</section>
Expand Down
24 changes: 15 additions & 9 deletions define/code/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ <h4>Where to read the results</h4>
<div class="meth-step-head"><span class="meth-step-num mono">2</span><h3>CLI scenario runs</h3></div>
<h4>Deltas from the terminal</h4>
<p>The CLI lists the curated scenarios and runs any of them locally: <code>pe-macro define-scenarios</code> to browse, <code>pe-macro define-scenario</code> to produce a scenario's deltas vs baseline — real GDP, emissions, unemployment, real consumption. Deltas only, never levels.</p>
<div class="meth-inline" aria-hidden="true">
<div class="meth-inline">
<div class="meth-sec-title">CLI commands</div>
<div class="codeblock"><button class="cb-copy" data-copy>copy</button><pre><code>pe-macro define-scenarios <span class="cm"># list the curated set</span>
pe-macro define-scenario &lt;name&gt; <span class="cm"># scenario deltas vs baseline</span></code></pre></div>
Expand All @@ -116,7 +116,7 @@ <h4>One pip install, upstream fetched at runtime</h4>
<p>The adapter installs from GitHub. Nothing upstream is vendored: at runtime it fetches <code>DEFINE-model/DEFINE_UK_1.1</code> at pinned commit <code>846081a</code> and executes the published notebook unmodified.</p>
<h4>R does the heavy lifting once</h4>
<p>A fresh full run needs local R with the notebook's packages; after that, scenario deltas are instant from the cached pinned run.</p>
<div class="meth-inline" aria-hidden="true">
<div class="meth-inline">
<div class="meth-sec-title">install</div>
<div class="codeblock"><button class="cb-copy" data-copy>copy</button><pre><code>pip install git+https://github.com/PolicyEngine/define-uk-model</code></pre></div>
</div>
Expand All @@ -128,9 +128,9 @@ <h4>Clone to rebuild the validation record</h4>
<p>The test suite carries the validation gate: hermetic artifact checks always run, and the oracle comparisons against the pinned upstream run execute wherever a local cache exists — in CI they must skip, because a passing oracle test there would mean the unlicensed upstream was fetched.</p>
<h4>The path to hosting</h4>
<p class="opt-note">a clean-room Python reimplementation of the published Model Manual v1.1 is the route to a hostable model — protocol and milestones in <a href="https://github.com/PolicyEngine/define-uk-model/blob/main/REIMPLEMENTATION.md">REIMPLEMENTATION.md</a>, upstream code used only as a numerical oracle.</p>
<p>Two slices have landed. The §2.2 accounting core the transactions and balance-sheet matrices is satisfied identically at the manual's own initial values. §3.2 adds the 23 high-level macroeconomic equations, Eqs. (21)&ndash;(43): the demand-determined expenditure core, the Kaldor&ndash;Verdoorn productivity relation, and the Leontief labour and capital supply constraints. §3.3 production and the comparison against the upstream oracle are outstanding, so <strong>nothing here is hostable yet</strong> and the hosted tools continue to return run instructions.</p>
<p>Reimplementing from the manual is also what surfaces its gaps. Three are recorded so far: Table 6 tabulates a net-lending residual the manual itself says &ldquo;should equal 0&rdquo;; Eq. (27) does not hold at the manual's own initial values, and disagrees with Eq. (25) about the same variable; and Eq. (31) uses an intercept that Table 5 never tabulates. Each is pinned by a test rather than absorbed into a tolerance, so a later manual revision fails loudly instead of passing quietly.</p>
<div class="meth-inline" aria-hidden="true">
<p>Four slices have landed. The §2.2 accounting core &mdash; the transactions and balance-sheet matrices &mdash; is satisfied identically at the manual's own initial values. §3.2 adds the high-level macroeconomic block, §3.3.1 domestic production, and §3.3.2 the power generation sector: <strong>118 equations, Eqs. (21)&ndash;(138), contiguous</strong>. §3.3.3 input&ndash;output and the comparison against the upstream oracle are outstanding, so <strong>nothing here is hostable yet</strong> and the hosted tools continue to return run instructions.</p>
<p>Reimplementing from the manual is also what surfaces its gaps, and roughly <strong>thirty-five</strong> are now pinned by tests rather than absorbed into a tolerance &mdash; a net-lending residual the manual itself says &ldquo;should equal 0&rdquo;, identities that fail at the manual's own initial values, and symbols the equations use that the parameter tables never list. The largest is a blocker: <strong>§3.3.2 as published cannot be simulated forward.</strong> Six parameters it uses are absent from Table 5, and two variables are never defined anywhere in the manual, so credit rationing collapses to a constant and desired power-sector investment turns negative. That is the section the climate-policy scenarios run through, and it is <a href="https://github.com/PolicyEngine/define-uk-model/blob/main/REIMPLEMENTATION.md">recorded in full</a> for the authors.</p>
<div class="meth-inline">
<div class="meth-sec-title">development</div>
<div class="codeblock"><button class="cb-copy" data-copy>copy</button><pre><code>git clone https://github.com/PolicyEngine/define-uk-model
cd define-uk-model
Expand All @@ -142,18 +142,18 @@ <h4>The path to hosting</h4>
<div class="meth-panel" data-step="1" hidden>
<div class="meth-panel-head"><span class="meth-panel-title">CLI scenario runs</span><span class="meth-panel-badge mono">Code 2</span></div>
<div class="meth-sec-title">CLI commands</div>
<div class="codeblock"><button class="cb-copy" data-copy>copy</button><pre><code>pe-macro define-scenarios <span class="cm"># list the curated set</span>
<div class="codeblock"><button class="cb-copy" data-copy tabindex="-1">copy</button><pre><code>pe-macro define-scenarios <span class="cm"># list the curated set</span>
pe-macro define-scenario &lt;name&gt; <span class="cm"># scenario deltas vs baseline</span></code></pre></div>
</div>
<div class="meth-panel" data-step="2" hidden>
<div class="meth-panel-head"><span class="meth-panel-title">Install locally</span><span class="meth-panel-badge mono">Code 3</span></div>
<div class="meth-sec-title">install</div>
<div class="codeblock"><button class="cb-copy" data-copy>copy</button><pre><code>pip install git+https://github.com/PolicyEngine/define-uk-model</code></pre></div>
<div class="codeblock"><button class="cb-copy" data-copy tabindex="-1">copy</button><pre><code>pip install git+https://github.com/PolicyEngine/define-uk-model</code></pre></div>
</div>
<div class="meth-panel" data-step="3" hidden>
<div class="meth-panel-head"><span class="meth-panel-title">Gates and the clean room</span><span class="meth-panel-badge mono">Code 4</span></div>
<div class="meth-sec-title">development</div>
<div class="codeblock"><button class="cb-copy" data-copy>copy</button><pre><code>git clone https://github.com/PolicyEngine/define-uk-model
<div class="codeblock"><button class="cb-copy" data-copy tabindex="-1">copy</button><pre><code>git clone https://github.com/PolicyEngine/define-uk-model
cd define-uk-model
pytest <span class="cm"># hermetic gate everywhere; oracle tests need the local cache</span></code></pre></div>
</div>
Expand Down Expand Up @@ -205,7 +205,13 @@ <h4>The path to hosting</h4>
});
// Panels pair to steps by data-step. A step with no panel of its own
// keeps the nearest earlier panel pinned rather than blanking the column.
var want = -1;
// Start at the FIRST panel, not -1: several pages have no panel for
// step 0, and seeding -1 left the sticky column empty for the whole of
// the opening step before popping in. Pinning the earliest panel means
// the column is populated from the top and only ever moves forward.
var want = Math.min.apply(null, panels.map(function (panel) {
return Number(panel.getAttribute("data-step"));
}));
panels.forEach(function (panel) {
var ds = Number(panel.getAttribute("data-step"));
if (ds <= active && ds > want) want = ds;
Expand Down
12 changes: 6 additions & 6 deletions define/methodology/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ <h4>Accounting before theory</h4>
<p>DEFINE-UK is an ecological stock-flow consistent (E-SFC) model: DEFINE-UK 1.1, April 2026, by George, Dafermos, Nikolaidi and co-authors (<a href="https://define-model.org/define-uk">define-model.org</a>). Stock-flow consistency is an accounting discipline before it is an economic theory. Every monetary flow in the model — wages, taxes, interest, dividends, lending — leaves one sector's account and enters another's, so a transactions matrix sums to zero in every row and column; and every flow accumulates into a stock, so sector balance sheets close each period. Nothing appears from nowhere and nothing leaks out.</p>
<h4>The ecological coupling</h4>
<p>The <em>ecological</em> part couples that closed monetary accounting to an emissions and energy block, so climate policy and the financial system move together in one system. An emissions block splits electricity from non-electricity emissions; the components sum exactly to the total in the model's output.</p>
<div class="meth-inline" aria-hidden="true">
<div class="meth-inline">
<div class="meth-sec-title">matrix identities (manual §2.2)</div>
<div class="meth-eq"><div class="meth-eq-label">flow rows</div><div class="meth-eq-body">\(\sum_{s} T_{f,s} = 0\) — every flow leaves one sector and enters another</div></div>
<div class="meth-eq"><div class="meth-eq-label">sector columns</div><div class="meth-eq-body">\(\sum_{f} T_{f,s} = \mathrm{LEND}_s\) — column sums give net lending</div></div>
Expand Down Expand Up @@ -173,7 +173,7 @@ <h4>The sectors</h4>
<p>Households, firms, monetary financial institutions (MFIs), non-monetary financial institutions, government, the central bank, and the rest of the world — each with a full balance sheet. The balance-sheet matrix (manual §2.2 Table 2) mirrors the transactions matrix: every financial instrument row sums to zero — one sector's asset is another's liability — and each sector's column sums to its net worth.</p>
<h4>Calibration</h4>
<p>The model is calibrated to UK national accounting data (ONS Blue Book / UKEA), with the manual's §5 tables giving parameters and initial values.</p>
<div class="meth-inline" aria-hidden="true">
<div class="meth-inline">
<div class="meth-sec-title">balance-sheet identities (manual §2.2 Table 2)</div>
<div class="meth-eq"><div class="meth-eq-label">instrument rows</div><div class="meth-eq-body">\(\sum_{s} B_{i,s} = 0\) — one sector's asset is another's liability</div></div>
<div class="meth-eq"><div class="meth-eq-label">sector columns</div><div class="meth-eq-body">financial rows sum to \(\mathrm{FNW}_s\); adding real assets gives \(\mathrm{NW}_s\)</div></div>
Expand Down Expand Up @@ -212,7 +212,7 @@ <h4>Power</h4>
<p>The <strong>power-sector block</strong> carries separate fossil and renewable capital stocks: government renewable investment is triggered when non-fossil capacity falls short of a utilisation threshold relative to electricity demand, and regulation policies (new in version 1.1) can directly depreciate fossil capital — stranded assets as an explicit balance-sheet event, felt by the financial institutions that hold the claims.</p>
<h4>What version 1.1 added</h4>
<p>Version 1.1 (April 2026) added regulatory policies, limited forward-looking behaviour to policy announcements, direct government ownership of non-fossil power capital, and a green sovereign bond instrument.</p>
<div class="meth-inline" aria-hidden="true">
<div class="meth-inline">
<div class="meth-sec-title">the two UK blocks</div>
<div class="meth-eq"><div class="meth-eq-label">housing</div><div class="meth-eq-body">stock tracked by energy efficiency; retrofit policy works through the stock</div></div>
<div class="meth-eq"><div class="meth-eq-label">power</div><div class="meth-eq-body">separate fossil and renewable capital stocks; utilisation threshold triggers renewable investment</div></div>
Expand Down Expand Up @@ -244,7 +244,7 @@ <h4>The closure</h4>
<p>DEFINE-UK is closed demand-led: output adjusts to aggregate demand rather than being pinned to a supply-side potential path. That is the standard post-Keynesian SFC closure, and it has a direct, observable consequence — fiscal expansions are not crowded out by an assumed return to potential, so fiscal multipliers come out larger than in supply-constrained models like the <a href="/obr">OBR emulator</a>.</p>
<h4>Measured, not asserted</h4>
<p>We measure this rather than assert it: our own computation of the model's cumulative green-public-investment multiplier is <strong>1.78</strong>, against IMF green-spending estimates of 1.1&ndash;1.5 and an OBR capital-spending impact multiplier of &asymp;1.0. Above the official range, but explicably so given the closure — and every surface that quotes a DEFINE-UK delta carries the demand-led caveat. The full comparison is on the <a href="/define/validation">validation page</a>.</p>
<div class="meth-inline" aria-hidden="true">
<div class="meth-inline">
<div class="meth-sec-title">closure and multipliers</div>
<div class="meth-eq"><div class="meth-eq-label">closure</div><div class="meth-eq-body">demand-led: \(Y\) adjusts to aggregate demand, not a potential path</div></div>
<div class="meth-eq"><div class="meth-eq-label">our computation</div><div class="meth-eq-body">cumulative green-public-investment multiplier <strong>1.78</strong></div></div>
Expand Down Expand Up @@ -276,7 +276,7 @@ <h4>Verifying the switches</h4>
What that gate does and does not establish is spelled out on the
<a href="/define/validation">validation page</a>.
</p>
<div class="meth-inline" aria-hidden="true">
<div class="meth-inline">
<div class="meth-sec-title">the switch sets</div>
<div class="meth-eq"><div class="meth-eq-label">fossil-fuel ban</div><div class="meth-eq-body">ban flag + its capacity and investment timings</div></div>
<div class="meth-eq"><div class="meth-eq-label">power subsidy</div><div class="meth-eq-body"><code>POWER_SUB</code> alone</div></div>
Expand Down Expand Up @@ -318,7 +318,7 @@ <h4>Deltas only, local only</h4>
<p><code>pe-macro define-scenarios</code> and <code>pe-macro define-scenario</code> return annualised scenario-minus-baseline delta paths only, framed with mandatory caveats — never levels, because the baseline's calibration gap to ONS/DESNZ/OBR actuals is computed and material. The hosted MCP tools return run instructions instead of results, because the unlicensed upstream is never hosted. <code>score_reform</code> will not accept this model.</p>
<h4>The clean-room path to hosting</h4>
<p>The path to hosting is a <a href="https://github.com/PolicyEngine/define-uk-model/blob/main/REIMPLEMENTATION.md">clean-room Python reimplementation</a> of the published Model Manual — the same adapted-model approach as the OBR emulator. The protocol: the manual is the specification, and the upstream run is a numerical oracle only — its outputs are compared against ours, but its source code is never read to write equations, and every equation must carry a reference to the manual section and equation number it implements. Five milestones run from the accounting core to the full policy scenarios; milestone 1 — the §2.2 transactions and balance-sheet matrices on the §5 initial values — passed with 27 identity tests, including one documented inconsistency in the manual itself (Table 6 omits a dividend term of Eq. 383 from the interbank-lending row, which the tests pin exactly rather than paper over).</p>
<div class="meth-inline" aria-hidden="true">
<div class="meth-inline">
<div class="meth-sec-title">adapter architecture</div>
<div class="meth-eq"><div class="meth-eq-label">pinned commit</div><div class="meth-eq-body">runtime fetch at <code>846081a</code>; executed unmodified, in R; nothing vendored or hosted</div></div>
<div class="meth-eq"><div class="meth-eq-label">cached run</div><div class="meth-eq-body">R 4.3.0 · 151 output files across all four scenario blocks</div></div>
Expand Down
5 changes: 4 additions & 1 deletion economy/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,10 @@ <h2>Six topics, each with its data, its model, and its limits.</h2>
</div>
<p class="economy-note-aside">
<span class="mono">Research note · 25 July 2026</span>
UK CPI fell to 2.8% in 2026Q2—and the model expects it back above 3% by Q4.
UK CPI fell to 2.8% in 2026Q2. The note reads that release through the
2026-07-21 round; the current round is more subdued, and
<a href="/economy/topics/inflation">the inflation topic</a> carries the
live model view.
<a href="/notes/2026-07-25-cpi-2026q2">Read the CPI note →</a>
<a class="economy-note-aside-all" href="/forecasts#notes">All notes</a>
</p>
Expand Down
4 changes: 2 additions & 2 deletions forecasts/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ <h2>The record so far.</h2>
<div class="forecast-summary" aria-label="Current forecast record">
<article><strong>3</strong><span>Archived rounds</span><small>committed to Git before the outturn existed</small></article>
<article><strong>1</strong><span>Scored period</span><small>quarters whose outturn is now published and scored</small></article>
<article><strong>0.12pp</strong><span>Latest absolute error</span><small>latest forecast vs its outturn, percentage points</small></article>
<article><strong>2026Q2</strong><span>Next scored period</span><small>when the record next grows, not how it is doing</small></article>
</div>
<p class="forecast-next">
<strong>Next due:</strong> 2026Q2 (UK real GDP, y/y, unemployment), which lands when the ONS publishes it.
Expand Down Expand Up @@ -124,7 +124,7 @@ <h2>Scored so far: one round.</h2>
<div class="fc-mark fc-mark-naive fc-up" style="left:90.3%"><i></i><span>Naive<strong>3.10%</strong></span></div>
<div class="fc-mark fc-mark-official fc-down" style="left:9.7%"><i></i><span>Official<strong>2.14%</strong></span></div>
</div>
<footer><span>Error <strong>-0.12pp</strong></span><span>beats naive error <strong>0.30pp</strong></span><span>OBR March 2026 EFO error <strong>0.66pp</strong></span><span>Round 2026-07-21</span></footer>
<footer><span>Error <strong>-0.12pp</strong></span><span>beats driftless-naive error <strong>0.30pp</strong></span><span>OBR March 2026 EFO error <strong>0.66pp</strong></span><span>Round 2026-07-21</span></footer>
</article>
</div>
<p class="forecast-note">
Expand Down
Loading