PolicyEngine / PolicyEngine/policyengine-uk

Add firm-level VAT logic with new Firm entity

Open
#1,320 1 comment 0 reactions 0 assignees View on GitHub

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:

  1. A new Firm entity to represent businesses
  2. VAT registration thresholds (currently £90,000 annual turnover)
  3. VAT rates and exemptions by business type
  4. 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

  1. Create Firm entity class with TDD approach
  2. Add VAT parameters from HMRC guidelines
  3. Implement VAT calculation variables
  4. Add comprehensive test coverage
  5. Document the new functionality

References

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

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.