Skip to content

Add Belgium pilot: Axiom rules engine over populace-be entity tables#448

Draft
MaxGhenis wants to merge 2 commits into
mainfrom
be-axiom-pilot
Draft

Add Belgium pilot: Axiom rules engine over populace-be entity tables#448
MaxGhenis wants to merge 2 commits into
mainfrom
be-axiom-pilot

Conversation

@MaxGhenis

Copy link
Copy Markdown
Contributor

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, a TaxBenefitModelVersion subclass (deliberately outside the certified-release machinery: no manifest, no region registry) whose run() builds a populace Frame, executes the rulespec-be composed worker pipeline through the populace AxiomEngine adapter, and returns weighted person/household MicroDataFrames 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:

aggregate this PR (Axiom) comparator
employee SSC EUR 20.87B ONSS 2024: EUR 20.84B (ratio 1.002)
worker PIT before withholding EUR 32.81B SPF 2023 all-PIT: EUR 62.84B (worker slice only)

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-frame and axiom-rules-engine are not on PyPI; nothing is added to pyproject.toml. The module docstring and test skip conditions document source installation.

🤖 Generated with Claude Code

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>
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Belgium pilot: run the Axiom rules engine over populace-be entity tables

1 participant