Skip to content

Implement tier-separated trust fund revenue (OASDI vs Medicare HI) #6751

@MaxGhenis

Description

@MaxGhenis

Background

Trust fund revenue from SS benefit taxation needs to be properly separated by tier:

  • Tier 1 (0-50% taxation) → OASDI trust funds
  • Tier 2 (50-85% taxation) → Medicare HI trust fund

Currently we have tob_revenue_total which calculates total revenue correctly using branching + neutralization.

Problem

Proportional allocation approach (allocating total based on tier amounts) is not correct because:

  • Different tiers may be taxed at different marginal rates
  • Need to directly measure marginal tax impact of each tier separately

Solution

Implement separate branching for each tier:

class tob_revenue_oasdi(Variable):
    def formula(tax_unit, period, parameters):
        sim = tax_unit.simulation
        income_tax_with = tax_unit('income_tax', period)
        
        # Branch and neutralize ONLY tier 1
        branch = sim.get_branch('tob_tier1', clone_system=True)
        branch.tax_benefit_system.neutralize_variable('taxable_social_security_tier_1')
        
        # Delete all calculated variables
        for var in branch.tax_benefit_system.variables:
            if var not in branch.input_variables:
                branch.delete_arrays(var)
        
        income_tax_without_tier1 = branch.tax_unit('income_tax', period)
        del sim.branches['tob_tier1']
        
        return income_tax_with - income_tax_without_tier1

Similar for tob_revenue_medicare_hi with tier 2.

Validation Needed

Test that tier1 + tier2 = total (within rounding).

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions