Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/soi-uprating-ty2023.changed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Extend the IRS SOI income uprating series to tax year 2023 with Publication 1304 Tables 1.4 and 1.4A.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ values:
2019-01-01: 10_810_673_000
2020-01-01: 9_659_488_000
2021-01-01: 8_507_104_000
2022-01-01: 7_432_678_000
2023-01-01: 6_686_429_000
metadata:
unit: currency-USD
label: SOI alimony income
Expand All @@ -29,3 +31,7 @@ metadata:
href: https://www.irs.gov/pub/irs-soi/20in14ar.xls
- title: IRS SOI Tax Stats - Publication 1304 Table 1.4, tax year 2021, alimony received
href: https://www.irs.gov/pub/irs-soi/21in14ar.xls
- title: IRS SOI Tax Stats - Publication 1304 Table 1.4, tax year 2022, alimony received
href: https://www.irs.gov/pub/irs-soi/22in14ar.xls
- title: IRS SOI Tax Stats - Publication 1304 Table 1.4, tax year 2023, alimony received
href: https://www.irs.gov/pub/irs-soi/23in14ar.xls
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
description: Total employment income.
values:
# IRS SOI Publication 1304 Table 1.4, all returns: salaries and wages.
# Amounts are published in thousands of dollars. Each value is for the tax
# year of its date.
# IRS SOI Publication 1304 Table 1.4, all returns: salaries and wages, Form
# 1040 line 1. From tax year 2022 the form splits line 1 into lines 1a to
# 1z and the table labels the line 1z total "total wages, total". Line 1z
# leaves out three amounts that line 1 included and that moved to Schedule 1
# that year: scholarships not reported on Form W-2, pensions from
# nonqualified deferred compensation and section 457 plans, and wages earned
# while incarcerated. Amounts are published in thousands of dollars. Each
# value is for the tax year of its date.
2015-01-01: 7_112_222_959_000
2016-01-01: 7_217_425_529_000
2017-01-01: 7_577_563_943_000
2018-01-01: 7_907_550_652_000
2019-01-01: 8_273_071_046_000
2020-01-01: 8_416_495_535_000
2021-01-01: 9_022_352_941_000
2022-01-01: 9_738_950_972_000
2023-01-01: 10_204_095_705_000
metadata:
unit: currency-USD
label: SOI employment income
Expand All @@ -29,3 +36,9 @@ metadata:
href: https://www.irs.gov/pub/irs-soi/20in14ar.xls
- title: IRS SOI Tax Stats - Publication 1304 Table 1.4, tax year 2021, salaries and wages
href: https://www.irs.gov/pub/irs-soi/21in14ar.xls
- title: IRS SOI Tax Stats - Publication 1304 Table 1.4, tax year 2022, total wages, total
href: https://www.irs.gov/pub/irs-soi/22in14ar.xls
- title: IRS SOI Tax Stats - Publication 1304 Table 1.4, tax year 2023, total wages, total
href: https://www.irs.gov/pub/irs-soi/23in14ar.xls
- title: 2022 Instructions for Form 1040, What's New (line 1 split into lines 1a to 1z)
href: https://www.irs.gov/pub/irs-prior/i1040gi--2022.pdf#page=6
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ values:
2019-01-01: -23_797_084_000
2020-01-01: -21_864_139_000
2021-01-01: -26_141_944_000
2022-01-01: -25_342_708_000
2023-01-01: -27_788_190_000
metadata:
unit: currency-USD
label: SOI farm income
Expand All @@ -29,3 +31,7 @@ metadata:
href: https://www.irs.gov/pub/irs-soi/20in14ar.xls
- title: IRS SOI Tax Stats - Publication 1304 Table 1.4, tax year 2021, farm net income and net loss
href: https://www.irs.gov/pub/irs-soi/21in14ar.xls
- title: IRS SOI Tax Stats - Publication 1304 Table 1.4, tax year 2022, farm net income and net loss
href: https://www.irs.gov/pub/irs-soi/22in14ar.xls
- title: IRS SOI Tax Stats - Publication 1304 Table 1.4, tax year 2023, farm net income and net loss
href: https://www.irs.gov/pub/irs-soi/23in14ar.xls
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ values:
2019-01-01: 4_494_333_000
2020-01-01: 4_893_181_000
2021-01-01: 5_555_955_000
2022-01-01: 6_073_960_000
2023-01-01: 6_281_620_000
metadata:
unit: currency-USD
label: SOI farm rental income
Expand All @@ -29,3 +31,7 @@ metadata:
href: https://www.irs.gov/pub/irs-soi/20in14ar.xls
- title: IRS SOI Tax Stats - Publication 1304 Table 1.4, tax year 2021, farm rental net income and net loss
href: https://www.irs.gov/pub/irs-soi/21in14ar.xls
- title: IRS SOI Tax Stats - Publication 1304 Table 1.4, tax year 2022, farm rental net income and net loss
href: https://www.irs.gov/pub/irs-soi/22in14ar.xls
- title: IRS SOI Tax Stats - Publication 1304 Table 1.4, tax year 2023, farm rental net income and net loss
href: https://www.irs.gov/pub/irs-soi/23in14ar.xls
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ values:
2018-01-01: 77_324_260_000
2019-01-01: 83_600_037_000
2020-01-01: 67_632_347_000
2021-01-01: 91_055_267_000
2022-01-01: 99_090_005_000
2023-01-01: 168_154_685_000
metadata:
unit: currency-USD
label: SOI non-qualified dividend income
Expand All @@ -26,3 +29,9 @@ metadata:
href: https://www.irs.gov/pub/irs-soi/19in14ar.xls
- title: IRS SOI Tax Stats - Publication 1304 Table 1.4, tax year 2020, ordinary dividends and qualified dividends
href: https://www.irs.gov/pub/irs-soi/20in14ar.xls
- title: IRS SOI Tax Stats - Publication 1304 Table 1.4, tax year 2021, ordinary dividends and qualified dividends
href: https://www.irs.gov/pub/irs-soi/21in14ar.xls
- title: IRS SOI Tax Stats - Publication 1304 Table 1.4, tax year 2022, ordinary dividends and qualified dividends
href: https://www.irs.gov/pub/irs-soi/22in14ar.xls
- title: IRS SOI Tax Stats - Publication 1304 Table 1.4, tax year 2023, ordinary dividends and qualified dividends
href: https://www.irs.gov/pub/irs-soi/23in14ar.xls
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ values:
2020-01-01: 707_431_779_000
2021-01-01: 975_656_401_000
2022-01-01: 1_031_207_920_000
2023-01-01: 991_100_084_000
metadata:
unit: currency-USD
label: SOI partnership and S-corp income
Expand All @@ -33,3 +34,5 @@ metadata:
href: https://www.irs.gov/pub/irs-soi/21in14ar.xls
- title: IRS SOI Tax Stats - Publication 1304 Table 1.4, tax year 2022, partnership and S corporation net income and net loss
href: https://www.irs.gov/pub/irs-soi/22in14ar.xls
- title: IRS SOI Tax Stats - Publication 1304 Table 1.4, tax year 2023, partnership and S corporation net income and net loss
href: https://www.irs.gov/pub/irs-soi/23in14ar.xls
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ values:
2018-01-01: 243_746_121_000
2019-01-01: 248_190_601_000
2020-01-01: 260_244_440_000
2021-01-01: 295_906_194_000
2022-01-01: 313_230_845_000
2023-01-01: 336_070_296_000
metadata:
unit: currency-USD
label: SOI qualified dividend income
Expand All @@ -26,3 +29,9 @@ metadata:
href: https://www.irs.gov/pub/irs-soi/19in14ar.xls
- title: IRS SOI Tax Stats - Publication 1304 Table 1.4, tax year 2020, qualified dividends
href: https://www.irs.gov/pub/irs-soi/20in14ar.xls
- title: IRS SOI Tax Stats - Publication 1304 Table 1.4, tax year 2021, qualified dividends
href: https://www.irs.gov/pub/irs-soi/21in14ar.xls
- title: IRS SOI Tax Stats - Publication 1304 Table 1.4, tax year 2022, qualified dividends
href: https://www.irs.gov/pub/irs-soi/22in14ar.xls
- title: IRS SOI Tax Stats - Publication 1304 Table 1.4, tax year 2023, qualified dividends
href: https://www.irs.gov/pub/irs-soi/23in14ar.xls
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ values:
2019-01-01: 47_874_852_000
2020-01-01: 40_035_052_000
2021-01-01: 46_581_312_000
2022-01-01: 51_428_727_000
2023-01-01: 56_372_332_000
metadata:
unit: currency-USD
label: SOI rental income
Expand All @@ -30,3 +32,7 @@ metadata:
href: https://www.irs.gov/pub/irs-soi/20in14ar.xls
- title: IRS SOI Tax Stats - Publication 1304 Table 1.4, tax year 2021, rent and royalty net income and net loss
href: https://www.irs.gov/pub/irs-soi/21in14ar.xls
- title: IRS SOI Tax Stats - Publication 1304 Table 1.4, tax year 2022, rent and royalty net income and net loss
href: https://www.irs.gov/pub/irs-soi/22in14ar.xls
- title: IRS SOI Tax Stats - Publication 1304 Table 1.4, tax year 2023, rent and royalty net income and net loss
href: https://www.irs.gov/pub/irs-soi/23in14ar.xls
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ values:
2018-01-01: 430_062_977_000
2019-01-01: 442_854_286_000
2020-01-01: 436_378_623_000
2021-01-01: 517_081_772_000
2022-01-01: 543_564_980_000
2023-01-01: 530_380_019_000
metadata:
unit: currency-USD
label: SOI self-employment income
Expand All @@ -26,3 +29,9 @@ metadata:
href: https://www.irs.gov/pub/irs-soi/19in14ar.xls
- title: IRS SOI Tax Stats - Publication 1304 Table 1.4, tax year 2020, business or profession net income
href: https://www.irs.gov/pub/irs-soi/20in14ar.xls
- title: IRS SOI Tax Stats - Publication 1304 Table 1.4, tax year 2021, business or profession net income
href: https://www.irs.gov/pub/irs-soi/21in14ar.xls
- title: IRS SOI Tax Stats - Publication 1304 Table 1.4, tax year 2022, business or profession net income
href: https://www.irs.gov/pub/irs-soi/22in14ar.xls
- title: IRS SOI Tax Stats - Publication 1304 Table 1.4, tax year 2023, business or profession net income
href: https://www.irs.gov/pub/irs-soi/23in14ar.xls
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ values:
2020-01-01: 150_302_155_000
2021-01-01: 208_522_006_000
2022-01-01: 77_731_595_000
2023-01-01: 70_482_448_000
metadata:
unit: currency-USD
label: SOI short-term capital gains
Expand All @@ -33,3 +34,5 @@ metadata:
href: https://www.irs.gov/pub/irs-soi/21in14acg.xls
- title: IRS SOI Tax Stats - Publication 1304 Table 1.4A, tax year 2022, net short-term capital gain
href: https://www.irs.gov/pub/irs-soi/22in14acg.xls
- title: IRS SOI Tax Stats - Publication 1304 Table 1.4A, tax year 2023, net short-term capital gain
href: https://www.irs.gov/pub/irs-soi/23in14acg.xls
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ values:
2019-01-01: 718_890_477_000
2020-01-01: 774_017_713_000
2021-01-01: 791_161_174_000
2022-01-01: 871_307_268_000
2023-01-01: 973_642_779_000
metadata:
unit: currency-USD
label: SOI social security
Expand All @@ -29,3 +31,7 @@ metadata:
href: https://www.irs.gov/pub/irs-soi/20in14ar.xls
- title: IRS SOI Tax Stats - Publication 1304 Table 1.4, tax year 2021, social security benefits, total
href: https://www.irs.gov/pub/irs-soi/21in14ar.xls
- title: IRS SOI Tax Stats - Publication 1304 Table 1.4, tax year 2022, social security benefits, total
href: https://www.irs.gov/pub/irs-soi/22in14ar.xls
- title: IRS SOI Tax Stats - Publication 1304 Table 1.4, tax year 2023, social security benefits, total
href: https://www.irs.gov/pub/irs-soi/23in14ar.xls
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ values:
2018-01-01: 60_224_030_000
2019-01-01: 61_575_197_000
2020-01-01: 59_449_107_000
2021-01-01: 55_518_422_000
2022-01-01: 55_567_941_000
2023-01-01: 66_091_992_000
metadata:
unit: currency-USD
label: SOI tax-exempt interest income
Expand All @@ -26,3 +29,9 @@ metadata:
href: https://www.irs.gov/pub/irs-soi/19in14ar.xls
- title: IRS SOI Tax Stats - Publication 1304 Table 1.4, tax year 2020, tax-exempt interest
href: https://www.irs.gov/pub/irs-soi/20in14ar.xls
- title: IRS SOI Tax Stats - Publication 1304 Table 1.4, tax year 2021, tax-exempt interest
href: https://www.irs.gov/pub/irs-soi/21in14ar.xls
- title: IRS SOI Tax Stats - Publication 1304 Table 1.4, tax year 2022, tax-exempt interest
href: https://www.irs.gov/pub/irs-soi/22in14ar.xls
- title: IRS SOI Tax Stats - Publication 1304 Table 1.4, tax year 2023, tax-exempt interest
href: https://www.irs.gov/pub/irs-soi/23in14ar.xls
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ values:
2018-01-01: 473_418_497_000
2019-01-01: 506_377_761_000
2020-01-01: 580_350_454_000
2021-01-01: 648_909_722_000
2022-01-01: 616_711_706_000
2023-01-01: 662_770_341_000
metadata:
unit: currency-USD
label: SOI tax-exempt pension income
Expand All @@ -27,3 +30,9 @@ metadata:
href: https://www.irs.gov/pub/irs-soi/19in14ar.xls
- title: IRS SOI Tax Stats - Publication 1304 Table 1.4, tax year 2020, pensions and annuities, total and taxable
href: https://www.irs.gov/pub/irs-soi/20in14ar.xls
- title: IRS SOI Tax Stats - Publication 1304 Table 1.4, tax year 2021, pensions and annuities, total and taxable
href: https://www.irs.gov/pub/irs-soi/21in14ar.xls
- title: IRS SOI Tax Stats - Publication 1304 Table 1.4, tax year 2022, pensions and annuities, total and taxable
href: https://www.irs.gov/pub/irs-soi/22in14ar.xls
- title: IRS SOI Tax Stats - Publication 1304 Table 1.4, tax year 2023, pensions and annuities, total and taxable
href: https://www.irs.gov/pub/irs-soi/23in14ar.xls
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ values:
2018-01-01: 128_582_739_000
2019-01-01: 153_253_476_000
2020-01-01: 127_375_994_000
2021-01-01: 103_535_203_000
2022-01-01: 133_596_569_000
2023-01-01: 313_812_674_000
metadata:
unit: currency-USD
label: SOI taxable interest income
Expand All @@ -26,3 +29,9 @@ metadata:
href: https://www.irs.gov/pub/irs-soi/19in14ar.xls
- title: IRS SOI Tax Stats - Publication 1304 Table 1.4, tax year 2020, taxable interest
href: https://www.irs.gov/pub/irs-soi/20in14ar.xls
- title: IRS SOI Tax Stats - Publication 1304 Table 1.4, tax year 2021, taxable interest
href: https://www.irs.gov/pub/irs-soi/21in14ar.xls
- title: IRS SOI Tax Stats - Publication 1304 Table 1.4, tax year 2022, taxable interest
href: https://www.irs.gov/pub/irs-soi/22in14ar.xls
- title: IRS SOI Tax Stats - Publication 1304 Table 1.4, tax year 2023, taxable interest
href: https://www.irs.gov/pub/irs-soi/23in14ar.xls
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ values:
2018-01-01: 774_661_125_000
2019-01-01: 784_497_673_000
2020-01-01: 827_597_726_000
2021-01-01: 858_038_339_000
2022-01-01: 911_698_884_000
2023-01-01: 932_130_236_000
metadata:
unit: currency-USD
label: SOI taxable pension income
Expand All @@ -30,3 +33,9 @@ metadata:
href: https://www.irs.gov/pub/irs-soi/19in14ar.xls
- title: IRS SOI Tax Stats - Publication 1304 Table 1.4, tax year 2020, pensions and annuities, taxable
href: https://www.irs.gov/pub/irs-soi/20in14ar.xls
- title: IRS SOI Tax Stats - Publication 1304 Table 1.4, tax year 2021, pensions and annuities, taxable
href: https://www.irs.gov/pub/irs-soi/21in14ar.xls
- title: IRS SOI Tax Stats - Publication 1304 Table 1.4, tax year 2022, pensions and annuities, taxable
href: https://www.irs.gov/pub/irs-soi/22in14ar.xls
- title: IRS SOI Tax Stats - Publication 1304 Table 1.4, tax year 2023, pensions and annuities, taxable
href: https://www.irs.gov/pub/irs-soi/23in14ar.xls
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@ values:
2020-01-01: 405_283_667_000
2021-01-01: 208_872_354_000
2022-01-01: 30_247_572_000
2023-01-01: 30_939_046_000
metadata:
unit: currency-USD
label: SOI unemployment compensation
# CBO's unemployment compensation outlays begin in 2022, the year of the
# last SOI total, so later years grow with them.
# Years after the last SOI total grow with CBO's unemployment compensation
# outlays, which begin in 2022.
uprating: calibration.gov.cbo.unemployment_compensation
reference:
- title: IRS SOI Tax Stats - Publication 1304 Table 1.4, tax year 2015, unemployment compensation
Expand All @@ -34,3 +35,5 @@ metadata:
href: https://www.irs.gov/pub/irs-soi/21in14ar.xls
- title: IRS SOI Tax Stats - Publication 1304 Table 1.4, tax year 2022, unemployment compensation
href: https://www.irs.gov/pub/irs-soi/22in14ar.xls
- title: IRS SOI Tax Stats - Publication 1304 Table 1.4, tax year 2023, unemployment compensation
href: https://www.irs.gov/pub/irs-soi/23in14ar.xls
29 changes: 29 additions & 0 deletions policyengine_us/tests/test_parameter_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,17 @@
# number of returns with a loss (72_972).
"farm_rent_income.yaml": {date(2021, 1, 1): 5_555_955_000},
}
# The latest tax year with Publication 1304 Tables 1.4 and 1.4A. Raise it
# when the next year is added to every series.
SOI_LATEST_TAX_YEAR = 2023
# From tax year 2022 Table 1.4 labels the wage total "total wages, total"
# (Form 1040 line 1z) and shows its parts in the columns after it. The series
# takes the total, not the Form W-2 column beside it (22in14ar: 9_360_356_986;
# 23in14ar: 10_046_008_299).
SOI_LINE_1Z_WAGES = {
date(2022, 1, 1): 9_738_950_972_000,
date(2023, 1, 1): 10_204_095_705_000,
}
PARAMETER_SCHEMA_KEYS = {
"brackets",
"description",
Expand Down Expand Up @@ -226,6 +237,24 @@ def test_soi_corrected_values_hold_their_table_1_4_totals():
assert values[period] == value, (filename, period)


def test_soi_series_run_to_the_latest_published_tax_year():
"""Parameter uprating grows a series from its last value, so a series that
stops early projects every later year from an older tax year, and adding
the missing years later moves all of them. Every SOI income series ends at
the same, latest published tax year."""
for path in sorted(SOI_DIR.glob("*.yaml")):
parameter = yaml.safe_load(path.read_text())
if "values" not in parameter:
continue
assert max(parameter["values"]).year == SOI_LATEST_TAX_YEAR, path.name


def test_soi_wages_use_the_line_1z_total():
values = yaml.safe_load((SOI_DIR / "employment_income.yaml").read_text())["values"]
for period, value in SOI_LINE_1Z_WAGES.items():
assert values[period] == value, period


def test_soi_agi_bands_are_keyed_to_their_table_1_1_tax_year():
for filename, (period, href, lowest, highest) in SOI_AGI_BAND_TABLES.items():
parameter = yaml.safe_load((SOI_AGI_DIR / filename).read_text())
Expand Down