diff --git a/cps_stage1/stage1.py b/cps_stage1/stage1.py index 82a3c498..7f28439b 100644 --- a/cps_stage1/stage1.py +++ b/cps_stage1/stage1.py @@ -6,7 +6,7 @@ def main(syr=2014): SYR = str(syr) # Start year of CPS - EYR = 2034 # Last year in our extrapolation + EYR = 2035 # Last year in our extrapolation # Read in state SOI estimates soi_estimates = pd.read_csv( diff --git a/cps_stage1/stage_2_targets.csv b/cps_stage1/stage_2_targets.csv index 3a7bbaa0..852b0034 100644 --- a/cps_stage1/stage_2_targets.csv +++ b/cps_stage1/stage_2_targets.csv @@ -1,24 +1,24 @@ -,2014,2015,2016,2017,2015,2016,2017,2018,2019,2020,2021,2022,2023,2024,2025,2026,2027,2028,2029,2030,2031,2032,2033,2034 -Single,69579590,71086947,71410690,73021932,72028792,71924422,73183813,74331876,75333822,76224441,77122018,77984804,78861507,79745168,80635787,81540322,82451814,83377223,84309589,85248914,86209112,87169310,88150383,89131455 -Joint,55128595,57272012,57201828,57987204,57069122,56986429,57984256,58893878,59687730,60393376,61104535,61788129,62482750,63182883,63888529,64605200,65327385,66060595,66799319,67543555,68304329,69065104,69842417,70619730 -HH,22077498,22134303,21659639,21894095,22854626,22821510,23221112,23585391,23903307,24185899,24470699,24744460,25022636,25303020,25585612,25872620,26161835,26455466,26751304,27049351,27354020,27658689,27969982,28281275 -SS_return,27401498,28087514,28329015,28967603,31684352,32736570,33818929,34953351,36139836,37386604,38614191,39891101,41154310,42384637,43664287,44875433,46007115,47097695,48141692,49089784,49843325,50509181,51128455,51758690 -Dep_return,96916673,96505181,94809260,94708629,99911398,100735190,101549290,102373082,103187182,104001282,104805690,105610099,106414507,107209224,107984557,108759890,109525532,110281482,111018049,111744924,112452416,113150216,113828632,114487666 -INTS,156367939,95881223,96640233,106055367,124828526,125813644,138072890,143545768,146829495,146407301,134695343,144655980,157571972,186343673,218664926,236553418,245826037,258570024,270985638,285793682,302009037,318928048,334471022,352265693 -DIVS,254702232,260252720,254065327,282336042,340613295,332513764,369521998,401130545,421201081,463481652,543865676,577588252,589126263,615335122,646154092,670529096,689962876,711663506,739247758,768283813,798109444,828750122,860205848,892654912 -SCHCI,374659000,391975736,389078638,416010104,435503622,432281554,462216808,485895257,491852335,503691560,528568917,538722176,565510295,595108356,618936668,647223422,673936609,698813967,724065983,750104784,777417425,806490963,838149649,870819914 -SCHCL,57400238,60161435,60996610,69637956,63668344,64552308,73696166,77467361,78425945,80308673,84275029,85893716,90164294,94882593,98682489,103194148,107453246,111419602,115449099,119599136,123950074,128588013,133633494,138839696 -CGNS,705007630,713598090,634341278,859894631,1249696525,1110880523,1505896298,1631599158,1522675479,1983609468,3582355270,2158874365,2349155924,2472250256,2396038931,2300439897,2274143112,2291627301,2339708822,2406543545,2485363398,2572290839,2665140344,2763136404 -Pension,663223262,689991999,693626543,729187412,776568117,800178866,846471849,889515039,925594384,996293984,1075416519,1097236565,1154340088,1228952704,1302172553,1362127935,1418103979,1477993039,1540534993,1605995129,1673776546,1744476146,1817430705,1894629893 -SCHEI,846331543,891134646,882933054,973306129,1140431754,1129937243,1245546132,1348629314,1385360103,1322308403,1710012883,1877332629,1906192534,2004874792,2074612511,2104995814,2145281195,2173717935,2218319607,2285772231,2362703769,2447590822,2533493474,2622273653 -SCHEL,166947674,177896945,176446339,206369393,169401805,168032834,196514107,212774811,218567895,208634508,269787441,296198563,300739540,316315758,327317610,332109008,338469714,342960607,349989104,360640365,372777461,386166665,399722816,413729726 -SS,575126918,605152093,619856114,644989570,709246515,726500323,755946821,795975655,848657280,898463271,939067232,1016191751,1138003633,1234049828,1311634449,1389794197,1470139428,1555315724,1643310143,1733317505,1824417609,1916150353,2012484111,2113648936 -UCOMP,33288898,27225383,25420264,23946035,9810238,9161105,8628482,7962704,7490002,7746327,66767543,10193061,7633144,9600518,10486003,11458039,12456706,13288928,13928075,14454040,14953373,15426075,15868818,16341520 -wage1,114320683,112017897,111270085,107376379,132211870,134189618,140763057,147839507,154870229,157088051,171298111,184639335,196277181,207274830,216752015,225726189,234517449,243583079,253037400,262731794,272666261,282829370,293255416,304070153 -wage2,261995646,261659142,253415638,247511878,302997965,307530489,322595239,338812769,354925502,360008217,392574276,423149168,449820325,475024306,496743745,517310403,537457868,558234123,579901163,602118394,624885815,648177228,672071231,696856019 -wage3,381259619,383184602,382875414,382789227,440926749,447522541,469444969,493044939,516492406,523888842,571279413,615772411,654584640,691261815,722868238,752797118,782115982,812349870,843880041,876210856,909342317,943236297,978007175,1014074335 -wage4,418567676,428313928,436140082,441282302,484073517,491314738,515382379,541291719,567033631,575153844,627181806,676028654,718638843,758905053,793604314,826461876,858649731,891842147,926457694,961952233,998325764,1035536430,1073709802,1113306305 -wage5,418379915,424369612,426147995,437485582,483856372,491094344,515151189,541048906,566779271,574895841,626900465,675725401,718316476,758564624,793248319,826091142,858264558,891442085,926042104,961520721,997877935,1035071910,1073228158,1112806898 -wage6,916618937,952347137,962308451,1000500360,1060069801,1075927308,1128632897,1185371609,1241743674,1259526081,1373461815,1480431245,1573743053,1661921795,1737909505,1809864091,1880352087,1953039969,2028844355,2106573641,2186227827,2267715250,2351310897,2438023049 -wage7,840581301,835434509,852517230,870406373,972132275,986674331,1035007756,1087039738,1138735488,1155042766,1259527021,1357622859,1443194036,1524057957,1593742147,1659727779,1724368481,1791026578,1860542652,1931823946,2004870461,2079598139,2156259153,2235778144 -wage8,3433224075,3714896131,3792750634,4090211841,3970523643,4029918419,4227328804,4439845374,4650988654,4717593201,5144342954,5545000204,5894502414,6224778570,6509392846,6778900936,7042915867,7315170537,7599098168,7890235569,8188582741,8493796362,8806906397,9131689395 +,2014,2015,2016,2017,2015,2016,2017,2018,2019,2020,2021,2022,2023,2024,2025,2026,2027,2028,2029,2030,2031,2032,2033,2034,2035 +Single,69579590,71086947,71410690,73021932,72028792,71924422,73183813,74331876,75333822,76224441,77122018,77984804,78861507,79745168,80635787,81540322,82451814,83377223,84309589,85248914,86209112,87169310,88150383,89131455,90133401 +Joint,55128595,57272012,57201828,57987204,57069122,56986429,57984256,58893878,59687730,60393376,61104535,61788129,62482750,63182883,63888529,64605200,65327385,66060595,66799319,67543555,68304329,69065104,69842417,70619730,71413582 +HH,22077498,22134303,21659639,21894095,22854626,22821510,23221112,23585391,23903307,24185899,24470699,24744460,25022636,25303020,25585612,25872620,26161835,26455466,26751304,27049351,27354020,27658689,27969982,28281275,28599191 +SS_return,27401498,28087514,28329015,28967603,31684352,32736570,33818929,34953351,36139836,37386604,38614191,39891101,41154310,42384637,43664287,44875433,46007115,47097695,48141692,49089784,49843325,50509181,51128455,51758690,52484829 +Dep_return,96916673,96505181,94809260,94708629,99911398,100735190,101549290,102373082,103187182,104001282,104805690,105610099,106414507,107209224,107984557,108759890,109525532,110281482,111018049,111744924,112452416,113150216,113828632,114487666,115137008 +INTS,156367939,95881223,96640233,106055367,124828526,125813644,138072890,143545768,146829495,146407301,147423693,155851925,184373437,175945205,192488933,201542637,213364053,231127451,248155919,263292336,278288021,293580805,307075359,322555785,337786022 +DIVS,254702232,260252720,254065327,282336042,340613295,332513764,369521998,401130545,421201081,463481652,494147800,519032208,531334326,636933872,674222278,713370011,743246583,770678014,802108269,834455452,867413921,901111027,935674119,971281492,1007958613 +SCHCI,374659000,391975736,389078638,416010104,435503622,432281554,462216808,485895257,491852335,503691560,536549154,552846820,573190804,618974134,645574923,673749280,699638217,724328245,748681080,773333642,799260045,827322004,858493633,891650954,925407730 +SCHCL,57400238,60161435,60996610,69637956,63668344,64552308,73696166,77467361,78425945,80308673,85549315,88149545,91386919,98688229,102930107,107418805,111551623,115489279,119369535,123301451,127434268,131911487,136882348,142163169,147541572 +CGNS,705007630,713598090,634341278,859894631,1249696525,1110880523,1505896298,1631599158,1522675479,1983609468,3582355270,2216825992,1630541647,2364595591,2497983035,2427270769,2360929551,2361775560,2406896049,2473660271,2553960640,2645259129,2742550181,2844000779,2950104428 +Pension,663223262,689991999,693626543,729187412,776568117,800178866,846471849,889515039,925594384,996293984,1069779122,1093456192,1161502899,1239696921,1300647139,1361928969,1422348608,1487543454,1553932103,1620785008,1687770557,1757210033,1828705500,1903251795,1981578462 +SCHEI,846331543,891134646,882933054,973306129,1140431754,1129937243,1245546132,1348629314,1385360103,1322308403,1621317337,1711451646,1505793081,2221112501,2278747680,2301090832,2309384881,2305407123,2319879393,2380222832,2482459682,2598068571,2711053832,2821923264,2937108987 +SCHEL,166947674,177896945,176446339,206369393,169401805,168032834,196514107,212774811,218567895,208634508,255797226,270021168,237566540,350423168,359521816,363044412,364363299,363728897,366016080,375532098,391675938,409906624,427736636,445216057,463396659 +SS,575126918,605152093,619856114,644989570,709246515,726500323,755946821,795975655,848657280,898463271,939067232,1016191751,1138003633,1234222366,1313187292,1389794197,1469219225,1554568059,1642447452,1732167252,1823152330,1915172637,2008055634,2105424621,2207567162 +UCOMP,33288898,27225383,25420264,23946035,9810238,9161105,8628482,7962704,7490002,7746327,66767543,10193061,7633144,8711705,11041927,12180408,12736332,13235666,13651777,14094519,14567222,15036595,15482666,15925409,16398111 +wage1,114320683,112017897,111270085,107376379,132211870,134189618,140763057,147839507,154870229,157088051,170920853,185370987,194653827,206234512,216317596,226274928,235820705,245778036,255872553,266024229,276415979,287104963,298011156,309351768,321081070 +wage2,261995646,261659142,253415638,247511878,302997965,307530489,322595239,338812769,354925502,360008217,391709690,424825940,446099986,472640145,495748161,518567982,540444619,563264439,586398655,609663868,633479272,657975865,682970250,708960218,735840971 +wage3,381259619,383184602,382875414,382789227,440926749,447522541,469444969,493044939,516492406,523888842,570021256,618212472,649170753,687792353,721419451,754627164,786462342,819670055,853335279,887191133,921847633,957495407,993867575,1031688529,1070805766 +wage4,418567676,428313928,436140082,441282302,484073517,491314738,515382379,541291719,567033631,575153844,625800532,678707487,712695182,755096088,792013757,828471001,863421402,899878647,936838172,974006982,1012054784,1051190862,1091122218,1132644131,1175589175 +wage5,418379915,424369612,426147995,437485582,483856372,491094344,515151189,541048906,566779271,574895841,625519811,678403032,712375481,754757367,791658475,828099366,863034089,899474979,936417926,973570062,1011600796,1050719319,1090632762,1132136050,1175061829 +wage6,916618937,952347137,962308451,1000500360,1060069801,1075927308,1128632897,1185371609,1241743674,1259526081,1370436973,1486297606,1560727064,1653580562,1734426353,1814263862,1890801543,1970639053,2051576505,2132972266,2216292928,2301996798,2389442245,2480370844,2574415946 +wage7,840581301,835434509,852517230,870406373,972132275,986674331,1035007756,1087039738,1138735488,1155042766,1256753103,1363002580,1431257781,1516408667,1590547938,1663762569,1733951108,1807165739,1881389068,1956032687,2032441528,2111035879,2191227335,2274613001,2360856642 +wage8,3433224075,3714896131,3792750634,4090211841,3970523643,4029918419,4227328804,4439845374,4650988654,4717593201,5133013315,5566972838,5845750633,6193536231,6496346595,6795380412,7082054622,7381088439,7684242125,7989112423,8301192491,8622198942,8949728519,9290304347,9642553137 diff --git a/cps_stage2/cps_weights.csv.gz b/cps_stage2/cps_weights.csv.gz index 076959eb..6e166ce5 100644 Binary files a/cps_stage2/cps_weights.csv.gz and b/cps_stage2/cps_weights.csv.gz differ diff --git a/cps_stage2/solver.jl b/cps_stage2/solver.jl index 3c1ade9b..3e96d0f0 100644 --- a/cps_stage2/solver.jl +++ b/cps_stage2/solver.jl @@ -80,7 +80,7 @@ function Solve_func(year, tol) end -year_list = [x for x in 2014:2034] +year_list = [x for x in 2014:2035] tol = 0.70 # Run solver function for all years and tolerances (in order) diff --git a/cps_stage2/stage2.py b/cps_stage2/stage2.py index 562a8849..21c6c106 100644 --- a/cps_stage2/stage2.py +++ b/cps_stage2/stage2.py @@ -11,7 +11,7 @@ STAGE_1_PATH = Path(CUR_PATH, "..", "puf_stage1", "Stage_I_factors.csv") STAGE_2_PATH = Path(CUR_PATH, "..", "cps_stage1", "stage_2_targets.csv") START_YEAR = 2014 -END_YEAR = 2034 +END_YEAR = 2035 # Read hashes used to see which years can be skipped with open(Path(CUR_PATH, "..", "datahashes.json")) as f: diff --git a/docs/book/content/methods/CBO_Baseline_Updating_Instructions.md b/docs/book/content/methods/CBO_Baseline_Updating_Instructions.md index 5d5c37cf..f2ecb2bb 100644 --- a/docs/book/content/methods/CBO_Baseline_Updating_Instructions.md +++ b/docs/book/content/methods/CBO_Baseline_Updating_Instructions.md @@ -47,9 +47,9 @@ As previously mentioned, most of the variables we used can be found in the To manually update these variables download the latest file and copy/paste the specific variables. -Previous Document: February 2024 +Previous Document: February 2023 -Current Document: June 2024 +Current Document: January 2025 | Variable | Name In CBO Document | |----------|-----------------------------------------------------| @@ -70,9 +70,9 @@ Current Document: June 2024 Source: [Revenue Projections, By Category (CBO)](https://www.cbo.gov/about/products/budget-economic-data#7) -Previous: [June 2024](https://www.cbo.gov/system/files/2024-06/51138-2024-06-Revenue.xlsx) +Previous: [January 2025](https://www.cbo.gov/system/files/2025-01/51138-2025-01-Revenue-Projections.xlsx) -Current: [June 2024](https://www.cbo.gov/system/files/2024-06/51138-2024-06-Revenue.xlsx) +Current: [January 2025](https://www.cbo.gov/system/files/2025-01/51138-2025-01-Revenue-Projections.xlsx) In the revenue projections file, the data is in the `Capital Gains Realizations` tab under the `Capital Gains Realizations` column. @@ -83,7 +83,7 @@ Source: [IRS Publication 6187 Table 1B](https://www.irs.gov/statistics/projectio Previous: [Fall 2022 Report](https://www.irs.gov/pub/irs-soi/22projpub6187tables.xlsx) -Current: [Fall 2023 Report](https://www.irs.gov/pub/irs-soi/23projpub6187tables.xlsx) +Current: [Publication 6187 Report](https://www.irs.gov/pub/irs-soi/24projpub6187tables.xlsx) The projections in the publication typically end a few years before the 10-year projections do. We use the growth rate from the final year in the @@ -98,7 +98,7 @@ Table VI.C4. Operations of the OASI Trust Fund, Table VI.C4, Column: Previous: [2023 Report](https://www.ssa.gov/oact/TR/2023/VI_C_SRfyproj.html) -Current: [2023 Report](https://www.ssa.gov/oact/TR/2023/VI_C_SRfyproj.html) +Current: [2024 Report](https://www.ssa.gov/oact/TR/2024/VI_C_SRfyproj.html) Projections are taken directly from the `Scheduled Benefits: Intermediate Level` column of this table. @@ -108,7 +108,7 @@ column of this table. Source: [BLS Database](http://data.bls.gov/timeseries/CUSR0000SAM?output_view=pct_1mth) Series ID: CUSR0000SAM -Access Date: November 04 2024 +Access Date: Manual Instructions: @@ -124,9 +124,9 @@ Manual Instructions: Source: [CBO Unemployment Compensation projections](https://www.cbo.gov/about/products/baseline-projections-selected-programs#24) -Previous: [February 2024](https://www.cbo.gov/system/files/2024-02/51316-2024-02-unemployment.xlsx) +Previous: [January 2025](https://www.cbo.gov/system/files/2025-01/51316-2025-01-unemployment.xlsx) -Current: [June 2024](https://www.cbo.gov/system/files/2024-06/51316-2024-06-unemployment.xlsx) +Current: [January 2025](https://www.cbo.gov/system/files/2025-01/51316-2025-01-unemployment.xlsx) Note: Change the `Total Benefits` number from the table to be in terms of billions rather than millions of dollars diff --git a/history/report_utils.py b/history/report_utils.py index e23cec3b..6e7f3ad5 100644 --- a/history/report_utils.py +++ b/history/report_utils.py @@ -626,10 +626,10 @@ def CBO_projections(rev_proj): "Calculation of adjusted gross income (AGI)" ].loc["Taxable pensions and annuities and IRA distributions"] ssb = rev_proj.loc["Calculation of adjusted gross income (AGI)"].loc[ - "Taxable Social Security benefits " + "Taxable Social Security benefitsc " ] other_inc = rev_proj.loc["Calculation of adjusted gross income (AGI)"].loc[ - "All other sources of incomec" + "All other sources of incomed" ] total_inc = rev_proj.loc["Calculation of adjusted gross income (AGI)"].loc[ "Total income" @@ -649,40 +649,40 @@ def CBO_projections(rev_proj): "Subtract standard deduction (non-itemizers only)" ] sub_tot_item = rev_proj.loc["Calculation of taxable income"].loc[ - "Subtract total itemized deductions (itemizers only) after limitsd" + "Subtract total itemized deductions (itemizers only) after limitse" ] sub_qbid = rev_proj.loc["Calculation of taxable income"].loc[ "Subtract qualified business income deduction" ] sub_tot_expt = rev_proj.loc["Calculation of taxable income"].loc[ - "Total exemptions and deductions after limitse" + "Total exemptions and deductions after limitsf" ] taxable_inc = ( - rev_proj.loc["Calculation of taxable income"].loc["Taxable incomef"].iloc[0] + rev_proj.loc["Calculation of taxable income"].loc["Taxable incomeg"].iloc[0] ) tot_inctax = rev_proj.loc["Calculation of income tax liability"].loc[ "Total income tax (including AMT) before credits" ] tot_cdt = rev_proj.loc["Calculation of income tax liability"].loc[ - "Total credits (refundable and nonrefundable)i" + "Total credits (refundable and nonrefundable) j" ] inctax_af_credit = rev_proj.loc["Calculation of income tax liability"].loc[ - "Income tax after creditsj" + "Income tax after creditsk" ] - Top1p = rev_proj.loc["Shares of AGI by income group (percent)o"].loc[ + Top1p = rev_proj.loc["Shares of AGI by income group (percent)p"].loc[ "Top 1 percent" ] - Top5p = rev_proj.loc["Shares of AGI by income group (percent)o"].loc[ + Top5p = rev_proj.loc["Shares of AGI by income group (percent)p"].loc[ "Top 5 percent" ] - Top10p = rev_proj.loc["Shares of AGI by income group (percent)o"].loc[ + Top10p = rev_proj.loc["Shares of AGI by income group (percent)p"].loc[ "Top 10 percent" ] - Top25p = rev_proj.loc["Shares of AGI by income group (percent)o"].loc[ + Top25p = rev_proj.loc["Shares of AGI by income group (percent)p"].loc[ "Top 25 percent" ] Top50p = ( - rev_proj.loc["Shares of AGI by income group (percent)o"] + rev_proj.loc["Shares of AGI by income group (percent)p"] .loc["Top 50 percent"] .iloc[0] ) diff --git a/history/reports/taxdata_report_2025-02-12.pdf b/history/reports/taxdata_report_2025-02-12.pdf new file mode 100644 index 00000000..45b9c245 Binary files /dev/null and b/history/reports/taxdata_report_2025-02-12.pdf differ diff --git a/puf_stage1/CBO_baseline.csv b/puf_stage1/CBO_baseline.csv index e0f0a813..24ca41ad 100644 --- a/puf_stage1/CBO_baseline.csv +++ b/puf_stage1/CBO_baseline.csv @@ -1,16 +1,16 @@ -,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021,2022,2023,2024,2025,2026,2027,2028,2029,2030,2031,2032,2033,2034 -GDP,14718.6,14418.7,14964.4,15517.9,16163.2,16800.0,17348.1,18036.7,18624.5,19479.6,20527.2,21372.6,21060.5,23594.1,25744.1,27360.9,28792.1,30009.4,31131.7,32252.3,33413.8,34666.9,35990.0,37367.4,38791.9,40262.4,41783.2 -TPY,12429.6,12087.5,12429.3,13202.0,13887.7,14166.9,14694.2,15458.5,15928.7,16850.2,17706.0,18424.4,19832.3,21407.7,21840.8,22978.4,24463.4,25921.3,27113.7,28228.4,29420.5,30665.6,31968.6,33317.5,34725.8,36176.8,37714.3 -Wages,6531.9,6251.4,6377.5,6633.2,6932.1,7124.7,7477.8,7854.8,8085.3,8474.7,8900.5,9323.5,9457.4,10312.6,11116.0,11816.3,12478.4,13049.0,13589.3,14119.1,14664.4,15233.4,15817.1,16415.2,17027.1,17655.1,18305.9 -SCHC,979.5,937.5,986.7,1068.1,1187.9,1253.5,1268.5,1336.8,1298.7,1466.4,1541.5,1560.5,1598.0,1676.9,1709.2,1794.1,1888.0,1963.6,2053.4,2138.1,2217.1,2297.2,2379.8,2466.4,2558.7,2659.1,2762.7 -SCHF,47.0,35.5,46.0,75.5,72.3,83.2,78.1,40.0,43.2,39.5,38.9,38.4,45.2,72.3,81.8,54.3,38.7,41.8,44.0,45.9,47.7,49.4,50.9,52.3,53.6,54.7,55.8 -INTS,1361.6,1264.3,1195.0,1231.6,1255.9,1255.2,1302.0,1302.8,1415.3,1553.4,1615.0,1652.0,1647.3,1515.5,1627.5,1772.8,2096.6,2460.1,2661.4,2765.8,2909.2,3048.8,3215.4,3397.9,3588.3,3763.1,3963.3 -DIVS,805.4,553.7,544.6,682.2,832.7,824.5,815.5,951.1,962.5,1154.5,1253.3,1316.0,1448.1,1699.2,1804.6,1840.6,1922.5,2018.8,2095.0,2155.7,2223.5,2309.7,2400.4,2493.6,2589.3,2687.6,2789.0 -RENTS,262.1,333.7,402.8,485.3,533.0,595.8,610.8,659.6,707.4,652.7,681.9,692.1,719.9,814.2,878.3,967.4,1033.3,1051.3,1079.0,1106.6,1136.7,1169.4,1199.5,1228.9,1261.8,1300.0,1343.8 -CGNS,498.0,263.0,394.0,404.0,647.0,511.0,716.0,725.0,641.0,871.3,944.0,881.0,1147.7,2072.7,1249.1,1359.2,1430.4,1386.3,1331.0,1315.8,1325.9,1353.7,1392.4,1438.0,1488.3,1542.0,1598.7 -BOOK,1285.1,1397.0,1746.4,1816.6,2022.8,2106.9,2072.9,2088.1,2073.5,2128.9,2305.0,2367.8,2260.1,2922.7,3208.7,3258.0,3426.7,3545.9,3597.8,3666.7,3715.3,3791.5,3906.8,4038.3,4183.3,4330.2,4481.9 -RETS,142.5,140.5,142.9,145.4,144.9,146.6,148.3,147.8,149.7,149.9,152.5,153.5,160.1,164.4,163.2,165.2,167.1,168.7,170.3,171.9,173.6,175.3,177.0,178.6,180.4,182.1,183.8 -SOCSEC,503.0,544.5,572.5,591.5,627.2,663.2,698.2,733.7,762.1,791.1,833.0,888.1,940.2,982.7,1063.4,1190.9,1291.4,1372.6,1454.4,1538.5,1627.6,1719.7,1813.9,1909.2,2005.2,2106.0,2211.9 -CPIU,215.3,214.5,218.1,224.9,229.6,233.0,236.7,237.0,240.0,245.1,251.1,255.6,258.8,271.0,292.6,304.7,314.4,322.1,329.3,336.4,343.7,351.2,359.1,367.1,375.3,383.7,392.4 -CPIM,364.1,375.6,388.4,400.3,414.9,425.1,435.3,446.8,463.7,475.3,484.7,498.4,518.9,525.3,546.5,549.1,562.1,535.8,543.0,550.1,557.4,564.9,572.8,580.8,589.0,597.4,606.1 -UCOMP,51.1,131.2,138.9,107.2,83.6,62.2,43.8,39.9,31.2,31.1,28.7,27.0,27.925,240.656,36.743,27.511,34.6,37.8,41.3,44.9,47.9,50.2,52.1,53.9,55.6,57.2,58.9 +,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021,2022,2023,2024,2025,2026,2027,2028,2029,2030,2031,2032,2033,2034,2035 +GDP,14718.6,14418.7,14964.4,15517.9,16163.2,16800.0,17348.1,18036.7,18624.5,19479.6,20527.2,21372.6,21060.5,23315.1,25419.5,26438.4,29166.2,30441.1,31640.6,32841.0,34078.4,35378.4,36738.8,38151.3,39626.7,41154.2,42727.6,44345.4 +TPY,12429.6,12087.5,12429.3,13202.0,13887.7,14166.9,14694.2,15458.5,15928.7,16850.2,17706.0,18424.4,19832.3,21294.8,21766.7,23120.9,24676.7,25890.0,27110.3,28313.3,29611.2,30932.5,32263.0,33596.3,34978.9,36402.2,37885.7,39444.9 +Wages,6531.9,6251.4,6377.5,6633.2,6932.1,7124.7,7477.8,7854.8,8085.3,8474.7,8900.5,9323.5,9457.4,10290.1,11160.2,11719.0,12416.2,13022.9,13622.7,14197.0,14796.4,15404.3,16015.7,16641.4,17284.4,17941.1,18623.9,19330.3 +SCHC,979.5,937.5,986.7,1068.1,1187.9,1253.5,1268.5,1336.8,1298.7,1466.4,1541.5,1560.5,1598.0,1702.3,1754.0,1818.5,1963.7,2048.2,2137.5,2219.7,2298.0,2375.3,2453.5,2535.7,2624.8,2723.7,2828.8,2935.9 +SCHF,47.0,35.5,46.0,75.5,72.3,83.2,78.1,40.0,43.2,39.5,38.9,38.4,45.2,51.3,90.1,93.8,40.1,42.2,45.5,48.2,50.6,52.8,54.9,56.8,58.5,60.0,61.5,62.8 +INTS,1361.6,1264.3,1195.0,1231.6,1255.9,1255.2,1302.0,1302.8,1415.3,1553.4,1615.0,1652.0,1647.3,1658.6,1753.4,2074.3,1979.6,2165.6,2267.6,2400.5,2600.4,2792.0,2962.3,3131.0,3303.0,3454.8,3629.0,3800.4 +DIVS,805.4,553.7,544.6,682.2,832.7,824.5,815.5,951.1,962.5,1154.5,1253.3,1316.0,1448.1,1543.9,1621.6,1660.1,1990.0,2106.5,2228.8,2322.2,2407.9,2506.1,2607.1,2710.1,2815.4,2923.4,3034.6,3149.2 +RENTS,262.1,333.7,402.8,485.3,533.0,595.8,610.8,659.6,707.4,652.7,681.9,692.1,719.9,723.8,783.4,840.8,1052.8,1075.9,1115.5,1150.9,1178.9,1208.7,1239.6,1236.6,1240.7,1258.5,1288.0,1329.7 +CGNS,498.0,263.0,394.0,404.0,647.0,511.0,716.0,725.0,641.0,871.3,944.0,881.0,1147.7,2072.7,1282.6,943.4,1368.1,1445.3,1404.4,1366.0,1366.5,1392.6,1431.2,1477.7,1530.5,1586.8,1645.5,1706.9 +BOOK,1285.1,1397.0,1746.4,1816.6,2022.8,2106.9,2072.9,2088.1,2073.5,2128.9,2305.0,2367.8,2260.1,2771.1,2925.1,2573.6,3796.2,3894.7,3932.9,3947.1,3940.3,3965.0,4068.2,4243.0,4440.6,4633.6,4823.1,5020.0 +RETS,142.5,140.5,142.9,145.4,144.9,146.6,148.3,147.8,149.7,149.9,152.5,153.5,160.1,164.4,170.7,159.0,160.8,162.1,163.5,164.8,166.1,167.5,168.8,170.2,171.6,173.0,174.4,175.8 +SOCSEC,503.0,544.5,572.5,591.5,627.2,663.2,698.2,733.7,762.1,791.1,833.0,888.1,940.2,982.7,1063.4,1190.9,1291.6,1374.2,1454.4,1537.5,1626.8,1718.8,1812.7,1907.9,2004.2,2101.4,2203.3,2310.2 +CPIU,215.3,214.5,218.1,224.9,229.6,233.0,236.7,237.0,240.0,245.1,251.1,255.6,258.8,271.0,292.9,306.9,313.6,320.6,328.4,336.0,343.6,351.3,359.2,367.2,375.5,383.9,392.5,401.3 +CPIM,364.1,375.6,388.4,400.3,414.9,425.1,435.3,446.8,463.7,475.3,484.7,498.4,518.9,525.3,546.5,549.1,563.8,534.3,542.1,549.7,557.3,565.0,572.9,580.9,589.2,597.6,606.2,615.0 +UCOMP,51.1,131.2,138.9,107.2,83.6,62.2,43.8,39.9,31.2,31.1,28.7,27.0,27.925,240.656,36.743,27.511,31.4,39.8,43.9,45.9,47.7,49.2,50.8,52.5,54.2,55.8,57.4,59.1 diff --git a/puf_stage1/Stage_II_targets.csv b/puf_stage1/Stage_II_targets.csv index f0a71a79..ecce4cea 100644 --- a/puf_stage1/Stage_II_targets.csv +++ b/puf_stage1/Stage_II_targets.csv @@ -1,31 +1,31 @@ -,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021,2022,2023,2024,2025,2026,2027,2028,2029,2030,2031,2032,2033,2034 -US Population,311721632,314112078,316497531,318857056,321368864,323995528,326625791,329256465,331883986,334503458,337108968,339698079,342267302,344814299,347334912,349825585,352281475,354698370,357072830,359402194,361684740,363919527,366106294,368245560 -POP_DEP,82840576,82503131,82296428,82135602,82109509,82178228,82284937,82410728,82547300,82624346,82772040,83023463,83259014,83463249,83673850,83868421,84024180,84193698,84484144,84767392,85040759,85334627,85631465,85903535 -POP_SNR,41366628,43164909,44723041,46243211,47830245,49420383,51055052,52766466,54556914,56441027,58292098,60221375,62126945,63987872,65919552,67748101,69455598,71098995,72675827,74107408,75245391,76250731,77185290,78138264 -Single Returns,67294506,66655855,68563354,69579590,71086947,71410690,73021932,74164397,75166909,76052548,76951274,77812834,78684040,79565000,80455824,81356621,82267505,83188586,84119980,85061802,86014169,86977199,87951011,88935726 -Joint Returns,56013790,56458434,56796607,55128595,57272012,57201828,57987204,58894443,59690545,60393837,61107520,61791691,62483522,63183098,63890507,64605837,65329175,66060612,66800238,67548145,68304426,69069175,69842485,70624454 -Head of Household Returns,22061944,21814184,21991339,22077498,22134303,21659639,21894095,22236639,22537222,22802762,23072226,23330546,23591759,23855897,24122992,24393077,24666186,24942353,25221612,25503998,25789545,26078289,26370266,26665512 -Number of Returns w/ Gross Security Income,25837226,26480552,27070833,27401498,28087514,28329015,28967603,29938625,30954489,32023496,33073756,34168389,35249571,36305423,37401419,38438901,39407700,40340131,41234793,42047043,42692712,43263121,43793371,44334069 -Number of Dependent Exemptions,99345455,97912393,97691386,96916673,96505181,94809260,94708629,94853412,95010605,95099283,95269277,95558660,95829776,96064847,96307245,96531193,96710470,96905582,97239881,97565894,97880535,98218773,98560428,98873577 -Taxable Interest Income,120111673,111789613,100648711,93894280,95881223,96640233,106055367,110260987,112787090,112466207,103467818,111114401,121034476,143141292,167958548,181701914,188829622,198619978,208150897,219525188,231985021,244984211,256918341,270586607 -Ordinary Dividends,194609806,260393306,214972683,254702232,260252720,254065327,282336042,306497844,321831296,354136702,415543874,441319724,450123620,470152482,493702903,512337815,527182162,543762832,564843271,587024197,609816504,633220194,657259720,682057359 -Business Income (Schedule C),337210620,356450905,357363490,374659000,391975736,389078638,416010104,437315586,442705788,453344344,475727866,484891210,508976901,535615846,557063175,582538971,606567924,628979816,651703772,675136965,699704938,725889971,754372932,783763717 -Business Loss (Schedule C),54240803,52259366,55290946,57400238,60161435,60996610,69637956,73204384,74106676,75887516,79634403,81168300,85200121,89659343,93249516,97514034,101536357,105287993,109091866,113014462,117127015,121510255,126278157,131198023 -Net Capital Gains in AGI,402566646,644856734,504322768,705007630,713598090,634341278,859894631,931642984,869467657,1132676539,2045568233,1232749206,1341407991,1411675979,1368153250,1313577131,1298576099,1308543890,1335979986,1374173401,1419176494,1468818064,1521815128,1577772922 -Taxable Pensions and Annuities,581180358,612544219,638659076,663223262,689991999,693626543,729187412,766221903,797310451,858236906,926411874,945154148,994383451,1058646386,1121736577,1173337333,1221575645,1273163420,1327044753,1383431692,1441804940,1502748705,1565540300,1632075157 -Supplemental Income (Schedule E),661331485,777023944,780713118,846331543,891134646,882933054,973306129,1053816820,1082528185,1033289108,1336221440,1466977019,1489516355,1566643859,1621140590,1644868613,1676368821,1698588126,1733425801,1786139502,1846259637,1912551801,1979712621,2049067941 -Supplemental Loss (Schedule E),175315530,163765597,167171652,166947674,177896945,176446339,206369393,223440016,229527666,219087541,283318063,311042074,315821073,332174362,343729264,348760300,355439266,360150409,367537016,378713864,391461092,405516972,419757032,434462390 -Gross Social Security Income,490699539,526514454,553542772,575126918,605152093,619856114,644989570,679150944,724074374,766551882,801202440,866997736,970949411,1052887790,1119090739,1185782873,1254350213,1326994089,1402083888,1478885831,1556584613,1634854109,1717037081,1803378119 -Unemployment Compensation,92383693,71234134,51923279,33288898,27225383,25420264,23946035,22098109,20789162,21501384,185297653,28290970,21182616,26640926,29104827,31799719,34571607,36881514,38652442,40115383,41501328,42810275,44042225,45351172 -Wages and Salaries: Zero or Less,21437416,20445434,20280688,19421543,20111022,20544631,20869123,21917664,22959310,23289042,25394990,27373379,29097882,30728317,32133431,33463931,34768574,36111387,37512561,38949934,40422768,41929584,43476047,45078655 -"Wages and Salaries: $1 Less Than $10,000",92961755,93108807,94466204,94899140,91906875,90725454,86507256,90853698,95171558,96538370,105268001,113468873,120617330,127375853,133200371,138715595,144123638,149689901,155498086,161456325,167561555,173807651,180218091,186861267 -"Wages and Salaries: $10,000 Less Than $20,000",265080549,262184682,266041138,261995646,261659142,253415638,247511878,259947782,272301910,276212590,301189540,324653620,345106565,364443841,381108770,396888759,412362084,428288103,444906303,461953830,479421924,497293060,515634413,534641661 -"Wages and Salaries: $20,000 Less Than $30,000",373549061,371577702,380567075,381259619,383184602,382875414,382789227,402021961,421128224,427176282,465804357,502092705,533724184,563630228,589403356,613807880,637738135,662368502,688069361,714434196,741449458,769088044,797453843,826849483 -"Wages and Salaries: $30,000 Less Than $40,000",410623212,408353008,408654349,418567676,428313928,436140082,441282302,463453943,485479786,492452033,536982768,578816249,615281257,649757169,679468625,707602344,735189322,763583394,793211538,823605119,854748515,886610486,919310792,953198307 -"Wages and Salaries: $40,000 Less Than $50,000",391671646,391349650,410049846,418379915,424369612,426147995,437485582,459466462,481302798,488215057,532362657,573836210,609987478,644166765,673622590,701514251,728863875,757013649,786386877,816518956,847394400,878982236,911401194,944997146 -"Wages and Salaries: $50,000 Less Than $75,000",900170384,902783183,915963625,916618937,952347137,962308451,1000500360,1050769166,1100707412,1116515287,1217477906,1312325156,1395000697,1473166447,1540529954,1604316323,1666863090,1731239746,1798414361,1867324418,1937934500,2010173774,2084313770,2161145473 -"Wages and Salaries: $75,000 Less Than $100,000",791646425,798324358,822009437,840581301,835434509,852517230,870406373,914138780,957583610,971336004,1059170562,1141684926,1213610255,1281612197,1340216499,1395708795,1450122673,1506128502,1564568474,1624518230,1685946959,1748793037,1813292690,1880134049 -"Wages and Salaries: $100,000 Less Than $200,000",1521442934,1599743841,1665691829,1759304940,1876094165,1922367424,2015029480,2116271949,2216848662,2248686066,2452026976,2643051400,2809561736,2966989258,3102660824,3231127959,3357098509,3486754494,3622045628,3760831981,3903042222,4048533690,4197853254,4352593975 -"Wages and Salaries: $200,000 Less Than $500,000",750627685,806518068,872227137,955295796,1055689937,1106449651,1206754121,1267385873,1327618918,1346685596,1468461721,1582861790,1682580943,1776860611,1858111146,1935047114,2010487936,2088135879,2169158581,2252274488,2337440883,2424572326,2513996328,2606666934 -"Wages and Salaries: $500,000 Less Than $1 Million",230634407,259165177,272996984,310372311,337666673,343994542,379375686,398436911,417372793,423366917,461650524,497615270,528964673,558604028,584147324,608334219,632051075,656461799,681933470,708063196,734837547,762229665,790342511,819476013 -Wages and Salaries: $1 Million and Over,305543960,387803684,346432571,408251028,336316005,310089733,367731740,386207931,404562625,410372775,447481367,482342268,512729484,541459137,566218447,589662989,612651918,636313419,661003303,686331045,712283628,738835016,766085011,794324337 +,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021,2022,2023,2024,2025,2026,2027,2028,2029,2030,2031,2032,2033,2034,2035 +US Population,311721632,314112078,316497531,318857056,321368864,323995528,326625791,329256465,331883986,334503458,337108968,339698079,342267302,344814299,347334912,349825585,352281475,354698370,357072830,359402194,361684740,363919527,366106294,368245560,370338137 +POP_DEP,82840576,82503131,82296428,82135602,82109509,82178228,82284937,82410728,82547300,82624346,82772040,83023463,83259014,83463249,83673850,83868421,84024180,84193698,84484144,84767392,85040759,85334627,85631465,85903535,86153476 +POP_SNR,41366628,43164909,44723041,46243211,47830245,49420383,51055052,52766466,54556914,56441027,58292098,60221375,62126945,63987872,65919552,67748101,69455598,71098995,72675827,74107408,75245391,76250731,77185290,78138264,79232881 +Single Returns,67294506,66655855,68563354,69579590,71086947,71410690,73021932,74164397,75166909,76052548,76951274,77812834,78684040,79565000,80455824,81356621,82267505,83188586,84119980,85061802,86014169,86977199,87951011,88935726,89931466 +Joint Returns,56013790,56458434,56796607,55128595,57272012,57201828,57987204,58894443,59690545,60393837,61107520,61791691,62483522,63183098,63890507,64605837,65329175,66060612,66800238,67548145,68304426,69069175,69842485,70624454,71415178 +Head of Household Returns,22061944,21814184,21991339,22077498,22134303,21659639,21894095,22236639,22537222,22802762,23072226,23330546,23591759,23855897,24122992,24393077,24666186,24942353,25221612,25503998,25789545,26078289,26370266,26665512,26964064 +Number of Returns w/ Gross Security Income,25837226,26480552,27070833,27401498,28087514,28329015,28967603,29938625,30954489,32023496,33073756,34168389,35249571,36305423,37401419,38438901,39407700,40340131,41234793,42047043,42692712,43263121,43793371,44334069,44955133 +Number of Dependent Exemptions,99345455,97912393,97691386,96916673,96505181,94809260,94708629,94853412,95010605,95099283,95269277,95558660,95829776,96064847,96307245,96531193,96710470,96905582,97239881,97565894,97880535,98218773,98560428,98873577,99161255 +Taxable Interest Income,120111673,111789613,100648711,93894280,95881223,96640233,106055367,110260987,112787090,112466207,113237693,119709978,141618802,135153344,147852133,154815984,163889474,177537258,190618376,202245277,213762942,225505908,235869758,247762924,259464926 +Ordinary Dividends,194609806,260393306,214972683,254702232,260252720,254065327,282336042,306497844,321831296,354136702,377564846,396566588,405981865,486659787,515150171,545058961,567900179,588858342,612873413,637573231,662762155,688513549,714925236,742119492,770145226 +Business Income (Schedule C),337210620,356450905,357363490,374659000,391975736,389078638,416010104,437315586,442705788,453344344,482933715,497600738,515899055,557091545,581063758,606397707,629717422,651930728,673860338,696045274,719364990,744642199,772699618,802515945,832899662 +Business Loss (Schedule C),54240803,52259366,55290946,57400238,60161435,60996610,69637956,73204384,74106676,75887516,80840625,83295809,86358854,93254265,97267090,101507863,105411464,109129857,112800762,116514406,120418007,124649282,129345950,134337050,139423128 +Net Capital Gains in AGI,402566646,644856734,504322768,705007630,713598090,634341278,859894631,931642984,869467657,1132676539,2045568233,1265810689,931050838,1350191489,1426380937,1386016320,1348118978,1348612433,1374370783,1412465507,1458356819,1510465664,1566028693,1623960307,1684556577 +Taxable Pensions and Annuities,581180358,612544219,638659076,663223262,689991999,693626543,729187412,766221903,797310451,858236906,921526160,941947493,1000550096,1067876880,1120382078,1173190199,1225249668,1281415906,1338594772,1396171765,1453869927,1513701533,1575294418,1639492441,1706966359 +Supplemental Income (Schedule E),661331485,777023944,780713118,846331543,891134646,882933054,973306129,1053816820,1082528185,1033289108,1266911839,1337318689,1176617339,1735574582,1780607535,1798072091,1804564151,1801455277,1812747805,1859929538,1939845885,2030186104,2118423261,2205060262,2295080449 +Supplemental Loss (Schedule E),175315530,163765597,167171652,166947674,177896945,176446339,206369393,223440016,229527666,219087541,268622399,283550712,249477322,367992620,377540925,381243922,382620429,381961257,384355603,394359512,411304117,430458888,449167748,467537329,486624244 +Gross Social Security Income,490699539,526514454,553542772,575126918,605152093,619856114,644989570,679150944,724074374,766551882,801202440,866997736,970949411,1053050851,1120395231,1185782873,1253534906,1326341844,1401350111,1477907462,1555524713,1634038802,1713286667,1796366477,1883522822 +Unemployment Compensation,92383693,71234134,51923279,33288898,27225383,25420264,23946035,22098109,20789162,21501384,185297653,28290970,21182616,24177026,30644765,33801638,35341576,36727520,37882473,39114424,40423371,41732318,42964269,44196219,45505166 +Wages and Salaries: Zero or Less,21437416,20445434,20280688,19421543,20111022,20544631,20869123,21917664,22959310,23289042,25339583,27482222,28858278,30575148,32069159,33546179,34960404,36436439,37933405,39438991,40979790,42563190,44180328,45861737,47601261 +"Wages and Salaries: $1 Less Than $10,000",92961755,93108807,94466204,94899140,91906875,90725454,86507256,90853698,95171558,96538370,105038328,113920054,119624120,126740934,132933950,139056533,144918819,151037318,157242584,163483576,169870538,176434094,183137495,190107318,197318042 +"Wages and Salaries: $10,000 Less Than $20,000",265080549,262184682,266041138,261995646,261659142,253415638,247511878,259947782,272301910,276212590,300532405,325944524,342264823,362627229,380346494,397864238,414637230,432143291,449897604,467754137,486028316,504807758,523987322,543929161,564560262 +"Wages and Salaries: $20,000 Less Than $30,000",373549061,371577702,380567075,381259619,383184602,382875414,382789227,402021961,421128224,427176282,464788066,504089151,529329292,560820749,588224459,615316507,641256759,668330740,695788652,723404654,751666565,780709891,810372025,841213056,873120063 +"Wages and Salaries: $30,000 Less Than $40,000",410623212,408353008,408654349,418567676,428313928,436140082,441282302,463453943,485479786,492452033,535811181,581117768,610214792,646518380,678109584,709341501,739245618,770456707,802110395,833946330,866526874,900008239,934202970,969756742,1006539380 +"Wages and Salaries: $40,000 Less Than $50,000",391671646,391349650,410049846,418379915,424369612,426147995,437485582,459466462,481302798,488215057,531201150,576117927,604964605,640955843,672275241,703238444,732885271,763827825,795209170,826771194,859071420,892264717,926165242,961413116,997879281 +"Wages and Salaries: $50,000 Less Than $75,000",900170384,902783183,915963625,916618937,952347137,962308451,1000500360,1050769166,1100707412,1116515287,1214821617,1317543290,1383513720,1465823282,1537448658,1608259437,1676059756,1746823313,1818590357,1890770601,1964639066,2040549922,2118078163,2198687700,2282083390 +"Wages and Salaries: $75,000 Less Than $100,000",791646425,798324358,822009437,840581301,835434509,852517230,870406373,914138780,957583610,971336004,1056859667,1146224551,1203616917,1275223856,1337535860,1399139190,1458123506,1519685754,1582121006,1644915731,1709179159,1775219408,1842666735,1912794701,1985346539 +"Wages and Salaries: $100,000 Less Than $200,000",1521442934,1599743841,1665691829,1759304940,1876094165,1922367424,2015029480,2116271949,2216848662,2248686066,2446677151,2653560834,2786426714,2952199963,3096455027,3239069477,3375620792,3518140135,3662680522,3808053104,3956825798,4109711912,4265855476,4428204837,4596165570 +"Wages and Salaries: $200,000 Less Than $500,000",750627685,806518068,872227137,955295796,1055689937,1106449651,1206754121,1267385873,1327618918,1346685596,1465257836,1589155645,1668725919,1768003648,1854394638,1939803104,2021580499,2106932007,2193493871,2280554117,2369650611,2461210536,2554721272,2651948514,2752536277 +"Wages and Salaries: $500,000 Less Than $1 Million",230634407,259165177,272996984,310372311,337666673,343994542,379375686,398436911,417372793,423366917,460643297,499593913,524608973,555819603,582978940,609829393,635538322,662370869,689583924,716953659,744963543,773747874,803145494,833711499,865333973 +Wages and Salaries: $1 Million and Over,305543960,387803684,346432571,408251028,336316005,310089733,367731740,386207931,404562625,410372775,446505054,484260182,508507471,538760172,565085924,591112272,616032132,642041124,668418946,694948639,722098833,749999703,778495041,808122901,838774807 diff --git a/puf_stage1/Stage_I_factors.csv b/puf_stage1/Stage_I_factors.csv index 55c63b02..dc583796 100644 --- a/puf_stage1/Stage_I_factors.csv +++ b/puf_stage1/Stage_I_factors.csv @@ -9,17 +9,18 @@ YEAR,APOPN,APOPDEP,APOPSNR,AGDPN,ATXPY,ASCHF,ABOOK,ACPIU,ACPIM,ARETS,AWAGE,ASCHC 2018,1.0563,0.9948,1.2756,1.3228,1.3412,0.5152,1.2689,1.1165,1.2108,1.0683,1.2932,1.2969,1.3496,1.5935,1.2745,0.9180,1.5749,2.3143,1.3840,0.2392,0.8601,1.3326 2019,1.0647,0.9965,1.3189,1.3773,1.3956,0.5086,1.3034,1.1365,1.2451,1.0827,1.3547,1.3128,1.3663,1.6369,1.3092,0.9390,1.6537,2.1598,1.4756,0.2250,0.8950,1.4158 2020,1.0731,0.9974,1.3644,1.3572,1.5022,0.5987,1.2441,1.1507,1.2963,1.0955,1.3741,1.3444,1.3991,1.5624,1.2497,0.9363,1.8197,2.8136,1.5622,0.2327,0.9633,1.4223 -2021,1.0814,0.9992,1.4092,1.5204,1.6215,0.9576,1.6089,1.2050,1.3123,1.1084,1.4984,1.4108,1.4682,2.0205,1.6160,0.8614,2.1353,5.0813,1.6328,2.0057,1.0399,1.4764 -2022,1.0897,1.0022,1.4558,1.6590,1.6544,1.0834,1.7663,1.3010,1.3652,1.1208,1.6151,1.4379,1.4964,2.2182,1.7742,0.9251,2.2677,3.0622,1.7669,0.3062,1.0609,1.5326 -2023,1.0980,1.0051,1.5019,1.7632,1.7405,0.7192,1.7935,1.3548,1.3717,1.1334,1.7169,1.5094,1.5708,2.2523,1.8014,1.0077,2.3130,3.3321,1.9787,0.2293,1.1162,1.5909 -2024,1.1062,1.0075,1.5468,1.8554,1.8530,0.5126,1.8863,1.3980,1.4042,1.1461,1.8131,1.5884,1.6530,2.3689,1.8947,1.1917,2.4159,3.5067,2.1457,0.2884,1.1883,1.6514 -2025,1.1142,1.0101,1.5935,1.9339,1.9634,0.5536,1.9519,1.4322,1.3385,1.1589,1.8960,1.6520,1.7192,2.4513,1.9606,1.3984,2.5369,3.3986,2.2806,0.3150,1.2591,1.7143 -2026,1.1222,1.0124,1.6377,2.0062,2.0538,0.5828,1.9805,1.4642,1.3565,1.1719,1.9745,1.7275,1.7978,2.4872,1.9893,1.5128,2.6326,3.2630,2.4165,0.3442,1.3170,1.7795 -2027,1.1301,1.0143,1.6790,2.0784,2.1382,0.6079,2.0184,1.4958,1.3742,1.1850,2.0514,1.7988,1.8720,2.5348,2.0274,1.5721,2.7089,3.2257,2.5562,0.3742,1.3712,1.8472 -2028,1.1379,1.0163,1.7188,2.1532,2.2285,0.6318,2.0452,1.5282,1.3925,1.1983,2.1307,1.8652,1.9411,2.5684,2.0543,1.6536,2.7941,3.2505,2.7043,0.3992,1.4291,1.9175 -2029,1.1455,1.0198,1.7569,2.2340,2.3228,0.6543,2.0871,1.5616,1.4112,1.2117,2.2134,1.9326,2.0113,2.6211,2.0964,1.7330,2.9024,3.3187,2.8573,0.4184,1.4896,1.9904 -2030,1.1530,1.0233,1.7915,2.3193,2.4215,0.6742,2.1506,1.5967,1.4309,1.2252,2.2982,2.0021,2.0836,2.7008,2.1602,1.8277,3.0164,3.4135,3.0138,0.4342,1.5529,2.0662 -2031,1.1603,1.0266,1.8190,2.4080,2.5237,0.6927,2.2230,1.6323,1.4509,1.2390,2.3851,2.0750,2.1594,2.7917,2.2329,1.9314,3.1335,3.5253,3.1722,0.4492,1.6184,2.1448 -2032,1.1675,1.0301,1.8433,2.4998,2.6303,0.7099,2.3028,1.6687,1.4714,1.2528,2.4740,2.1526,2.2402,2.8920,2.3131,2.0396,3.2538,3.6486,3.3317,0.4634,1.6868,2.2264 -2033,1.1745,1.0337,1.8659,2.5946,2.7403,0.7245,2.3837,1.7061,1.4924,1.2669,2.5652,2.2371,2.3281,2.9935,2.3943,2.1390,3.3773,3.7803,3.4992,0.4767,1.7573,2.3111 -2034,1.1813,1.0370,1.8889,2.6926,2.8567,0.7391,2.4672,1.7448,1.5141,1.2810,2.6598,2.3243,2.4188,3.0984,2.4782,2.2528,3.5047,3.9193,3.6751,0.4909,1.8320,2.3990 +2021,1.0814,0.9992,1.4092,1.5025,1.6130,0.6795,1.5254,1.2050,1.3123,1.1084,1.4951,1.4321,1.4904,1.9157,1.5322,0.9428,1.9401,5.0813,1.6328,2.0057,1.0344,1.4764 +2022,1.0897,1.0022,1.4558,1.6381,1.6487,1.1934,1.6102,1.3024,1.3652,1.1208,1.6215,1.4756,1.5357,2.0222,1.6174,0.9967,2.0378,3.1444,1.7669,0.3062,1.0573,1.5326 +2023,1.0980,1.0051,1.5019,1.7037,1.7513,1.2424,1.4167,1.3646,1.3717,1.1334,1.7027,1.5299,1.5921,1.7792,1.4230,1.1791,2.0861,2.3128,1.9787,0.2293,1.1231,1.5909 +2024,1.1062,1.0075,1.5468,1.8795,1.8692,0.5311,2.0897,1.3944,1.4084,1.1461,1.8040,1.6521,1.7193,2.6244,2.0990,1.1252,2.5007,3.3540,2.1460,0.2617,1.1987,1.6514 +2025,1.1142,1.0101,1.5935,1.9617,1.9611,0.5589,2.1440,1.4255,1.3347,1.1589,1.8922,1.7231,1.7932,2.6925,2.1535,1.2310,2.6471,3.5432,2.2833,0.3317,1.2576,1.7143 +2026,1.1222,1.0124,1.6377,2.0390,2.0535,0.6026,2.1650,1.4602,1.3542,1.1719,1.9793,1.7983,1.8714,2.7189,2.1746,1.2889,2.8008,3.4429,2.4165,0.3659,1.3169,1.7795 +2027,1.1301,1.0143,1.6790,2.1163,2.1446,0.6384,2.1728,1.4940,1.3732,1.1850,2.0628,1.8674,1.9434,2.7287,2.1825,1.3645,2.9181,3.3488,2.5546,0.3826,1.3753,1.8472 +2028,1.1379,1.0163,1.7188,2.1961,2.2429,0.6702,2.1691,1.5278,1.3922,1.1983,2.1499,1.9333,2.0120,2.7240,2.1787,1.4781,3.0258,3.3500,2.7030,0.3976,1.4383,1.9175 +2029,1.1455,1.0198,1.7569,2.2798,2.3430,0.6993,2.1826,1.5620,1.4114,1.2117,2.2382,1.9983,2.0796,2.7411,2.1924,1.5870,3.1492,3.4140,2.8558,0.4101,1.5025,1.9904 +2030,1.1530,1.0233,1.7915,2.3675,2.4438,0.7272,2.2395,1.5972,1.4312,1.2252,2.3270,2.0641,2.1481,2.8124,2.2494,1.6838,3.2762,3.5087,3.0118,0.4234,1.5672,2.0662 +2031,1.1603,1.0266,1.8190,2.4585,2.5448,0.7523,2.3357,1.6327,1.4512,1.2390,2.4179,2.1333,2.2201,2.9332,2.3461,1.7797,3.4056,3.6226,3.1700,0.4376,1.6319,2.1448 +2032,1.1675,1.0301,1.8433,2.5536,2.6495,0.7748,2.4445,1.6696,1.4719,1.2528,2.5114,2.2082,2.2981,3.0698,2.4553,1.8775,3.5379,3.7521,3.3300,0.4517,1.6991,2.2264 +2033,1.1745,1.0337,1.8659,2.6520,2.7573,0.7947,2.5507,1.7070,1.4929,1.2669,2.6068,2.2914,2.3847,3.2033,2.5621,1.9638,3.6736,3.8901,3.4915,0.4651,1.7682,2.3111 +2034,1.1813,1.0370,1.8889,2.7534,2.8697,0.8146,2.6550,1.7452,1.5144,1.2810,2.7060,2.3799,2.4767,3.3343,2.6668,2.0628,3.8134,4.0340,3.6608,0.4784,1.8403,2.3990 +2035,1.1880,1.0400,1.9154,2.8577,2.9878,0.8318,2.7634,1.7843,1.5363,1.2954,2.8086,2.4700,2.5704,3.4704,2.7757,2.1602,3.9574,4.1845,3.8384,0.4926,1.9160,2.4903 diff --git a/puf_stage1/cbo_chained_cpiu.py b/puf_stage1/cbo_chained_cpiu.py new file mode 100644 index 00000000..15de68f0 --- /dev/null +++ b/puf_stage1/cbo_chained_cpiu.py @@ -0,0 +1,248 @@ +""" +This script automates the extraction of chained CPI-U values from +the most recent CBO inflation projection. + +The CBO (chained-CPI) inflation projection is in the CBO tax +parameter projection spreadsheet, which is a supplement to the CBO +report entitled "The Budget and Economic Outlook." The most recent +supplement is entitled: +CBO Tax Parameters and Effective Marginal Tax Rates | Feb 2024 +and is available at this URL: +https://www.cbo.gov/system/files/2024-02/53724-2024-02-Tax-Parameters.xlsx + +NOTE: whenever a new spreadsheet becomes available, it should be visually +inspected to see how the CBO_* structure data (see below) need to be updated. + +USAGE: % python cbo_chained_cpiu.py --help + +EXPECTED OUTPUT: +% python cbo_chained_cpiu.py CBO-2024-02-Tax-Parameters.xlsx +2021 144.814090 +2022 149.063510 +2023 159.840000 +2024 168.474670 +2025 172.770430 +2026 176.567340 +2027 180.230100 +2028 183.738130 +2029 187.305920 +2030 190.989090 +2031 194.765530 +2032 198.642940 +2033 202.612840 +2034 206.669280 +""" + +import os +import sys +import argparse +import pandas +import taxcalc + + +# Data on the expected CBO spreadsheet structure: +CBO_SHEET = 1 # the sheet called "1. Tax Parameters" +CBO_STR_COLS = [0, 1, 2, 3] # expect columns A:D are strings; others numeric +CBO_YEAR = { + "first": {"year": 2021, "col": "E"}, + "last": {"year": 2034, "col": "R"}, +} +# keys in CBO_ROWS are arbitrary names for parameter in the CBO spreadsheet +CBO_ROWS = { + "year": {"row": 8, "label": "Tax Year"}, + # price index ... + "c_cpiu": {"row": 158, "label": "Chained consumer price index"}, +} + + +def rindex(row_number): + """ + Convert spreadsheet row number (1-based) to DataFrame row index (0-based). + """ + return row_number - 1 + + +def cindex(capital_letter): + """ + Convert spreadsheet column letter to DataFrame column index (0-based). + """ + return ord(capital_letter) - ord("A") + + +def cbo_value(cbodf, name, year): + """ + Return value in specified year of CBO parameter with specified name; + return None if there are any problems. + """ + # check argument values + args_ok = True + if name not in CBO_ROWS: + msg = f"name {name} not in CBO_ROWS data structure" + sys.stderr.write(f"CBO: {msg}\n") + args_ok = False + first_year = CBO_YEAR["first"]["year"] + if year < first_year: + msg = f"year {year} less than first year {first_year}" + sys.stderr.write(f"CBO: {msg}\n") + args_ok = False + last_year = CBO_YEAR["last"]["year"] + if year > last_year: + msg = f"year {year} greater than last year {last_year}" + sys.stderr.write(f"CBO: {msg}\n") + args_ok = False + if not args_ok: + return None + # translate name to row number + row = CBO_ROWS[name]["row"] + # convert year to column letter + ord_first_year = ord(CBO_YEAR["first"]["col"]) + letter = chr(ord_first_year + year - first_year) + # get cbo_value from cbodf + val = cbodf.iat[rindex(row), cindex(letter)] + if "pct" in CBO_ROWS[name]: + return round(0.01 * val, 6) + return val + + +def check_cbo_year(): + """ + Check CBO_YEAR for consistency: return 0 if OK, else return 1. + """ + ydiff = CBO_YEAR["last"]["year"] - CBO_YEAR["first"]["year"] + cdiff = cindex(CBO_YEAR["last"]["col"]) - cindex(CBO_YEAR["first"]["col"]) + if ydiff != cdiff: + msg = "CBO_YEAR contents are inconsistent" + sys.stderr.write(f"STRUCT: {msg}\n") + return 1 + return 0 + + +def read_cbo_label(cbolabel, row): + """ + Return string label from cbodf row. + """ + ridx = rindex(row) + for col in CBO_STR_COLS: + label = cbolabel[col][ridx] + if label != "nan": + return label + return None + + +def read_check_spreadsheet(fname): + """ + Read spreadsheet in specified fname and check its contents against + the expected structure specified in the CBO_* data structures above. + Function returns a pd.DataFrame except when any check errors are found, + in which case it return None. + """ + # check CBO_YEAR consistency + rcode = check_cbo_year() + if rcode != 0: + return None + # check taxcalc.Policy YEAR constants against CBO_YEAR info + ok_years = True + lky = taxcalc.Policy.LAST_KNOWN_YEAR + valid_lky = range(CBO_YEAR["first"]["year"] + 1, CBO_YEAR["last"]["year"]) + if lky not in valid_lky: + msg = f"Policy.LAST_KNOWN_YEAR={lky} inconsistent with CBO_YEAR info" + sys.stderr.write(f"STRUCT: {msg}\n") + ok_years = False + lby = taxcalc.Policy.LAST_BUDGET_YEAR + valid_lby = range(CBO_YEAR["first"]["year"] + 2, CBO_YEAR["last"]["year"] + 1) + if lby not in valid_lby: + msg = f"Policy.LAST_BUDGET_YEAR={lby} inconsistent with CBO_YEAR info" + sys.stderr.write(f"STRUCT: {msg}\n") + ok_years = False + if not ok_years: + return None + # read spreadsheet + try: + cbodf = pandas.read_excel(fname, CBO_SHEET, header=None, dtype=object) + except: # pylint: disable=bare-except + msg = f"could not read sheet in {fname} into a DataFrame" + sys.stderr.write(f"READ: {msg}\n") + return None + # extract string columns into cbolabel dictionary containing row lists + cbolabel = {} + for col in CBO_STR_COLS: + cbolabel[col] = [str(obj) for obj in cbodf[col].tolist()] + # check spreadsheet against CBO_ROWS + for cname, cdict in CBO_ROWS.items(): + elabel = cdict["label"] + alabel = read_cbo_label(cbolabel, cdict["row"]) + if not alabel.startswith(elabel): + msg = f"for {cname} expected label is {elabel} but found {alabel}" + sys.stderr.write(f"READ: {msg}\n") + return None + return cbodf + + +def check_arguments(args): + """ + Check validity of command-line arguments returning one if there + are problems or zero if there are no problems. + """ + rcode = 0 + fname = args.CBOFILENAME + if len(fname) <= 0: + msg = "must specify CBOFILENAME command-line argument" + sys.stderr.write(f"ERROR: {msg}\n") + return 1 + if not fname.endswith(".xlsx"): + msg = f"CBOFILENAME {fname} does not end with .xlsx" + sys.stderr.write(f"ERROR: {msg}\n") + rcode = 1 + if not os.path.exists(fname): + msg = f"CBOFILENAME {fname} does not exist" + sys.stderr.write(f"ERROR: {msg}\n") + rcode = 1 + return rcode + + +def main(): + """ + High-level script logic. + """ + # parse command-line arguments: + usage_str = "python cbo_chained_cpiu.py CBOFILENAME [--help]" + parser = argparse.ArgumentParser( + prog="", + usage=usage_str, + description=( + "Writes to standard output chained CPI-U values that are " + " extracted from the downloaded CBOFILENAME spreadsheet. " + "IMPORTANT NOTE: always inspect a new CBO spreadsheet to " + "see which CBO_* data structures at the top of this script " + "need to be updated." + ), + ) + parser.add_argument( + "CBOFILENAME", + nargs="?", + help=("file name of CBO .xlsx spreadsheet."), + default="", + ) + args = parser.parse_args() + # check command-line arguments + rcode = check_arguments(args) + if rcode != 0: + sys.stderr.write(f"USAGE: {usage_str}\n") + return rcode + # read and check structure of CBO tax parameters spreadsheet + cbodf = read_check_spreadsheet(args.CBOFILENAME) + if not isinstance(cbodf, pandas.DataFrame): + sys.stderr.write("ERROR: CBO spreadsheet has unexpected structure\n") + return 1 + # write chained CPI-U values for each year in CBO spreadsheet + for year in range(CBO_YEAR["first"]["year"], CBO_YEAR["last"]["year"] + 1): + val = cbo_value(cbodf, "c_cpiu", year) + print(f"{year} {val:.6f}") + return 0 + + +# end main function code + + +if __name__ == "__main__": + sys.exit(main()) diff --git a/puf_stage1/growfactors.csv b/puf_stage1/growfactors.csv index fce88500..32b77d00 100644 --- a/puf_stage1/growfactors.csv +++ b/puf_stage1/growfactors.csv @@ -9,17 +9,18 @@ YEAR,ATXPY,ASCHF,ABOOK,ACPIU,ACPIM,AWAGE,ASCHCI,ASCHCL,ASCHEI,ASCHEL,AINTS,ADIVS 2018,1.042394,0.976786,1.074059,1.0245,1.019707,1.041821,1.042769,1.042713,1.074048,1.074033,1.031272,1.076804,1.074755,1.018778,0.92284,1.050825,1.103035,1.045097,1.045897,1.005738,1.0,1.002574,1.034828,1.0,1.0 2019,1.032351,0.979401,1.019085,1.017913,1.028328,1.039292,1.004274,1.004387,1.019131,1.019122,1.014806,1.041751,0.925878,1.031182,0.940635,1.040577,1.054052,1.052158,1.045866,1.000751,1.0,1.002567,1.034809,1.0,1.0 2020,1.067957,1.167938,0.947032,1.012495,1.041121,1.006381,1.016054,1.015991,0.947016,0.94708,0.989319,1.091767,1.292516,1.023383,1.034222,1.076313,0.996727,1.050763,1.046106,1.00255,1.0,1.003841,1.034974,1.0,1.0 -2021,1.071132,1.587189,1.283298,1.047189,1.012343,1.08209,1.041336,1.041335,1.283277,1.283185,0.912943,1.164429,1.792117,1.011965,8.619252,1.079518,1.03007,1.047248,1.047927,1.001796,1.0,1.002551,1.034869,1.0,1.0 -2022,1.012519,1.122753,1.089469,1.079668,1.040311,1.069673,1.011446,1.011444,1.089485,1.089534,1.065769,1.053916,0.598051,1.04749,0.152665,1.020194,1.030159,1.048769,1.047573,0.999851,1.0,1.002545,1.034942,1.0,1.0 -2023,1.04409,0.658818,1.007724,1.041353,1.004761,1.054994,1.04179,1.041784,1.007697,1.007656,1.081054,1.012266,1.079914,1.085497,0.748857,1.052126,1.030193,1.050822,1.048715,1.000448,1.0,1.003807,1.034968,1.0,1.0 -2024,1.056745,0.707453,1.043946,1.031887,1.023693,1.048203,1.044538,1.044529,1.043973,1.043996,1.173828,1.036745,1.044598,1.052921,1.257741,1.064594,1.030334,1.048426,1.051767,0.99776,1.0,1.002528,1.034951,1.0,1.0 -2025,1.051971,1.07223,1.027347,1.024464,0.953212,1.038214,1.032573,1.032581,1.027354,1.027351,1.165024,1.042545,0.962215,1.031721,1.092233,1.059581,1.030635,1.046248,1.052213,1.002245,1.0,1.003783,1.034897,1.0,1.0 -2026,1.038585,1.045241,1.007419,1.022343,1.013448,1.033979,1.038248,1.038264,1.007412,1.007405,1.074096,1.030325,0.953257,1.030992,1.092698,1.045985,1.030633,1.072236,1.0,0.999552,1.0,1.002513,1.034808,1.0,1.0 -2027,1.033817,1.035776,1.012012,1.021582,1.013048,1.031684,1.033994,1.033994,1.012014,1.012028,1.031934,1.02179,0.981658,1.031791,1.087159,1.041154,1.030788,1.0,1.0,1.0,1.0,1.002506,1.034863,1.0,1.0 -2028,1.035088,1.032191,1.006332,1.021661,1.013317,1.031537,1.029806,1.029805,1.00631,1.006323,1.044631,1.024382,1.000781,1.03344,1.066809,1.042226,1.030942,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0 -2029,1.0354,1.028742,1.013716,1.021856,1.013429,1.031921,1.029261,1.02929,1.013748,1.013723,1.041063,1.031868,1.014208,1.033664,1.048096,1.042334,1.031131,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0 -2030,1.035711,1.023712,1.023722,1.022477,1.01396,1.031558,1.029223,1.029208,1.023705,1.02373,1.047785,1.032518,1.021875,1.034401,1.037763,1.042495,1.03133,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0 -2031,1.035648,1.020976,1.027162,1.022296,1.013977,1.031283,1.029891,1.029859,1.027153,1.027151,1.05009,1.032285,1.026255,1.036645,1.034546,1.042179,1.03151,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0 -2032,1.035812,1.01851,1.029509,1.0223,1.014129,1.030876,1.031,1.03102,1.029539,1.029529,1.049509,1.031988,1.028593,1.036435,1.031612,1.042264,1.031644,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0 -2033,1.035611,1.014484,1.028962,1.022413,1.014272,1.030684,1.033061,1.033044,1.028928,1.028935,1.042485,1.031769,1.029921,1.037554,1.028701,1.041795,1.031857,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0 -2034,1.036476,1.014279,1.029072,1.022683,1.01454,1.03091,1.032998,1.032978,1.029085,1.029083,1.04714,1.031749,1.030802,1.03748,1.029788,1.042508,1.032059,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0 +2021,1.065517,1.126248,1.216697,1.047189,1.012343,1.079707,1.057058,1.05708,1.216716,1.216644,0.999214,1.057982,1.792117,1.011965,8.619252,1.073809,1.03007,1.047248,1.047927,1.001796,1.0,1.002551,1.034869,1.0,1.0 +2022,1.014347,1.742914,1.047552,1.08083,1.040311,1.076282,1.022527,1.022546,1.047553,1.047566,1.049118,1.042358,0.614105,1.04749,0.152665,1.022138,1.030159,1.048769,1.047573,0.999851,1.0,1.002545,1.034942,1.0,1.0 +2023,1.054201,1.03319,0.873178,1.047758,1.004761,1.042139,1.028961,1.028889,0.873183,0.873156,1.174061,1.015964,0.72997,1.085497,0.748857,1.062234,1.030193,1.050822,1.048715,1.000448,1.0,1.003807,1.034968,1.0,1.0 +2024,1.05941,0.42431,1.464113,1.021838,1.026755,1.05164,1.07187,1.071889,1.464111,1.464118,0.947213,1.189858,1.43944,1.053068,1.1413,1.067314,1.030334,1.048426,1.051767,0.99776,1.0,1.002528,1.034951,1.0,1.0 +2025,1.041632,1.044788,1.018618,1.022303,0.947671,1.04136,1.035487,1.035494,1.018582,1.018598,1.086173,1.050943,1.048825,1.032798,1.267482,1.049137,1.030635,1.046248,1.052213,1.002245,1.0,1.003783,1.034897,1.0,1.0 +2026,1.039652,1.070503,1.002596,1.024342,1.01461,1.038574,1.036202,1.036169,1.002606,1.002599,1.039571,1.050521,0.964765,1.029773,1.103105,1.047153,1.030633,1.072236,1.0,0.999552,1.0,1.002513,1.034808,1.0,1.0 +2027,1.037063,1.052003,0.996587,1.023148,1.01403,1.034901,1.031166,1.031214,0.996589,0.996617,1.051254,1.034598,0.965869,1.031145,1.045641,1.044347,1.030788,1.0,1.0,1.0,1.0,1.002506,1.034863,1.0,1.0 +2028,1.038667,1.042616,0.991454,1.022624,1.013836,1.03508,1.028193,1.028202,0.991435,0.991416,1.075829,1.0298,0.993501,1.03359,1.039205,1.045808,1.030942,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0 +2029,1.037699,1.036497,0.999548,1.022385,1.013791,1.034165,1.026764,1.026741,0.999601,0.999612,1.066552,1.033877,1.012343,1.033618,1.031439,1.044636,1.031131,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0 +2030,1.036237,1.033133,1.019395,1.022535,1.014029,1.032912,1.026209,1.02622,1.019337,1.019325,1.054094,1.033561,1.021054,1.034257,1.032431,1.043062,1.03133,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0 +2031,1.034778,1.028007,1.036394,1.022226,1.013974,1.032526,1.027023,1.027016,1.036391,1.036427,1.050305,1.032957,1.025966,1.036614,1.033538,1.041284,1.03151,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0 +2032,1.034722,1.023557,1.040127,1.022601,1.014264,1.032264,1.028726,1.02875,1.040116,1.040091,1.048447,1.032441,1.02936,1.036625,1.032221,1.041179,1.031644,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0 +2033,1.034484,1.019571,1.037226,1.022401,1.014267,1.0318,1.031493,1.031499,1.037269,1.037279,1.039731,1.032168,1.0306,1.035799,1.029666,1.040669,1.031857,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0 +2034,1.034773,1.01914,1.034899,1.022378,1.014402,1.032079,1.032644,1.032601,1.034904,1.034873,1.044366,1.03208,1.031022,1.035722,1.028596,1.040776,1.032059,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0 +2035,1.035282,1.015356,1.034959,1.022404,1.014461,1.032062,1.032005,1.03198,1.034948,1.034965,1.041311,1.031909,1.031458,1.034008,1.029682,1.041135,1.032203,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0 diff --git a/puf_stage1/stage1.py b/puf_stage1/stage1.py index f3664838..cfdffb20 100644 --- a/puf_stage1/stage1.py +++ b/puf_stage1/stage1.py @@ -4,7 +4,7 @@ CUR_PATH = os.path.abspath(os.path.dirname(__file__)) SYR = 2011 # calendar year used to normalize factors BEN_SYR = 2014 # calendar year used just for the benefit start year -EYR = 2034 # last calendar year we have data for +EYR = 2035 # last calendar year we have data for SOI_YR = 2017 # most recently available SOI estimates IRS_RET_YR = 2022 # most recently available IRS return projections diff --git a/puf_stage1/updatecbo.py b/puf_stage1/updatecbo.py index 151557fd..c36cc054 100644 --- a/puf_stage1/updatecbo.py +++ b/puf_stage1/updatecbo.py @@ -46,8 +46,8 @@ def update_cpim(baseline, text_args): # convert the values to floats so that the groupby mean only returns # the mean for the value df["value"] = df["value"].astype(float) - cpi_mean = df.groupby("year")["value"].mean().round(1) - cpi_mean = cpi_mean.to_frame(name="CPIM").transpose() + cpi_mean = df.groupby("year").mean().transpose().round(1) + cpi_mean.index = ["CPIM"] # open the current baseline to replace the values for the years pulled # from BLS @@ -98,10 +98,9 @@ def update_econproj(url, baseline, text_args): r = session.get(url) cbo_pre_url = "https://www.cbo.gov" divs = r.html.find("div.view.view-recurring-data") - + revprojections = divs[4] # both assertions are there to throw errors if the order of sections change # revenue projections used for capital gains projections - revprojections = divs[4] assert "Revenue Projections" in revprojections.text latest_revprojections = revprojections.find("div.views-col.col-1")[0] rev_link = latest_revprojections.find("a")[0] @@ -129,25 +128,24 @@ def update_econproj(url, baseline, text_args): # extract values for needed rows in the excel file # some variables have a missing value in the multi-index. Use iloc # to extract needed variables from them. + gdp = econ_proj.loc["Gross domestic product (GDP)"].iloc[0] + income = econ_proj.loc["Income"] + tpy = econ_proj.loc["Income, personal"].iloc[0] + wages = econ_proj.loc["Wages and salaries"].iloc[0] billions = "Billions of dollars" - gdp = econ_proj.loc["Output"].loc["Gross Domestic Product (GDP)"].iloc[0] - tpy = econ_proj.loc["Income"].loc["Income, Personal"].iloc[0] - wages = econ_proj.loc["Income"].loc["Wages and Salaries"].iloc[0] var = "Proprietors' income, nonfarm, with IVA & CCAdj" - schc = econ_proj.loc["Income"].loc["Nonwage Income"].loc[var].iloc[0] + schc = econ_proj.loc[var].iloc[0] var = "Proprietors' income, farm, with IVA & CCAdj" - schf = econ_proj.loc["Income"].loc["Nonwage Income"].loc[var].iloc[0] + schf = econ_proj.loc[var].iloc[0] var = "Interest income, personal" - ints = econ_proj.loc["Income"].loc["Nonwage Income"].loc[var].iloc[0] + ints = econ_proj.loc[var].iloc[0] var = "Dividend income, personal" - divs = econ_proj.loc["Income"].loc["Nonwage Income"].loc[var].iloc[0] + divs = econ_proj.loc[var].iloc[0] var = "Income, rental, with CCAdj" - rents = econ_proj.loc["Income"].loc["Nonwage Income"].loc[var].iloc[0] - book = ( - econ_proj.loc["Income"].loc["Profits, Corporate, With IVA & CCAdj"].iloc[0] - ) - var = "Consumer Price Index, All Urban Consumers (CPI-U)" - cpiu = econ_proj.loc["Prices"].loc[var].iloc[0] + rents = econ_proj.loc[var].iloc[0] + book = econ_proj.loc["Profits, corporate, with IVA & CCAdj"].iloc[0] + var = "Consumer price index, all urban consumers (CPI-U)" + cpiu = econ_proj.loc[var].iloc[0] var_list = [gdp, tpy, wages, schc, schf, ints, divs, rents, book, cpiu] var_names = [ "GDP", @@ -189,15 +187,15 @@ def update_econproj(url, baseline, text_args): # Extract capital gains data cg_proj = pd.read_excel( rev_url, - sheet_name="6. Capital Gains Realization", + sheet_name="6. Capital Gains Realizations", skiprows=7, header=[0, 1], ) cg_proj.index = cg_proj[cg_proj.columns[0]] var = "Capital gains realizationsa" # increase the CBO final year to (the last year + 1) for each update. - # e.g. when the CBO final year from CBO is 2034, make the update as range(2017,2035) - cgns = cg_proj[var]["Billions of dollars"].loc[list(range(2017, 2035))] + # e.g. when the CBO final year from CBO is 2033, make the update as range(2017,2035+1) + cgns = cg_proj[var]["Billions of dollars"].loc[list(range(2017, 2036))] var_list = [cgns] var_names = ["CGNS"] df = pd.DataFrame(var_list, index=var_names).round(1) @@ -239,11 +237,9 @@ def update_socsec(url, baseline, text_args): r = session.get(url) # we can determine the latest year by looking at all of the years availeble # in the first drop down and adding one. - # selector = r.html.find("select#yh1")[0] - - # check https://www.ssa.gov/oact/TR/ for the latest year - latest_yr = 2023 - # latest_yr = max([int(yr) for yr in selector.text.split()]) + 1 + selector = r.html.find("select#yh1")[0] + latest_yr = max([int(yr) for yr in selector.text.split()]) + 1 + latest_yr = 2024 report = f"{latest_yr} Report" if report == text_args["socsec_cur_report"]: print("\tNo new data since last update") @@ -322,12 +318,11 @@ def update_rets(url, baseline, text_args): spreadsheet_url = link break data = pd.read_excel(spreadsheet_url, sheet_name="1B-BOD", index_col=0, header=2) - projections = data.loc["Forms 1040, 1040-SR, and 1040-SP, Total"] + projections = data.loc["Forms 1040 and 1040-SR, Total"] projections /= 1_000_000 # convert units pct_change = projections.pct_change() + 1 # extrapolate out to final year of other CBO projections factor = pct_change.iloc[-1] - projections.index = projections.index.astype(int) last_year = int(max(projections.index)) cbo_last_year = int(max(baseline.columns)) df_projections = pd.DataFrame(projections).transpose() @@ -368,12 +363,11 @@ def update_ucomp(url, baseline, text_args): for link in links: if "unemployment" in link.lower() and link.endswith("xlsx"): date = re.search(r"20\d\d-\d\d", link).group() - ucomp_links.append(link) + doc_link = "https://www.cbo.gov" + link + ucomp_links.append(doc_link) ucomp_years.append(datetime.strptime(date, "%Y-%m")) latest_year = max(ucomp_years) ucomp_url = ucomp_links[ucomp_years.index(latest_year)] - CBO_url = "https://www.cbo.gov" - ucomp_url = CBO_url + ucomp_url report = datetime.strftime(latest_year, "%B %Y") if report == text_args["ucomp_cur_report"]: print("\tNo new data since last update") @@ -381,18 +375,26 @@ def update_ucomp(url, baseline, text_args): elif report == "February 2021": print("Latest data is from pandemic. Enter by hand") return baseline, text_args - data = pd.read_excel(ucomp_url, skiprows=7, index_col=[0, 1, 2], thousands=",") + data = pd.read_excel( + ucomp_url, + engine="openpyxl", + sheet_name="UI and TAA_01-2025", + skiprows=7, + index_col=0, + thousands=",", + ).dropna() try: - benefits = data.loc["Budget Authority"].dropna().astype(int) / 1000 + benefits = ( + data.loc["Regular Benefits"].dropna().astype(int) / 1000 + + data.loc["Extended Benefits"].dropna().astype(int) / 1000 + ) except KeyError: - benefits = data.loc["Budget Authority"].dropna().astype(int) / 1000 + benefits = ( + data.loc["Regular Benefits"].dropna().astype(int) / 1000 + + data.loc["Extended Benefits"].dropna().astype(int) / 1000 + ) benefits = benefits.round(1) df = pd.DataFrame(benefits).transpose() - # drop items whose index are not years - for indx in df.index: - if type(indx) != int: - df = df.drop(indx) - df = pd.DataFrame(df.values, index=df.index).transpose() df.index = ["UCOMP"] df.columns = df.columns.astype(str) baseline.update(df) diff --git a/puf_stage2/puf_weights.csv.gz b/puf_stage2/puf_weights.csv.gz index 5d2163bb..c4356369 100644 Binary files a/puf_stage2/puf_weights.csv.gz and b/puf_stage2/puf_weights.csv.gz differ diff --git a/puf_stage2/solver.jl b/puf_stage2/solver.jl index 46852251..296c269a 100644 --- a/puf_stage2/solver.jl +++ b/puf_stage2/solver.jl @@ -82,12 +82,12 @@ function Solve_func(year, tol) end -year_list = [x for x in 2012:2034] +year_list = [x for x in 2012:2035] tol_list = [0.40, 0.38, 0.35, 0.33, 0.30, 0.45, 0.45, 0.45, 0.45, 0.45, 0.45, 0.45, 0.45, 0.45, 0.45, 0.45, 0.45, 0.45, 0.45, 0.45, - 0.45, 0.5, 0.5] + 0.45, 0.5, 0.5, 0.5] # Run solver function for all years and tolerances (in order) for i in zip(year_list, tol_list) diff --git a/puf_stage2/stage2.py b/puf_stage2/stage2.py index b0ae1900..985ebac1 100644 --- a/puf_stage2/stage2.py +++ b/puf_stage2/stage2.py @@ -56,7 +56,7 @@ puf.s006 = puf.matched_weight * 100 # Dataprep -year_list = [x for x in range(2012, 2034 + 1)] +year_list = [x for x in range(2012, 2035 + 1)] skipped_years = [] for i in year_list: try: diff --git a/puf_stage3/puf_ratios.csv b/puf_stage3/puf_ratios.csv index 52c74b32..2fef647f 100644 --- a/puf_stage3/puf_ratios.csv +++ b/puf_stage3/puf_ratios.csv @@ -9,17 +9,18 @@ INT2017,0.9932,0.9174,0.8978,0.8924,0.8944,0.9131,0.9198,0.9410,0.9611,0.9787,1. INT2018,0.9991,0.9744,0.9683,0.9667,0.9757,0.9725,0.9747,0.9779,0.9742,0.9969,0.9930,1.0038,1.0148,1.0067,1.0231,0.9898,1.0182,1.0911,0.9981 INT2019,0.9979,0.9771,0.9763,0.9903,0.9793,0.9805,0.9769,0.9852,0.9826,0.9938,0.9934,1.0109,1.0020,1.0074,0.9983,1.0006,1.0253,1.0282,1.0196 INT2020,1.0017,0.9799,0.9740,0.9756,0.9843,0.9849,0.9831,0.9833,0.9931,0.9964,0.9958,1.0114,1.0058,1.0047,1.0078,0.9991,1.0129,1.0113,1.0113 -INT2021,0.9958,0.9798,0.9776,0.9781,0.9830,0.9898,0.9883,0.9869,0.9921,0.9977,1.0044,0.9974,1.0067,1.0116,1.0050,1.0041,1.0304,1.0086,1.0022 -INT2022,1.0061,0.9815,0.9810,0.9783,0.9729,0.9820,0.9850,0.9893,0.9934,1.0050,1.0022,1.0048,1.0029,1.0046,1.0046,1.0044,1.0133,0.9990,1.0111 -INT2023,0.9987,0.9812,0.9761,0.9786,0.9894,0.9893,0.9851,1.0196,0.9938,0.9953,1.0022,1.0014,1.0023,1.0073,1.0005,1.0093,1.0215,1.0020,0.9943 -INT2024,1.0009,0.9842,0.9813,0.9793,0.9710,0.9789,0.9892,1.0097,0.9910,0.9985,0.9987,0.9971,1.0049,1.0077,1.0093,1.0075,1.0237,1.0149,1.0081 -INT2025,1.0089,0.9935,0.9772,0.9767,0.9834,0.9816,1.0012,0.9946,0.9933,1.0008,0.9992,0.9978,1.0049,1.0073,1.0138,1.0150,1.0239,0.9939,0.9912 -INT2026,1.0088,0.9843,0.9791,0.9796,0.9873,0.9904,0.9998,0.9908,0.9952,0.9939,0.9930,0.9932,1.0068,1.0143,1.0373,1.0250,1.0213,0.9991,0.9936 -INT2027,1.0116,0.9889,0.9841,0.9806,0.9888,0.9908,0.9816,0.9954,0.9907,0.9945,0.9989,0.9914,1.0075,1.0185,1.0175,1.0279,1.0253,0.9932,0.9947 -INT2028,1.0062,0.9977,0.9772,0.9828,0.9863,0.9876,1.0107,0.9956,0.9923,0.9954,0.9933,0.9921,1.0068,1.0177,1.0271,1.0218,1.0222,0.9964,0.9918 -INT2029,1.0105,0.9938,0.9779,0.9801,0.9823,0.9852,1.0024,0.9850,0.9944,0.9933,0.9936,0.9926,1.0033,1.0285,1.0278,1.0479,1.0236,1.0009,0.9924 -INT2030,1.0291,1.0010,0.9820,0.9840,0.9820,0.9917,0.9822,0.9877,0.9817,0.9890,0.9814,0.9925,1.0054,1.0359,1.0385,1.0443,1.0299,0.9951,0.9921 -INT2031,1.0279,1.0213,0.9859,0.9918,0.9830,0.9887,0.9858,0.9770,0.9923,0.9938,0.9792,0.9867,0.9954,1.0446,1.0437,1.0737,1.0287,1.0061,0.9932 -INT2032,1.0081,1.0988,0.9919,0.9813,0.9868,0.9849,0.9882,0.9740,0.9733,0.9791,0.9660,0.9835,0.9901,1.0784,1.0901,1.1369,1.0479,1.0099,0.9984 -INT2033,0.9352,0.8363,0.9708,0.9737,0.9897,0.9850,0.9878,1.0383,1.0312,1.0351,1.1158,1.0750,1.0373,0.8506,0.8249,0.7410,0.8976,1.0566,1.0930 -INT2034,1.0278,0.9998,0.9801,0.9814,0.9903,0.9878,0.9984,0.9804,0.9885,0.9931,0.9775,0.9837,1.0026,1.0381,1.0368,1.0602,1.0409,1.0028,0.9939 +INT2021,0.9959,0.9797,0.9776,0.9780,0.9834,0.9898,0.9883,0.9869,0.9920,0.9978,1.0043,0.9974,1.0066,1.0119,1.0049,1.0040,1.0303,1.0085,1.0022 +INT2022,1.0062,0.9815,0.9810,0.9783,0.9727,0.9820,0.9851,0.9893,0.9934,1.0049,1.0022,1.0050,1.0029,1.0041,1.0047,1.0044,1.0133,0.9990,1.0111 +INT2023,0.9983,0.9812,0.9761,0.9789,0.9892,0.9893,0.9851,1.0197,0.9942,0.9956,1.0022,1.0012,1.0023,1.0074,1.0006,1.0093,1.0214,1.0020,0.9943 +INT2024,1.0016,0.9843,0.9813,0.9791,0.9709,0.9789,0.9893,1.0102,0.9906,0.9984,0.9987,0.9971,1.0048,1.0076,1.0089,1.0075,1.0238,1.0148,1.0081 +INT2025,1.0086,0.9934,0.9772,0.9767,0.9834,0.9817,1.0012,0.9941,0.9934,1.0008,0.9990,0.9978,1.0051,1.0074,1.0142,1.0150,1.0238,0.9941,0.9912 +INT2026,1.0088,0.9843,0.9792,0.9796,0.9872,0.9904,0.9995,0.9909,0.9953,0.9939,0.9931,0.9932,1.0068,1.0143,1.0373,1.0250,1.0207,0.9992,0.9937 +INT2027,1.0115,0.9888,0.9839,0.9805,0.9888,0.9905,0.9818,0.9951,0.9905,0.9944,0.9993,0.9913,1.0074,1.0184,1.0174,1.0275,1.0260,0.9935,0.9946 +INT2028,1.0062,0.9977,0.9772,0.9829,0.9863,0.9878,1.0107,0.9957,0.9924,0.9955,0.9931,0.9921,1.0068,1.0177,1.0271,1.0221,1.0222,0.9960,0.9918 +INT2029,1.0101,0.9939,0.9780,0.9801,0.9824,0.9852,1.0025,0.9850,0.9945,0.9933,0.9935,0.9928,1.0033,1.0285,1.0278,1.0474,1.0236,1.0012,0.9924 +INT2030,1.0294,1.0010,0.9821,0.9840,0.9821,0.9917,0.9822,0.9867,0.9830,0.9890,0.9815,0.9921,1.0057,1.0359,1.0382,1.0449,1.0299,0.9948,0.9921 +INT2031,1.0280,1.0214,0.9858,0.9918,0.9829,0.9887,0.9858,0.9780,0.9910,0.9938,0.9791,0.9870,0.9952,1.0446,1.0439,1.0732,1.0287,1.0061,0.9932 +INT2032,1.0079,1.1010,0.9920,0.9811,0.9867,0.9849,0.9881,0.9740,0.9732,0.9791,0.9659,0.9835,0.9898,1.0786,1.0904,1.1373,1.0482,1.0099,0.9984 +INT2033,0.9352,0.8345,0.9707,0.9751,0.9896,0.9848,0.9879,1.0383,1.0312,1.0351,1.1159,1.0745,1.0375,0.8504,0.8247,0.7425,0.8974,1.0566,1.0930 +INT2034,1.0278,0.9998,0.9801,0.9801,0.9905,0.9881,0.9984,0.9804,0.9885,0.9931,0.9775,0.9842,1.0026,1.0381,1.0368,1.0580,1.0409,1.0028,0.9939 +INT2035,1.0241,1.0200,0.9891,0.9840,0.9837,0.9859,0.9885,0.9688,0.9850,0.9882,0.9774,0.9926,1.0011,1.0428,1.0542,1.0592,1.0396,0.9982,0.9941 diff --git a/puf_stage3/stage3.py b/puf_stage3/stage3.py index 315d4ed9..1faba02e 100644 --- a/puf_stage3/stage3.py +++ b/puf_stage3/stage3.py @@ -6,7 +6,7 @@ CUR_PATH = os.path.abspath(os.path.dirname(__file__)) start_year = 2011 -end_year = 2034 +end_year = 2035 def adjustment(agi, var, var_name, target, weights, blowup):