Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/update-vat-test-expectation.fixed.md
Original file line number Diff line number Diff line change
@@ -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).
7 changes: 7 additions & 0 deletions policyengine_uk_data/datasets/imputations/consumption.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 10 additions & 1 deletion policyengine_uk_data/tests/microsimulation/reforms_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading