Skip to content
contre-budget
ENFR

The arithmetic

Source of truth: packages/engine/src/simulate.ts, function simulate(baseline, budget, deltas). This page restates it; if they ever differ, the code is right and this page is wrong.

Inputs

Per year, in this order (simulate.ts)

  1. Revenue = official revenue + Σ revenue deltas + GDP effect, where the GDP effect = official revenue × elasticity × Σ growth deltas, computed low-with-low, central-with-central, high-with-high (gdpEffectOnRevenue).
  2. GDP = official GDP × (1 + Σ growth deltas).
  3. Expenditure before interest = official expenditure − official interest + Σ expenditure deltas + allocation deltas.
  4. Interest = official interest + official implicit rate × (our previous-year debt − official previous-year debt) (interestExtra). A smaller deficit this year lowers next year's interest; that is the only feedback loop.
  5. Expenditure = expenditure before interest + interest.
  6. Balance = revenue − expenditure (negative = deficit).
  7. Debt = official debt + (our previous debt − official previous debt) − (our balance − official balance). With no change, debt equals the official debt exactly (golden test 1).
  8. Ratios = balance / GDP and debt / GDP, band by band.

Bands

Bands are added term by term; a subtraction uses low − high for the low bound and high − low for the high bound (sub); multiplying by a negative factor swaps the bounds (scale). So year ten shows the honest spread of every uncertainty compounded.

What is not modelled

Interactions between reforms (effects are added; the interface says so), any macro feedback beyond the single revenue elasticity, behavioural responses not already inside a card's numbers.

Tests that pin this down

packages/engine/test/simulate.test.ts: golden 1 (no change = official path), the four effect tests, the debt-step property (200 random budgets), the band-ordering property. packages/cards/test/golden.test.ts: golden 2 (a card reproduces its stated check).