Add Populace Ledger firm comparison#19
Merged
Merged
Conversation
vahid-ahmadi
added a commit
that referenced
this pull request
Jun 30, 2026
Sync onto the new main (PRs #19, #20 merged) and reflect Section 7's value-added recast of the behavioural simulator. - New slide "The firm's problem: VAT on value added (formulation A)": pi(y)=(1-delta)(1-tau f(y))y - C(y;n,e), with delta the deductible-input share (value added (1-delta)y), C the own-factor cost (inputs already netted, so reading C as total cost would double-count), optimum n[(1-delta)(1-tau)]^e, and the new formulation_a_optima figure (delta in {0,0.4,0.8} across notch and taper). - Behavioural slide: note the simulator is a value-added base (formulation A). The e-sensitivity numbers (GBP508m->GBP292m, etc.) are unchanged. - Limitations: the "turnover-tax approximation" bullet now states the simulator taxes value added with a parametric delta (ONS Supply-Use to come), still abstracting from voluntary registration. Rebuilt slides.pdf (30 pages). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
firm-microsim-populace-ledger, a paper-facing comparison command for the pinned Populace/Ledger UK firm-generation snapshotfirm_microsim.generateimport-compatible while avoiding a heavy torch import for the lightweight comparison CLIMigration snapshot
PolicyEngine/ledger#67atcd98b5cb7b1604fbf7750689a429bbc356e5603a; merged on 2026-06-30 atac643afa0c1d45fc4abd0268dc5aa7c843440b38PolicyEngine/populace#223atfa20daf75ff023e5e88731a140f456f58e0b864e; merged on 2026-06-30 at8271d767244161631253ad1d9ad792a82e2b96b458b6c2752adec5baa6a6260fe8cd9e9b85d0a78b5ba76ea28201f4c7986dce50Key result
The Ledger-backed target surface matches the paper's processed 2024-25 numeric inputs exactly after normalizing away presentation-only labels/totals/Unknown: 6 tables checked, 0 mismatches, max numeric difference 0.
The Populace-generated population does not exactly reproduce the paper population. The checked full Populace optimizer snapshot lands at 93.8% overall under its validator versus the paper's 90.5%, but this is documented as not like-for-like: HMRC turnover-band accuracy uses different band sets, and sector distribution reflects project-specific calibration-target definitions. The directly comparable rows are ONS population, employment bands, and VAT liability by turnover band.
Review response
--reference-populationto reproduce the checked artifacts and Ledger-vs-paper parity without rerunning the full optimizer; the full optimizer metrics are the separately captured pinned Populace snapshot recorded in the artifacts.Upstream rebuild
After both upstream PRs merged, I rebuilt from clean detached upstream worktrees: Ledger
origin/mainatac643afand Populaceorigin/mainat8271d76. The fresh Ledger bundle emitted the same 1,439 consumer facts with the same SHA256, and the full 1,000-iteration Populace optimizer rebuild diffed cleanly against the checked Markdown and JSON artifacts.Hugging Face status
Authenticated HF API check found
policyengine/populace-uk-private, but it contains the household UK release (populace_uk_2023.h5) and no firm files. I found no visible public or privatepolicyengine/*firm*Populace firm dataset.Verification
env -u UV_FROZEN uv run --extra dev ruff check .env -u UV_FROZEN uv run --extra dev python -m pytest tests(19 passed)git diff --checkPYTHONPATH=/Users/maxghenis/.codex-worktrees/populace-upstream-firm-rebuild-20260630/packages/populace-build/src:/Users/maxghenis/.codex-worktrees/populace-upstream-firm-rebuild-20260630/packages/populace-calibrate/src:/Users/maxghenis/.codex-worktrees/populace-upstream-firm-rebuild-20260630/packages/populace-fit/src:/Users/maxghenis/.codex-worktrees/populace-upstream-firm-rebuild-20260630/packages/populace-frame/src:/Users/maxghenis/.codex-worktrees/populace-upstream-firm-rebuild-20260630/packages/populace-data/src env -u UV_FROZEN uv run --extra dev python -m firm_microsim.populace_ledger --facts-jsonl /tmp/uk-firm-ledger-upstream-bundle/consumer_facts.jsonl --iterations 1000 --output /tmp/populace_ledger_upstream_full_rebuild.txt --json-output /tmp/populace_ledger_upstream_full_rebuild.jsondiff -u results/populace_ledger_comparison.txt /tmp/populace_ledger_upstream_full_rebuild.txt && diff -u results/populace_ledger_provenance.json /tmp/populace_ledger_upstream_full_rebuild.jsoncd paper && python3 build_site.pyrm -rf paper/out && cd paper && quarto render index.qmd --to pdfpassed, with existing footnote destination warnings only