Skip to content
Open
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
24 changes: 16 additions & 8 deletions connect/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@
}
.steps.dimmed { opacity: 0.55; }
/* Every model stays visible: no horizontal tab scrolling. */
.model-seg { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); max-width: 100%; margin: 6px 0 22px; border: 0; padding: 0; gap: 8px; }
.model-seg button { min-width: 0; min-height: 68px; border: 1px solid var(--line-soft); border-radius: 6px; padding: 11px 13px; text-align: left; transition: all 0.15s ease; }
.model-seg { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); max-width: 100%; margin: 6px 0 12px; border: 0; padding: 0; gap: 6px; }
.model-seg button { min-width: 0; min-height: 0; border: 1px solid var(--line-soft); border-radius: 6px; padding: 8px 11px; text-align: left; transition: all 0.15s ease; }
.model-seg button strong,
.model-seg button span { display: block; }
.model-seg button strong { color: inherit; font-family: var(--mono); font-size: var(--fs-small); font-weight: 600; }
Expand Down Expand Up @@ -205,13 +205,18 @@
.command-grid .copyblock code { font-size: var(--fs-small); line-height: 1.55; }
.model-picker { margin-top: var(--s-5); }
.compact-pane {
min-height: 210px;
padding: clamp(22px, 4vw, 36px);
min-height: 0;
display: flex;
flex-wrap: wrap;
align-items: baseline;
column-gap: 14px;
padding: 16px clamp(16px, 3vw, 24px);
border: 1px solid var(--line-soft);
border-radius: var(--radius);
}
.compact-pane h3 { margin: 18px 0 8px; font-family: var(--display); font-size: var(--fs-h3); font-weight: 500; }
.compact-pane p { max-width: 58ch; margin-bottom: 24px; color: var(--paper-dim); line-height: 1.6; }
.compact-pane h3 { margin: 0; font-family: var(--display); font-size: var(--fs-h3); font-weight: 500; }
.compact-pane p { flex-basis: 100%; max-width: 58ch; margin: 6px 0 0; color: var(--paper-dim); line-height: 1.6; }
.compact-pane .btn { margin-top: 14px; }
@media (max-width: 760px) {
.command-grid { grid-template-columns: 1fr; }
.compact-pane { min-height: 0; }
Expand Down Expand Up @@ -396,8 +401,9 @@ <h2>Run the shared CLI.</h2>
<div><span class="dial-name">UK forecast</span><div class="copyblock"><code>pe-macro forecast</code><button data-copy>copy</button></div></div>
<div><span class="dial-name">US HANK shock</span><div class="copyblock"><code>pe-macro hank-shock --kind monetary --size -0.0025</code><button data-copy>copy</button></div></div>
<div><span class="dial-name">Household calculation</span><div class="copyblock"><code>pe-macro household --country us --people '[{"age":35,"employment_income":50000}]'</code><button data-copy>copy</button></div></div>
<div><span class="dial-name">Score a UK reform</span><div class="copyblock"><code>pe-macro score --country uk --reform '{"gov.hmrc.income_tax.rates.uk[0].rate":0.21}' --model obr</code><button data-copy>copy</button></div></div>
</div>
<p class="chooser-note"><a href="https://github.com/PolicyEngine/macro/tree/main/integration">View every CLI command →</a></p>
<p class="chooser-note"><a href="https://github.com/PolicyEngine/macro/tree/main/integration">View every CLI command →</a> · How the micro-to-macro scoring pipeline works: <a href="/score">score a reform</a>.</p>
</div>
</section>
<section id="code" class="band">
Expand Down Expand Up @@ -510,7 +516,9 @@ <h2>Use Python directly.</h2>
applyClient();
});

// model selector in the code section (six model tabs)
// model selector in the code section (one tab per model with a Python
// surface; define-uk is deliberately absent — no hosted/CLI/Python
// surface until its replication is validated)
var modelSeg = document.getElementById("model-seg");
if (modelSeg) {
bindTabs(modelSeg, function (btn) {
Expand Down
191 changes: 191 additions & 0 deletions define/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,191 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>DEFINE-UK ecological stock-flow model — PolicyEngine Macro</title>
<meta name="description" content="An adapter for DEFINE-UK, the ecological stock-flow consistent model of the UK by Dafermos, Nikolaidi et al. Experimental and pre-validation: it runs the upstream code end to end; replication of published results is pending." />
<link rel="canonical" href="https://policyengine-macro.vercel.app/define" />
<meta property="og:type" content="website" />
<meta property="og:url" content="https://policyengine-macro.vercel.app/define" />
<meta property="og:site_name" content="PolicyEngine Macro" />
<meta property="og:title" content="DEFINE-UK ecological stock-flow model — PolicyEngine Macro" />
<meta property="og:description" content="An adapter for DEFINE-UK, the ecological stock-flow consistent model of the UK. Experimental and pre-validation: runs the upstream code end to end; replication of published results pending." />
<meta property="og:image" content="https://policyengine-macro.vercel.app/assets/og-image.png" />
<meta property="og:image:alt" content="PolicyEngine Macro — open economic models for the UK and US" />
<meta name="twitter:card" content="summary_large_image" />
<link rel="icon" type="image/svg+xml" href="/assets/policyengine-mark.svg" />
<meta name="theme-color" content="#FFFFFF" />

<link rel="stylesheet" href="/vendor/fonts/fonts.css" />
<link rel="stylesheet" href="/vendor/ui-kit-tokens.css" />
<link rel="stylesheet" href="/style.css?v=2" />
<style>
/* page-specific: hero sizing only — shared component styles live in style.css */
.model-hero { min-height: auto; padding-top: clamp(120px, 18vh, 180px); padding-bottom: 10px; }
</style>
</head>
<body class="doc">
<a class="skip-link" href="#top">Skip to main content</a>
<div class="grain" aria-hidden="true"></div>

<header class="nav">
<a class="brand" href="/">
<img class="brand-logo" src="/assets/policyengine-mark.svg" alt="" width="20" height="20" />PolicyEngine Macro
</a>
<nav class="nav-links" aria-label="Primary">
<a class="nav-mobile" href="/">Home</a>
<a class="nav-mobile" href="/economy">Economy</a>
<a class="nav-mobile" href="/models" aria-current="true">Models</a>
<a class="nav-mobile" href="/forecasts">Forecasts</a>
<a class="nav-mobile nav-start" href="/connect">Use</a>
<a class="nav-gh" href="https://github.com/PolicyEngine/macro" aria-label="GitHub"><svg viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2c-.9 .9 -1.3 2 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5"/></svg></a>
</nav>
</header>

<nav class="crumbs mono" aria-label="You are here">
<a href="/">Home</a>
<a href="/models">Models</a>
<span aria-current="page">DEFINE-UK</span>
</nav>

<main id="top">
<section class="hero model-hero">
<div class="hero-inner">
<p class="eyebrow reveal" style="--d:0">model 07 — ecological stock-flow consistent · define-uk · UK · experimental</p>
<h1 class="reveal page-title" style="--d:1;">
Climate policy meets the UK financial system.
</h1>
<p class="lede reveal" style="--d:2">
An adapter for DEFINE-UK, the ecological stock-flow consistent model
of the UK macrofinancial system. Pre-validation: it runs the
upstream code end to end; replication of published results is pending.
</p>
</div>
</section>

<nav class="model-tabs" aria-label="DEFINE-UK pages">
<div class="model-tabs-row">
<a class="model-tabs-link" href="/define" aria-current="page">Overview</a>
<a class="model-tabs-link" href="https://github.com/PolicyEngine/define-uk-model">Code</a>
</div>
</nav>

<section id="what" class="band">
<div class="band-head">
<span class="kicker mono">01 — what it is</span>
<h2>An ecological stock-flow consistent model of the UK.</h2>
</div>
<div class="prose">
<p class="mo-lead">
DEFINE-UK is the ecological stock-flow consistent (E-SFC) model of
the UK built by Dafermos, Nikolaidi and co-authors
(<a href="https://define-model.org/define-uk">define-model.org/define-uk</a>).
It simulates the UK macrofinancial system together with its
environmental impacts under climate-policy scenarios, with particular
attention to the UK housing stock, the distinction between monetary
and non-monetary financial institutions, and the power sector. It is
calibrated to UK national accounting data.
</p>
<p>
Versions 1.0 and 1.1 were released in April 2026; version 1.1 adds
regulation policies. The accompanying paper, <em>Evaluating climate
policy mixes in the UK: an E-SFC approach</em>, evaluates scenario
blocks covering a fossil-fuel ban, power-sector subsidies, housing
regulation, green public investment, and a mixed policy package.
</p>
<p>
Our adapter, <a href="https://github.com/PolicyEngine/define-uk-model">github.com/PolicyEngine/define-uk-model</a>,
runs the authors' unmodified code. The upstream repository
(<a href="https://github.com/DEFINE-model/DEFINE_UK_1.1">github.com/DEFINE-model/DEFINE_UK_1.1</a>)
is public but carries no licence, so we vendor nothing: the adapter
fetches the upstream code at a pinned commit
(<code>846081a</code>) at runtime and executes it as published, in R.
On 2026-08-01 the full notebook ran end to end through the adapter
(R&nbsp;4.3.0), producing 151 output files across all four scenario
blocks.
</p>
</div>
</section>

<section id="status" class="band">
<div class="band-head">
<span class="kicker mono">02 — status and limits</span>
<h2>Runs end to end. Not yet validated.</h2>
</div>
<div class="prose">
<div class="callout">
<strong>Pre-validation — execution is not validation.</strong> The
adapter runs the upstream code end to end, but none of its outputs
have been compared against the published figures yet, so no numerical
result from this model should be treated as meaningful. The status
label is: experimental; pre-validation — runs upstream code end to
end, replication of published results pending.
</div>
<p>
The limits today, stated plainly:
</p>
<div class="qa-facts">
<div class="qa-fact"><span class="icon">&rarr;</span><span>No replication check yet — outputs have not been compared to the paper's published figures</span></div>
<div class="qa-fact"><span class="icon">&rarr;</span><span>Unlicensed upstream — nothing is vendored or hosted; the code is fetched at a pinned commit and run unmodified</span></div>
<div class="qa-fact"><span class="icon">&rarr;</span><span>No hosted surface — not available through the MCP server or CLI</span></div>
<div class="qa-fact"><span class="icon">&rarr;</span><span>No reform bridge — <code>score_reform</code> will not accept it</span></div>
<div class="qa-fact"><span class="icon">&rarr;</span><span>No microsimulation connection yet — see the roadmap in the <a href="https://github.com/PolicyEngine/define-uk-model">adapter repository</a></span></div>
</div>
<p>
The planned connection to the rest of the suite: once the replication
is validated, scenario income and energy-price paths are planned to
feed the <a href="/pe">PolicyEngine microsimulation</a>'s incidence
overlay through <code>EconomicAssumptions</code> — showing who bears
a climate-policy scenario, household by household. That link does not
exist today, and the model plays no part in the
<a href="/score">score a reform</a> workflow.
</p>
</div>
</section>

<section id="sources" class="band">
<div class="band-head">
<span class="kicker mono">03 — sources</span>
<h2>The model, the paper, the adapter.</h2>
</div>
<div class="prose">
<div class="table-scroll mo-tablecard"><table>
<caption>Where DEFINE-UK's inputs and outputs live</caption>
<thead><tr><th scope="col">what</th><th scope="col">where</th></tr></thead>
<tbody>
<tr>
<th scope="row"><strong>The model</strong></th>
<td><a href="https://define-model.org/define-uk">define-model.org/define-uk</a> — DEFINE-UK versions 1.0 and 1.1 (April 2026), Dafermos, Nikolaidi et al.</td>
</tr>
<tr>
<th scope="row"><strong>The paper</strong></th>
<td><em>Evaluating climate policy mixes in the UK: an E-SFC approach</em> — the scenario definitions and published results our replication will be judged against.</td>
</tr>
<tr>
<th scope="row"><strong>Upstream code</strong></th>
<td><a href="https://github.com/DEFINE-model/DEFINE_UK_1.1">github.com/DEFINE-model/DEFINE_UK_1.1</a> — public but unlicensed; fetched at pinned commit <code>846081a</code> and run unmodified.</td>
</tr>
<tr>
<th scope="row"><strong>Our adapter</strong></th>
<td><a href="https://github.com/PolicyEngine/define-uk-model">github.com/PolicyEngine/define-uk-model</a> — scaffold, pre-replication; the run harness, status, and roadmap.</td>
</tr>
</tbody>
</table></div>
</div>
</section>

</main>

<footer class="foot foot-bar">
<p class="footer-legal">© 2026 PolicyEngine. All rights reserved.</p>
<nav class="footer-links" aria-label="PolicyEngine links">
<a class="footer-text footer-policyengine" href="https://policyengine.org"><img src="/assets/policyengine-mark.svg" alt="" width="17" height="17" />PolicyEngine</a>
<a class="footer-text" href="https://github.com/PolicyEngine/macro">GitHub</a>
<a class="footer-text" href="/contact">Contact</a>
</nav>
</footer>

<script src="/reveal.js?v=2" defer></script>
</body>
</html>
5 changes: 4 additions & 1 deletion economy/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,10 @@ <h2>Activity, prices, work, the public finances, and market rates.</h2>
</table>
</div>
</details></div>


<p class="chooser-note">These figures are the backdrop every model runs
against — the baseline a <a href="/score">scored reform</a> perturbs and
the outturns the <a href="/forecasts">forecast record</a> is judged on.</p>
</div>
</section>
</main>
Expand Down
Loading
Loading