Add Belgium pilot: Axiom rules engine over populace-be entity tables#448
Draft
MaxGhenis wants to merge 2 commits into
Draft
Add Belgium pilot: Axiom rules engine over populace-be entity tables#448MaxGhenis wants to merge 2 commits into
MaxGhenis wants to merge 2 commits into
Conversation
The first non-policyengine-core country channel: an Axiom-backed TaxBenefitModelVersion outside the certified-release machinery, running the rulespec-be composed worker pipeline (employee SSC and PIT before withholding) over populace-be person/household tables with calibrated weights. Includes a populace-style two-entity dataset class, a population example scored against ONSS/SPF facts, and tests that skip cleanly when the source-only dependencies are absent. Fixes #447 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
10 tasks
The composed pipeline now computes the ONSS work-bonus amounts from law (the a/b supplied inputs are gone; the reference-wage input bridges 0 to worker remuneration), and the ordinary-contribution concept nets the bonus. Update the supplied defaults, exercise the phase-out in the test fixture (wiped at 20k, partial at 30k, statutory 13.07 percent by 60k), and label the example aggregates accordingly. Co-Authored-By: Claude Fable 5 <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.
Fixes #447
What this is
A pilot Belgium channel for policyengine.py — the first country that runs on the Axiom rules engine instead of a policyengine-core country package:
src/policyengine/tax_benefit_models/be/—AxiomBelgiumPilot, aTaxBenefitModelVersionsubclass (deliberately outside the certified-release machinery: no manifest, no region registry) whoserun()builds a populaceFrame, executes the rulespec-be composed worker pipeline through the populaceAxiomEngineadapter, and returns weighted person/householdMicroDataFrames as the output dataset.PopulaceBelgiumDataset/BEYearData— two-entity (person, household) HDF5 dataset in the populace-be layout, calibrated household weights.examples/belgium_axiom_pilot.py— the end-to-end population run.tests/test_be_axiom_pilot.py— statutory-SSC and progressivity assertions on a three-person fixture; skips cleanly unless populace-frame, axiom-rules-engine, and a rulespec-be checkout are present (they are source-only, so CI skips).Results on the calibrated pilot dataset
populace-us support records reweighted to Belgian Ledger targets (Statbel demography, SPF fiscal income, ONSS contributions, ONEM recipients — 21/21 within 1.8%), 166,302 persons:
Cross-engine: the same population through EUROMOD BE_2025 (axiom-oracles) agrees on employee SIC to EUR 643 on EUR 20.9B; the PIT gap (EUROMOD EUR 22.64B) is the known unencoded employment tax reductions, decomposed in TheAxiomFoundation/rulespec-be#1.
What this is not
Not a certified model and not representative Belgian microdata — the support records are American, worker-slice coverage only, individual assessment. Labeled as such throughout. It demonstrates the channel (
Simulation(dataset=..., tax_benefit_model_version=AxiomBelgiumPilot(...)).run()) so the certified pieces (SILC support strata, engine-computed targets, full rulespec-be coverage) can land behind a stable surface.Dependency note
populace-frameandaxiom-rules-engineare not on PyPI; nothing is added topyproject.toml. The module docstring and test skip conditions document source installation.🤖 Generated with Claude Code