Skip to content

OBR bridge lever HHDI_ADDFACTOR: 32% sign asymmetry, 16% non-linearity, and no solve converges #215

Done

Description

@vahid-ahmadi

Problem

score_reform(model="obr") injects the PolicyEngine costing through HHDI_ADDFACTOR, the one OBR lever with a behavioural response. In a sign/size sweep on 6 Nov 2026 that lever's GDP response is neither symmetric nor linear, and every OBR solve, including a zero shock, reports solver.converged = False in all quarters.

Evidence

obr_shock(var="HHDI_ADDFACTOR", periods=8) from this branch (vahid/r5-api-scenarios, obr_macro installed in ~/macro/integration/.venv). Raw output: scratchpad/r5/api/obr_out.json.

quarter +1000 −1000 +2000 2×(+1000)
2025Q1 −0.071 +0.101 −0.174 −0.142
2026Q4 (peak) −0.376 +0.256 −0.630 −0.751
cumulative, 8 q −2.035 +1.505 −3.534 −4.070

(£bn GDP; positive shock = revenue raised, so GDP falls.)

  • Symmetry error: max |Δ(+1000) + Δ(−1000)| = 0.120 against a peak of 0.376, 32%.
  • Linearity error: max |Δ(+2000) − 2Δ(+1000)| = 0.121, 16%.
  • Every run, including CGG with shock 0, returns "12 of 12 quarters did not converge to tolerance … Gauss-Seidel exited on the stall break".

At £1bn a quarter a semi-structural model should be close to linear, so most of this gap is probably the residue of two non-converged solves, not economics. The CGG lever is exactly linear (it is an identity), so the sweep does not test the solver there.

Why it matters

Every score_reform(model="obr") result is a difference of two such solves, so a reform and its mirror image will not score as mirror images, and the GDP figure depends on the reform's size in a way the model does not intend.

Options

  1. Tighten the solver in obr-macroeconomic-model (more iterations, or Newton on the stalled block) until the zero-shock and baseline runs converge, then add symmetry and linearity gates for HHDI_ADDFACTOR (±1000, 2000; tolerance of a few %).
  2. In the adapter, run each bridge reform at ±size and report the antisymmetric part, (Δ(+) − Δ(−))/2, plus the asymmetry as a diagnostic. This doubles the solves.
  3. Leave it, and add the measured asymmetry to the bridge caveats.

Recommendation

Option 1 upstream; until then option 3, so no one reads a bridge GDP figure as precise to more than about a third.

🤖 Generated with Claude Code

Activity

  1. vahid-ahmadi commented on Nov 6, 2026

    @vahid-ahmadi
    ContributorAuthor

    Triage (6 Nov): this has the same root cause as PolicyEngine/obr-macroeconomic-model#50: the published closure does not converge (the stall break hits every quarter). That is diagnosed in PolicyEngine/obr-macroeconomic-model#42. The opt-in nominal-GDP pin in PolicyEngine/obr-macroeconomic-model#52 converges 25/25 quarters. Keep this open until the HHDI_ADDFACTOR symmetry has been re-measured under that pin; the measurement here is in #216's sweep notes.

  2. added
    bug
    on Nov 6, 2026
  3. vahid-ahmadi commented on Nov 25, 2026

    @vahid-ahmadi
    ContributorAuthor

    Closing: re-measured at the current pin, obr-macroeconomic-model 0e44ec8, and the asymmetry is gone. The cause was the non-converged solves, as the triage note said; the pin has had every quarter converging since #262.

    Local runs of run_reform(var="HHDI_ADDFACTOR") through the adapter's import path, 24 Nov 2026, solver_converged = True and no non-converged quarters in every run, including the zero shock:

    run this issue (6 Nov, old pin) now (0e44ec8)
    ±1000 for 8 quarters, 12-quarter window: symmetry error, share of peak 32% 0.15%
    +2000 against 2 × (+1000): linearity error, share of peak 16% 0.15%
    zero shock, largest GDP delta non-converged residue 0.0
    ±1637.5 for 25 quarters to 2031Q1: symmetry error not measured 0.19%
    +3275 against 2 × (+1637.5), 25 quarters: linearity error not measured 0.19%

    So a reform and its mirror image now score as mirror images to within 0.2% of the peak response, over both the worked-example window and the full databank. The 25-quarter run covers the window score_reform uses by default (2026Q2–2031Q1).

    Scope of the measurement: one lever, flat shocks of £1.0bn to £3.3bn a quarter, default closure. It says nothing about larger shocks or the opt-in closures. No symmetry gate has been added to the test suite; that is still worth doing as a slow test.

    Found on the way: obr_shock(var="HHDI_ADDFACTOR") with periods below 12 raises a TypeError, locally and hosted. Fix in #283.

    🤖 Generated with Claude Code

  4. vahid-ahmadi commented on Nov 25, 2026

    @vahid-ahmadi
    ContributorAuthor

    Correction to my closing comment: the 25-quarter runs were a flat shock from 2025Q1 to 2031Q1. They span the quarters of score_reform's default window (2026Q2–2031Q1) but are not the same experiment: score_reform applies a path that starts in 2026Q2 and steps each fiscal year. Symmetry on that stepped path was not measured. #287 adds a nightly gate on the flat eight-quarter case.

    🤖 Generated with Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions