Skip to content

Commit caa1972

Browse files
committed
first commit, not clean yet
1 parent 8508d94 commit caa1972

19 files changed

+795
-0
lines changed

changelog_entry.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
- bump: minor
2+
changes:
3+
added:
4+
- Social Security and Medicare HI revenue tracking variables that properly separate taxation of benefits (TOB) by trust fund allocation.
5+
- Tier 1 (0-50%) and tier 2 (50-85%) taxable Social Security split variables.
6+
- TOB revenue variables for OASDI trust funds (tier 1) and Medicare HI trust fund (tier 2).
7+
- Payroll tax revenue aggregation variables for Social Security and Medicare.
8+
- Total revenue variables combining payroll taxes and taxation of benefits by trust fund (social_security_revenue, medicare_hi_revenue).
9+
- Revenue allocation parameters to enable policy modeling of trust fund credit rules.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
description: Share of tier 1 Social Security benefit taxation revenue credited to OASDI trust funds
2+
metadata:
3+
unit: /1
4+
reference:
5+
- title: 26 USC 86 - Social security and tier 1 railroad retirement benefits
6+
href: https://www.law.cornell.edu/uscode/text/26/86
7+
values:
8+
1984-01-01: 1.0
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
description: Share of tier 2 Social Security benefit taxation revenue credited to Medicare HI trust fund
2+
metadata:
3+
unit: /1
4+
reference:
5+
- title: 26 USC 86 - Social security and tier 1 railroad retirement benefits
6+
href: https://www.law.cornell.edu/uscode/text/26/86
7+
values:
8+
1993-01-01: 1.0
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
- name: Total Medicare revenue - worker with no benefits
2+
period: 2024
3+
input:
4+
people:
5+
person1:
6+
age: 30
7+
employment_income: 50_000
8+
tax_units:
9+
tax_unit:
10+
members: [person1]
11+
filing_status: SINGLE
12+
households:
13+
household:
14+
members: [person1]
15+
output:
16+
# Only payroll tax, no TOB
17+
# Payroll = 50_000 * 0.029 = 1_450
18+
medicare_hi_revenue: 1_450
19+
20+
- name: Total Medicare revenue - high earner above additional threshold
21+
period: 2024
22+
input:
23+
people:
24+
person1:
25+
age: 30
26+
employment_income: 250_000
27+
tax_units:
28+
tax_unit:
29+
members: [person1]
30+
filing_status: SINGLE
31+
households:
32+
household:
33+
members: [person1]
34+
output:
35+
# Payroll = 7_700 (from payroll test)
36+
medicare_hi_revenue: 7_700
37+
38+
- name: Total Medicare revenue - retiree with high SS and income
39+
period: 2024
40+
absolute_error_margin: 1
41+
input:
42+
people:
43+
person1:
44+
age: 67
45+
social_security: 30_000
46+
employment_income: 60_000
47+
tax_units:
48+
tax_unit:
49+
members: [person1]
50+
filing_status: SINGLE
51+
households:
52+
household:
53+
members: [person1]
54+
output:
55+
# Payroll = 60_000 * 0.029 = 1_740
56+
# TOB tier 2 revenue ≈ 3_113
57+
# Total ≈ 4_853
58+
medicare_hi_revenue: 4_853
59+
60+
- name: Total Medicare revenue - zero income
61+
period: 2024
62+
input:
63+
people:
64+
person1:
65+
age: 67
66+
social_security: 0
67+
employment_income: 0
68+
tax_units:
69+
tax_unit:
70+
members: [person1]
71+
filing_status: SINGLE
72+
households:
73+
household:
74+
members: [person1]
75+
output:
76+
medicare_hi_revenue: 0
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
- name: Medicare payroll tax revenue - zero earnings
2+
period: 2024
3+
input:
4+
people:
5+
person1:
6+
age: 30
7+
employment_income: 0
8+
households:
9+
household:
10+
members: [person1]
11+
output:
12+
payroll_tax_revenue_medicare: 0
13+
14+
- name: Medicare payroll tax revenue - standard earnings
15+
period: 2024
16+
input:
17+
people:
18+
person1:
19+
age: 30
20+
employment_income: 50_000
21+
tax_units:
22+
tax_unit:
23+
members: [person1]
24+
filing_status: SINGLE
25+
households:
26+
household:
27+
members: [person1]
28+
output:
29+
# Employee + employer Medicare tax
30+
# Rate = 1.45% + 1.45% = 2.9%
31+
# Revenue = 50_000 * 0.029 = 1_450
32+
payroll_tax_revenue_medicare: 1_450
33+
34+
- name: Medicare payroll tax revenue - above additional threshold
35+
period: 2024
36+
input:
37+
people:
38+
person1:
39+
age: 30
40+
employment_income: 250_000
41+
tax_units:
42+
tax_unit:
43+
members: [person1]
44+
filing_status: SINGLE
45+
households:
46+
household:
47+
members: [person1]
48+
output:
49+
# Regular Medicare: 250_000 * 0.029 = 7_250
50+
# Additional Medicare (employee only): (250_000 - 200_000) * 0.009 = 450
51+
# Total = 7_250 + 450 = 7_700
52+
payroll_tax_revenue_medicare: 7_700
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
- name: SS payroll tax revenue - zero earnings
2+
period: 2024
3+
input:
4+
people:
5+
person1:
6+
age: 30
7+
employment_income: 0
8+
households:
9+
household:
10+
members: [person1]
11+
output:
12+
payroll_tax_revenue_social_security: 0
13+
14+
- name: SS payroll tax revenue - standard earnings
15+
period: 2024
16+
input:
17+
people:
18+
person1:
19+
age: 30
20+
employment_income: 50_000
21+
households:
22+
household:
23+
members: [person1]
24+
output:
25+
# Employee + employer SS tax
26+
# Rate = 6.2% + 6.2% = 12.4%
27+
# Revenue = 50_000 * 0.124 = 6_200
28+
payroll_tax_revenue_social_security: 6_200
29+
30+
- name: SS payroll tax revenue - above wage base
31+
period: 2024
32+
input:
33+
people:
34+
person1:
35+
age: 30
36+
employment_income: 200_000
37+
households:
38+
household:
39+
members: [person1]
40+
output:
41+
# 2024 wage base = 168_600
42+
# Revenue = 168_600 * 0.124 = 20_906.40
43+
payroll_tax_revenue_social_security: 20_906.40
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
- name: Total SS revenue - worker with no benefits
2+
period: 2024
3+
input:
4+
people:
5+
person1:
6+
age: 30
7+
employment_income: 50_000
8+
tax_units:
9+
tax_unit:
10+
members: [person1]
11+
filing_status: SINGLE
12+
households:
13+
household:
14+
members: [person1]
15+
output:
16+
# Only payroll tax, no TOB
17+
# Payroll = 50_000 * 0.124 = 6_200
18+
social_security_revenue: 6_200
19+
20+
- name: Total SS revenue - retiree with benefits and income
21+
period: 2024
22+
absolute_error_margin: 1
23+
input:
24+
people:
25+
person1:
26+
age: 67
27+
social_security: 20_000
28+
employment_income: 30_000
29+
tax_units:
30+
tax_unit:
31+
members: [person1]
32+
filing_status: SINGLE
33+
households:
34+
household:
35+
members: [person1]
36+
output:
37+
# Payroll = 30_000 * 0.124 = 3_720
38+
# TOB ≈ 495 (from TOB test)
39+
# Total ≈ 4_215
40+
social_security_revenue: 4_215
41+
42+
- name: Total SS revenue - zero income
43+
period: 2024
44+
input:
45+
people:
46+
person1:
47+
age: 67
48+
social_security: 0
49+
employment_income: 0
50+
tax_units:
51+
tax_unit:
52+
members: [person1]
53+
filing_status: SINGLE
54+
households:
55+
household:
56+
members: [person1]
57+
output:
58+
social_security_revenue: 0
Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
- name: Tier 1 - zero income
2+
period: 2024
3+
input:
4+
people:
5+
person1:
6+
age: 67
7+
social_security: 0
8+
tax_units:
9+
tax_unit:
10+
members: [person1]
11+
filing_status: SINGLE
12+
households:
13+
household:
14+
members: [person1]
15+
output:
16+
taxable_social_security_tier_1: 0
17+
18+
- name: Tier 1 - below base threshold
19+
period: 2024
20+
input:
21+
people:
22+
person1:
23+
age: 67
24+
social_security: 20_000
25+
employment_income: 0
26+
tax_units:
27+
tax_unit:
28+
members: [person1]
29+
filing_status: SINGLE
30+
households:
31+
household:
32+
members: [person1]
33+
output:
34+
# Combined income = 0 + 0.5 * 20_000 = 10_000
35+
# Base threshold for SINGLE = 25_000
36+
# 10_000 < 25_000, so tier 1 = 0
37+
taxable_social_security_tier_1: 0
38+
39+
- name: Tier 1 - between base and adjusted base
40+
period: 2024
41+
input:
42+
people:
43+
person1:
44+
age: 67
45+
social_security: 20_000
46+
employment_income: 20_000
47+
tax_units:
48+
tax_unit:
49+
members: [person1]
50+
filing_status: SINGLE
51+
households:
52+
household:
53+
members: [person1]
54+
output:
55+
# Combined income = 20_000 + 0.5 * 20_000 = 30_000
56+
# Base threshold = 25_000, adjusted base = 34_000
57+
# Excess over base = 30_000 - 25_000 = 5_000
58+
# Tier 1 = min(0.5 * 20_000, 0.5 * 5_000) = min(10_000, 2_500) = 2_500
59+
taxable_social_security_tier_1: 2_500
60+
61+
- name: Tier 1 - above adjusted base
62+
period: 2024
63+
input:
64+
people:
65+
person1:
66+
age: 67
67+
social_security: 30_000
68+
employment_income: 50_000
69+
tax_units:
70+
tax_unit:
71+
members: [person1]
72+
filing_status: SINGLE
73+
households:
74+
household:
75+
members: [person1]
76+
output:
77+
# Combined income = 50_000 + 0.5 * 30_000 = 65_000
78+
# Base = 25_000, adjusted base = 34_000
79+
# Over adjusted base, so tier 1 = bracket amount
80+
# Bracket amount = min(amount_under_paragraph_1, 0.5 * (34_000 - 25_000))
81+
# amount_under_paragraph_1 = min(0.5 * 30_000, 0.5 * (65_000 - 25_000))
82+
# = min(15_000, 20_000) = 15_000
83+
# Bracket amount = min(15_000, 0.5 * 9_000) = min(15_000, 4_500) = 4_500
84+
taxable_social_security_tier_1: 4_500
85+
86+
- name: Tier 1 - joint filing with high income
87+
period: 2024
88+
input:
89+
people:
90+
person1:
91+
age: 67
92+
social_security: 40_000
93+
employment_income: 60_000
94+
person2:
95+
age: 65
96+
social_security: 20_000
97+
employment_income: 40_000
98+
tax_units:
99+
tax_unit:
100+
members: [person1, person2]
101+
filing_status: JOINT
102+
marital_units:
103+
marital_unit:
104+
members: [person1, person2]
105+
marital_unit_id: 0
106+
households:
107+
household:
108+
members: [person1, person2]
109+
output:
110+
# Combined income = 100_000 + 0.5 * 60_000 = 130_000
111+
# Base for JOINT = 32_000, adjusted base = 44_000
112+
# Over adjusted base
113+
# Excess over base = 130_000 - 32_000 = 98_000
114+
# amount_under_paragraph_1 = min(0.5 * 60_000, 0.5 * 98_000)
115+
# = min(30_000, 49_000) = 30_000
116+
# Bracket amount = min(30_000, 0.5 * (44_000 - 32_000))
117+
# = min(30_000, 6_000) = 6_000
118+
taxable_social_security_tier_1: 6_000

0 commit comments

Comments
 (0)