Skip to content

Add firm-level VAT implementation#1321

Closed
MaxGhenis wants to merge 1 commit into
PolicyEngine:masterfrom
MaxGhenis:firm-vat-implementation-clean
Closed

Add firm-level VAT implementation#1321
MaxGhenis wants to merge 1 commit into
PolicyEngine:masterfrom
MaxGhenis:firm-vat-implementation-clean

Conversation

@MaxGhenis
Copy link
Copy Markdown
Collaborator

Summary

Implements firm-level VAT logic for PolicyEngine UK, enabling modeling of VAT at the business level with registration thresholds and rate calculations.

Changes

  • ✨ Added Firm entity with owner role linking to persons
  • 📊 Created VAT parameters:
    • Registration threshold (£90,000)
    • Deregistration threshold (£88,000)
    • Zero rate (0%)
  • 🧮 Implemented 8 VAT calculation variables:
    • firm_turnover: Annual business turnover
    • firm_vat_registered: Registration status based on threshold
    • firm_standard_rated_supplies: Supplies at 20% rate
    • firm_reduced_rated_supplies: Supplies at 5% rate
    • firm_zero_rated_supplies: Supplies at 0% rate
    • firm_vat_on_sales: Output VAT calculation
    • firm_vat_on_purchases: Input VAT
    • firm_net_vat_liability: Net VAT (output - input)

Testing

  • ✅ 8 tests passing (3 entity tests, 5 VAT tests)
  • 🧪 Tests cover entity creation, VAT thresholds, and calculations
  • 🎨 Code formatted with Black

Use Cases

This enables PolicyEngine to:

  • Model VAT policy changes on businesses
  • Analyze VAT threshold impacts
  • Calculate VAT revenue from firms
  • Support business tax reform analysis

Fixes #1320

🤖 Generated with Claude Code

- Create Firm entity with owner role
- Add VAT registration thresholds (£90k) and rates
- Implement VAT calculation variables for firms
- Add comprehensive tests for firm entity and VAT logic

Fixes PolicyEngine#1320
@MaxGhenis MaxGhenis force-pushed the firm-vat-implementation-clean branch from eb97d48 to 5537f19 Compare August 19, 2025 14:58
@MaxGhenis
Copy link
Copy Markdown
Collaborator Author

Closing to reopen from a branch directly on the PolicyEngine repository (not from a fork) to avoid CI issues with missing secrets.

@MaxGhenis MaxGhenis closed this Aug 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add firm-level VAT logic with new Firm entity

1 participant