PolicyEngine / PolicyEngine/policyengine-uk
Add firm-level VAT logic with new Firm entity
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 50
- Forks
- 33
- Avg merge
- 20h 58m
- Merged PRs (30d)
- 14
Description
Summary
This issue tracks the implementation of VAT (Value Added Tax) calculations at the firm level, which requires creating a new Firm entity in the model.
Background
Currently, PolicyEngine UK models VAT at the household consumption level but doesn't model VAT from the perspective of firms/businesses. To properly model VAT policy impacts on businesses and the economy, we need:
- A new Firm entity to represent businesses
- VAT registration thresholds (currently £90,000 annual turnover)
- VAT rates and exemptions by business type
- Input/output VAT calculations
Proposed Implementation
1. New Firm Entity
- Create a Firm entity class inheriting from Entity
- Define firm attributes: turnover, industry sector, VAT registration status
- Link firms to households (for sole traders/partnerships)
2. VAT Parameters
- Registration threshold (£90,000)
- Standard rate (20%)
- Reduced rate (5%)
- Zero rate (0%)
- Exempt supplies categories
3. VAT Variables
- firm_turnover
- firm_vat_registered
- firm_vat_on_sales
- firm_vat_on_purchases
- firm_net_vat_liability
4. Test Coverage
- Unit tests for Firm entity
- Tests for VAT threshold calculations
- Tests for different VAT rates by supply type
- Integration tests with household income
Benefits
- Model VAT policy changes impact on businesses
- Better understand VAT revenue implications
- Enable analysis of VAT threshold changes
- Support business tax reform modeling
Implementation Plan
- Create Firm entity class with TDD approach
- Add VAT parameters from HMRC guidelines
- Implement VAT calculation variables
- Add comprehensive test coverage
- Document the new functionality
References
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the existing household-level VAT implementation and the current entity/model structure; no specific files or tests are named in the issue. Done means a Firm entity, VAT parameters and variables, household links, unit and integration tests, and documentation covering the listed VAT scenarios.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100