PolicyEngine / PolicyEngine/microcosm

UK firm generator: net-VAT liability missing the 0.20 rate factor (inherited from firm-microsim-paper pre-fix)

Open
#258 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
0
Forks
4
Avg merge
1d 3h
Merged PRs (30d)
94

Description

Summary

The experimental UK firm generator merged in #223 was ported from PolicyEngine/firm-microsim-paper before that repo's net-VAT liability correction, so it inherits the same defect: per-firm net VAT liability is computed as turnover − input instead of 0.20 × (turnover − input) (the standard rate applied to value added), with the input/output ratio drawn on [0.6, 1.5] so a large minority of firms carry negative value added.

Consequences (as measured downstream)

In firm-microsim-paper this inflated per-firm liabilities ~5× and left ~47% of firms with negative value added. The multi-target weight optimiser compensated on the band totals (aggregate calibration scores barely move — populace's 93.8% validator score is not evidence of correctness here), while distorting the near-threshold density in ways that manufactured spurious bunching structure. Full diagnosis: PolicyEngine/firm-microsim-paper#15; fix and re-run: PolicyEngine/firm-microsim-paper#21.

Fix (mirrors firm-microsim-paper#21)

  • vat_liability = STANDARD_VAT_RATE * (turnover − input) with STANDARD_VAT_RATE = 0.20 defined once
  • Input/output ratio recentred: 0.2 + Beta(4,2) * 0.6 + sector noise, clamped to [0.1, 0.95] (mean ≈ 0.6, value added strictly positive, net rate ∈ [1%, 18%])
  • Apply the same formula in generation, calibration target matrix, and validation
  • Note in docs that the model abstracts from net-repayment traders (negative liability requires rated-structure detail the band aggregates don't resolve)

Verified reference values after the fix (2023-24 vintage, firm-microsim-paper)

ρ mean 0.60, VA share 0.40, zero negative-VA firms; registered base (≥£85k) £184.7bn; overall calibration 89.4%.

🤖 Generated with Claude Code

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate the UK firm generator and the generation, calibration target matrix, and validation entry points mentioned in the issue. Trace how turnover, input, and net VAT liability are calculated, then compare each use with the referenced firm-microsim-paper correction. Done means the 0.20 factor and revised ratio are applied consistently and the documentation notes the net-repayment abstraction.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.