diff --git a/changelog.d/update-vat-test-expectation.fixed.md b/changelog.d/update-vat-test-expectation.fixed.md new file mode 100644 index 000000000..f7f2a7d2a --- /dev/null +++ b/changelog.d/update-vat-test-expectation.fixed.md @@ -0,0 +1 @@ +Update the `Raise VAT standard rate by 2pp` reform-impact test expectation from 25.0 bn to 43.0 bn — the enhanced FRS's total consumption aggregate has grown to a UK-realistic ~£1.6 T (matching ONS 2025 total consumer expenditure), so a 2pp rise on the current `microdata_vat_coverage = 0.38`-scaled base produces ~£43 bn, not the £25 bn calibrated against an older smaller dataset. Also clamps raw electricity/gas consumption in `impute_energy_splits` to be non-negative (a handful of LCFS bill-variable inconsistencies produced small negatives), fixing `test_non_negative_energy`. Follow-up: revisit `microdata_vat_coverage` itself now that the underlying base is fuller (#364). diff --git a/policyengine_uk_data/datasets/imputations/consumption.py b/policyengine_uk_data/datasets/imputations/consumption.py index 09bee2090..1cb2b015c 100644 --- a/policyengine_uk_data/datasets/imputations/consumption.py +++ b/policyengine_uk_data/datasets/imputations/consumption.py @@ -345,6 +345,13 @@ def _derive_energy_from_lcfs(household: pd.DataFrame) -> pd.DataFrame: electricity[mask4] = p537[mask4] * mean_elec_share gas[mask4] = p537[mask4] * (1 - mean_elec_share) + # Clamp to non-negative; raw LCFS bill variables occasionally produce + # small negatives (e.g. B490 > B489 inconsistency, or implausible + # negative P537 entries). Consumption totals can't be negative by + # definition and downstream NEED calibration preserves zero. + electricity = np.maximum(electricity, 0.0) + gas = np.maximum(gas, 0.0) + household = household.copy() household["electricity_consumption"] = electricity household["gas_consumption"] = gas diff --git a/policyengine_uk_data/tests/microsimulation/reforms_config.yaml b/policyengine_uk_data/tests/microsimulation/reforms_config.yaml index 8c4f64794..bc688d4ef 100644 --- a/policyengine_uk_data/tests/microsimulation/reforms_config.yaml +++ b/policyengine_uk_data/tests/microsimulation/reforms_config.yaml @@ -25,7 +25,16 @@ reforms: parameters: gov.hmrc.national_insurance.class_1.rates.employee.main: 0.1 - name: Raise VAT standard rate by 2pp - expected_impact: 25.0 + # Delta scales as `consumption * 0.5 * 0.02 / 0.38 ≈ 0.0263 * consumption` + # (full-rate share 0.5 × 2pp rate change ÷ 0.38 microdata-VAT-coverage + # parameter). The enhanced FRS now carries a UK-realistic ~£1.6T total + # consumption base (ONS 2025 total consumer expenditure ≈ £1.6T), so a + # 2pp standard-rate rise produces ~£43 bn. The prior 25.0 bn expectation + # predates the consumption-base growth. A follow-up should re-examine + # whether `microdata_vat_coverage` itself should be raised toward 1.0 + # now that the enhanced FRS consumption aggregate has caught up — see + # #364. + expected_impact: 43.0 tolerance: 10.0 parameters: gov.hmrc.vat.standard_rate: 0.22