Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Compute labor supply response revenue_change instead of preserving legacy zero

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

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Quiet
Tech stack
python

Research direction

Start with calculate_labor_supply_response(...) and review PR #360 to understand the existing LaborSupplyResponse output and legacy budgetary_impact_lsr behavior. Define the meaning and sign convention for revenue_change, then identify the available simulation outputs needed to compute it. Done means active runs produce tested non-zero effects, inactive runs remain zero, and any legacy divergence is documented.

Written by the indexing model from the issue text.

Description

Context

PR #360 (Add labor supply response macro output) adds a 4.x-compatible LaborSupplyResponse output that preserves the legacy macro output shape.

As part of that parity work, revenue_change is intentionally set to 0.0 because the legacy API initialized budgetary_impact_lsr to zero and never populated it. That preserves existing public behavior, but it leaves a real fiscal-effect gap: callers may reasonably interpret labor_supply_response.revenue_change as the tax/revenue impact caused by labor-supply responses.

Current behavior

calculate_labor_supply_response(...) computes LSR behavioral quantities such as:

  • income_lsr
  • substitution_lsr
  • total_change
  • relative_lsr
  • decile average/relative breakdowns
  • hours effects where supported

But revenue_change remains hard-coded to 0.0 for both active and inactive LSR paths.

Desired behavior

Determine and implement the correct fiscal calculation for LaborSupplyResponse.revenue_change, rather than preserving the legacy zero.

Acceptance criteria

  • Define the intended meaning and sign convention for revenue_change.
  • Compute revenue_change for active LSR runs using available simulation outputs or clearly documented additional required outputs.
  • Preserve zero behavior for inactive LSR runs.
  • Add focused tests for non-zero revenue effects, zero/inactive behavior, and sign convention.
  • Document any intentional divergence from legacy budgetary_impact_lsr behavior.

Related PR: #360

Dominant language
Python
Stars
7
Forks
9
Avg merge
13h 12m
Merged PRs (30d)
11

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.

More from PolicyEngine/policyengine.py

All issues in PolicyEngine/policyengine.py

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.