From cbf9e9e28ee279c2fbd921bd3f29bfe3b47e8bde Mon Sep 17 00:00:00 2001 From: PavelMakarchuk Date: Mon, 12 May 2025 09:08:21 -0400 Subject: [PATCH 1/3] 2026 Budget reconciliation impacts --- us/reconciliation/2026_reconciliation.ipynb | 512 ++++++++++++++++++++ us/reconciliation/qbid_reform_results.csv | 61 +++ 2 files changed, 573 insertions(+) create mode 100644 us/reconciliation/2026_reconciliation.ipynb create mode 100644 us/reconciliation/qbid_reform_results.csv diff --git a/us/reconciliation/2026_reconciliation.ipynb b/us/reconciliation/2026_reconciliation.ipynb new file mode 100644 index 0000000..1ed6abc --- /dev/null +++ b/us/reconciliation/2026_reconciliation.ipynb @@ -0,0 +1,512 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/Users/pavelmakarchuk/anaconda3/envs/pe/lib/python3.10/site-packages/tqdm/auto.py:21: TqdmWarning: IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html\n", + " from .autonotebook import tqdm as notebook_tqdm\n" + ] + } + ], + "source": [ + "from policyengine_us import Microsimulation\n", + "from policyengine_core.reforms import Reform\n", + "import pandas as pd\n" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [], + "source": [ + "qbid_reform = Reform.from_dict({\n", + " \"gov.irs.deductions.qbi.max.rate\": {\n", + " \"2026-01-01.2100-12-31\": 0.22\n", + " },\n", + " \"gov.irs.deductions.qbi.max.w2_wages.rate\": {\n", + " \"2026-01-01.2100-12-31\": 0.5\n", + " },\n", + " \"gov.contrib.reconciliation.qbid.in_effect\": {\n", + " \"2026-01-01.2100-12-31\": True\n", + " },\n", + " \"gov.irs.deductions.qbi.max.w2_wages.alt_rate\": {\n", + " \"2026-01-01.2035-12-31\": 0.25\n", + " },\n", + " \"gov.irs.deductions.qbi.phase_out.start.JOINT\": {\n", + " \"2026-01-01.2026-12-31\": 400600,\n", + " \"2027-01-01.2027-12-31\": 410500,\n", + " \"2028-01-01.2028-12-31\": 419000,\n", + " \"2029-01-01.2029-12-31\": 427350,\n", + " \"2030-01-01.2030-12-31\": 435900,\n", + " \"2031-01-01.2031-12-31\": 444500,\n", + " \"2032-01-01.2032-12-31\": 453250,\n", + " \"2033-01-01.2033-12-31\": 462200,\n", + " \"2034-01-01.2034-12-31\": 471400,\n", + " \"2035-01-01.2036-12-31\": 480700\n", + " },\n", + " \"gov.irs.deductions.qbi.phase_out.start.SINGLE\": {\n", + " \"2026-01-01.2026-12-31\": 200300,\n", + " \"2027-01-01.2027-12-31\": 205250,\n", + " \"2028-01-01.2028-12-31\": 209500,\n", + " \"2029-01-01.2029-12-31\": 213650,\n", + " \"2030-01-01.2030-12-31\": 217900,\n", + " \"2031-01-01.2031-12-31\": 222250,\n", + " \"2032-01-01.2032-12-31\": 226600,\n", + " \"2033-01-01.2033-12-31\": 231100,\n", + " \"2034-01-01.2034-12-31\": 235700,\n", + " \"2035-01-01.2036-12-31\": 240350\n", + " },\n", + " \"gov.irs.deductions.qbi.phase_out.start.SEPARATE\": {\n", + " \"2026-01-01.2026-12-31\": 200300,\n", + " \"2027-01-01.2027-12-31\": 205250,\n", + " \"2028-01-01.2028-12-31\": 209500,\n", + " \"2029-01-01.2029-12-31\": 213650,\n", + " \"2030-01-01.2030-12-31\": 217950,\n", + " \"2031-01-01.2031-12-31\": 222250,\n", + " \"2032-01-01.2032-12-31\": 226600,\n", + " \"2033-01-01.2033-12-31\": 231100,\n", + " \"2034-01-01.2034-12-31\": 235700,\n", + " \"2035-01-01.2036-12-31\": 240350\n", + " },\n", + " \"gov.irs.deductions.qbi.max.business_property.rate\": {\n", + " \"2026-01-01.2100-12-31\": 0.025\n", + " },\n", + " \"gov.irs.deductions.qbi.phase_out.start.SURVIVING_SPOUSE\": {\n", + " \"2026-01-01.2026-12-31\": 400600,\n", + " \"2027-01-01.2027-12-31\": 410500,\n", + " \"2028-01-01.2028-12-31\": 419000,\n", + " \"2029-01-01.2029-12-31\": 427350,\n", + " \"2030-01-01.2030-12-31\": 435900,\n", + " \"2031-01-01.2031-12-31\": 444500,\n", + " \"2032-01-01.2032-12-31\": 453250,\n", + " \"2033-01-01.2033-12-31\": 462200,\n", + " \"2034-01-01.2034-12-31\": 471400,\n", + " \"2035-01-01.2036-12-31\": 480700\n", + " },\n", + " \"gov.irs.deductions.qbi.phase_out.start.HEAD_OF_HOUSEHOLD\": {\n", + " \"2026-01-01.2026-12-31\": 200300,\n", + " \"2027-01-01.2027-12-31\": 205250,\n", + " \"2028-01-01.2028-12-31\": 209500,\n", + " \"2029-01-01.2029-12-31\": 213650,\n", + " \"2030-01-01.2030-12-31\": 217950,\n", + " \"2031-01-01.2031-12-31\": 222250,\n", + " \"2032-01-01.2032-12-31\": 226600,\n", + " \"2033-01-01.2033-12-31\": 231100,\n", + " \"2034-01-01.2034-12-31\": 235700,\n", + " \"2035-01-01.2036-12-31\": 240350\n", + " }\n", + "}, country_id=\"us\")\n" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": {}, + "outputs": [], + "source": [ + "sd_reform = Reform.from_dict({\n", + " \"gov.irs.deductions.standard.amount.JOINT\": {\n", + " \"2025-01-01.2025-12-31\": 32000,\n", + " \"2026-01-01.2026-12-31\": 32400,\n", + " \"2027-01-01.2027-12-31\": 33200,\n", + " \"2028-01-01.2028-12-31\": 33800,\n", + " \"2029-01-01.2029-12-31\": 32400,\n", + " \"2030-01-01.2030-12-31\": 33100,\n", + " \"2031-01-01.2031-12-31\": 33700,\n", + " \"2032-01-01.2032-12-31\": 34400,\n", + " \"2033-01-01.2033-12-31\": 35100,\n", + " \"2034-01-01.2034-12-31\": 35800,\n", + " \"2035-01-01.2100-12-31\": 36500\n", + " },\n", + " \"gov.irs.deductions.standard.amount.SINGLE\": {\n", + " \"2025-01-01.2025-12-31\": 16000,\n", + " \"2026-01-01.2026-12-31\": 16200,\n", + " \"2027-01-01.2027-12-31\": 16600,\n", + " \"2028-01-01.2028-12-31\": 16900,\n", + " \"2029-01-01.2029-12-31\": 16200,\n", + " \"2030-01-01.2030-12-31\": 16550,\n", + " \"2031-01-01.2031-12-31\": 16850,\n", + " \"2032-01-01.2032-12-31\": 17200,\n", + " \"2033-01-01.2033-12-31\": 17550,\n", + " \"2034-01-01.2034-12-31\": 17900,\n", + " \"2035-01-01.2100-12-31\": 18250\n", + " },\n", + " \"gov.irs.deductions.standard.amount.SEPARATE\": {\n", + " \"2025-01-01.2025-12-31\": 16000,\n", + " \"2026-01-01.2026-12-31\": 16200,\n", + " \"2027-01-01.2027-12-31\": 16600,\n", + " \"2028-01-01.2028-12-31\": 16900,\n", + " \"2029-01-01.2029-12-31\": 16200,\n", + " \"2030-01-01.2030-12-31\": 16550,\n", + " \"2031-01-01.2031-12-31\": 16850,\n", + " \"2032-01-01.2032-12-31\": 17200,\n", + " \"2033-01-01.2033-12-31\": 17550,\n", + " \"2034-01-01.2034-12-31\": 17900,\n", + " \"2035-01-01.2100-12-31\": 18250\n", + " },\n", + " \"gov.irs.deductions.standard.amount.SURVIVING_SPOUSE\": {\n", + " \"2025-01-01.2025-12-31\": 32000,\n", + " \"2026-01-01.2026-12-31\": 32400,\n", + " \"2027-01-01.2027-12-31\": 33200,\n", + " \"2028-01-01.2028-12-31\": 33800,\n", + " \"2029-01-01.2029-12-31\": 32400,\n", + " \"2030-01-01.2030-12-31\": 33100,\n", + " \"2031-01-01.2031-12-31\": 33700,\n", + " \"2032-01-01.2032-12-31\": 34400,\n", + " \"2033-01-01.2033-12-31\": 35100,\n", + " \"2034-01-01.2034-12-31\": 35800,\n", + " \"2035-01-01.2100-12-31\": 36500\n", + " },\n", + " \"gov.irs.deductions.standard.amount.HEAD_OF_HOUSEHOLD\": {\n", + " \"2025-01-01.2025-12-31\": 24000,\n", + " \"2026-01-01.2026-12-31\": 24300,\n", + " \"2027-01-01.2027-12-31\": 24900,\n", + " \"2028-01-01.2028-12-31\": 25350,\n", + " \"2029-01-01.2029-12-31\": 24350,\n", + " \"2030-01-01.2030-12-31\": 24850,\n", + " \"2031-01-01.2031-12-31\": 25300,\n", + " \"2032-01-01.2032-12-31\": 25800,\n", + " \"2033-01-01.2033-12-31\": 26350,\n", + " \"2034-01-01.2034-12-31\": 26850,\n", + " \"2035-01-01.2100-12-31\": 27400\n", + " }\n", + "}, country_id=\"us\")\n" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": {}, + "outputs": [], + "source": [ + "exemption_reform = Reform.from_dict({\n", + " \"gov.irs.income.exemption.amount\": {\n", + " \"2026-01-01.2100-12-31\": 0\n", + " }\n", + "}, country_id=\"us\")" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": {}, + "outputs": [], + "source": [ + "ctc_reform = Reform.from_dict({\n", + " \"gov.irs.credits.ctc.amount.base[0].amount\": {\n", + " \"2026-01-01.2028-12-31\": 2500,\n", + " \"2029-01-01.2030-12-31\": 2200,\n", + " \"2031-01-01.2033-12-31\": 2300,\n", + " \"2034-01-01.2100-12-31\": 2400\n", + " },\n", + " \"gov.irs.credits.ctc.amount.adult_dependent\": {\n", + " \"2026-01-01.2100-12-31\": 500\n", + " },\n", + " \"gov.irs.credits.ctc.phase_out.threshold.JOINT\": {\n", + " \"2026-01-01.2100-12-31\": 400000\n", + " },\n", + " \"gov.irs.credits.ctc.refundable.individual_max\": {\n", + " \"2026-01-01.2026-12-31\": 1700,\n", + " \"2027-01-01.2028-12-31\": 1800,\n", + " \"2029-01-01.2031-12-31\": 1900,\n", + " \"2032-01-01.2033-12-31\": 2000,\n", + " \"2034-01-01.2100-12-31\": 2100\n", + " },\n", + " \"gov.irs.credits.ctc.phase_out.threshold.SINGLE\": {\n", + " \"2026-01-01.2100-12-31\": 200000\n", + " },\n", + " \"gov.irs.credits.ctc.phase_out.threshold.SEPARATE\": {\n", + " \"2026-01-01.2100-12-31\": 200000\n", + " },\n", + " \"gov.irs.credits.ctc.refundable.phase_in.threshold\": {\n", + " \"2026-01-01.2100-12-31\": 2500\n", + " },\n", + " \"gov.irs.credits.ctc.phase_out.threshold.SURVIVING_SPOUSE\": {\n", + " \"2026-01-01.2100-12-31\": 400000\n", + " },\n", + " \"gov.irs.credits.ctc.phase_out.threshold.HEAD_OF_HOUSEHOLD\": {\n", + " \"2026-01-01.2100-12-31\": 200000\n", + " }\n", + "}, country_id=\"us\")\n" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": {}, + "outputs": [], + "source": [ + "amt_reform = Reform.from_dict({\n", + " \"gov.irs.income.amt.exemption.amount.JOINT\": {\n", + " \"2026-01-01.2026-12-31\": 139000,\n", + " \"2027-01-01.2027-12-31\": 142500,\n", + " \"2028-01-01.2028-12-31\": 145500,\n", + " \"2029-01-01.2029-12-31\": 148400,\n", + " \"2030-01-01.2030-12-31\": 151300,\n", + " \"2031-01-01.2031-12-31\": 154300,\n", + " \"2032-01-01.2032-12-31\": 157400,\n", + " \"2033-01-01.2033-12-31\": 160500,\n", + " \"2034-01-01.2034-12-31\": 163700,\n", + " \"2035-01-01.2036-12-31\": 166900\n", + " },\n", + " \"gov.irs.income.amt.exemption.amount.SINGLE\": {\n", + " \"2026-01-01.2026-12-31\": 89400,\n", + " \"2027-01-01.2027-12-31\": 91700,\n", + " \"2028-01-01.2028-12-31\": 93500,\n", + " \"2029-01-01.2029-12-31\": 95400,\n", + " \"2030-01-01.2030-12-31\": 97300,\n", + " \"2031-01-01.2031-12-31\": 99200,\n", + " \"2032-01-01.2032-12-31\": 101200,\n", + " \"2033-01-01.2033-12-31\": 103200,\n", + " \"2034-01-01.2034-12-31\": 105300,\n", + " \"2035-01-01.2036-12-31\": 107300\n", + " },\n", + " \"gov.irs.income.amt.exemption.amount.SEPARATE\": {\n", + " \"2026-01-01.2026-12-31\": 69600,\n", + " \"2027-01-01.2027-12-31\": 71300,\n", + " \"2028-01-01.2028-12-31\": 72700,\n", + " \"2029-01-01.2029-12-31\": 74200,\n", + " \"2030-01-01.2030-12-31\": 75700,\n", + " \"2031-01-01.2031-12-31\": 77200,\n", + " \"2032-01-01.2032-12-31\": 78700,\n", + " \"2033-01-01.2033-12-31\": 80200,\n", + " \"2034-01-01.2034-12-31\": 81800,\n", + " \"2035-01-01.2036-12-31\": 83500\n", + " },\n", + " \"gov.irs.income.amt.exemption.phase_out.start.JOINT\": {\n", + " \"2026-01-01.2026-12-31\": 1271900,\n", + " \"2027-01-01.2027-12-31\": 1303200,\n", + " \"2028-01-01.2028-12-31\": 1330200,\n", + " \"2029-01-01.2029-12-31\": 1356800,\n", + " \"2030-01-01.2030-12-31\": 1383800,\n", + " \"2031-01-01.2031-12-31\": 1411200,\n", + " \"2032-01-01.2032-12-31\": 1438900,\n", + " \"2033-01-01.2033-12-31\": 1467400,\n", + " \"2034-01-01.2034-12-31\": 1496600,\n", + " \"2035-01-01.2036-12-31\": 1526100\n", + " },\n", + " \"gov.irs.income.amt.exemption.phase_out.start.SINGLE\": {\n", + " \"2026-01-01.2026-12-31\": 635900,\n", + " \"2027-01-01.2027-12-31\": 651600,\n", + " \"2028-01-01.2028-12-31\": 665100,\n", + " \"2029-01-01.2029-12-31\": 678400,\n", + " \"2030-01-01.2030-12-31\": 691900,\n", + " \"2031-01-01.2031-12-31\": 705600,\n", + " \"2032-01-01.2032-12-31\": 719500,\n", + " \"2033-01-01.2033-12-31\": 733700,\n", + " \"2034-01-01.2034-12-31\": 748300,\n", + " \"2035-01-01.2036-12-31\": 763100\n", + " },\n", + " \"gov.irs.income.amt.exemption.amount.SURVIVING_SPOUSE\": {\n", + " \"2026-01-01.2026-12-31\": 139100,\n", + " \"2027-01-01.2027-12-31\": 142500,\n", + " \"2028-01-01.2028-12-31\": 145500,\n", + " \"2029-01-01.2029-12-31\": 148400,\n", + " \"2030-01-01.2030-12-31\": 151300,\n", + " \"2031-01-01.2031-12-31\": 154300,\n", + " \"2032-01-01.2032-12-31\": 157400,\n", + " \"2033-01-01.2033-12-31\": 160500,\n", + " \"2034-01-01.2034-12-31\": 163700,\n", + " \"2035-01-01.2036-12-31\": 166900\n", + " },\n", + " \"gov.irs.income.amt.exemption.amount.HEAD_OF_HOUSEHOLD\": {\n", + " \"2026-01-01.2026-12-31\": 89400,\n", + " \"2027-01-01.2027-12-31\": 91700,\n", + " \"2028-01-01.2028-12-31\": 93600,\n", + " \"2029-01-01.2029-12-31\": 95400,\n", + " \"2030-01-01.2030-12-31\": 97300,\n", + " \"2031-01-01.2031-12-31\": 99200,\n", + " \"2032-01-01.2032-12-31\": 101200,\n", + " \"2033-01-01.2033-12-31\": 103200,\n", + " \"2034-01-01.2034-12-31\": 105300,\n", + " \"2035-01-01.2036-12-31\": 107300\n", + " },\n", + " \"gov.irs.income.amt.exemption.phase_out.start.SEPARATE\": {\n", + " \"2026-01-01.2026-12-31\": 635900,\n", + " \"2027-01-01.2027-12-31\": 651600,\n", + " \"2028-01-01.2028-12-31\": 665100,\n", + " \"2029-01-01.2029-12-31\": 678400,\n", + " \"2030-01-01.2030-12-31\": 691900,\n", + " \"2031-01-01.2031-12-31\": 705600,\n", + " \"2032-01-01.2032-12-31\": 719500,\n", + " \"2033-01-01.2033-12-31\": 733700,\n", + " \"2034-01-01.2034-12-31\": 748300,\n", + " \"2035-01-01.2036-12-31\": 763100\n", + " },\n", + " \"gov.irs.income.amt.exemption.phase_out.start.SURVIVING_SPOUSE\": {\n", + " \"2026-01-01.2026-12-31\": 1271900,\n", + " \"2027-01-01.2027-12-31\": 1303200,\n", + " \"2028-01-01.2028-12-31\": 1330200,\n", + " \"2029-01-01.2029-12-31\": 1356800,\n", + " \"2030-01-01.2030-12-31\": 1383800,\n", + " \"2031-01-01.2031-12-31\": 1411200,\n", + " \"2032-01-01.2032-12-31\": 1438900,\n", + " \"2033-01-01.2033-12-31\": 1467400,\n", + " \"2034-01-01.2034-12-31\": 1496600,\n", + " \"2035-01-01.2036-12-31\": 1526100\n", + " },\n", + " \"gov.irs.income.amt.exemption.phase_out.start.HEAD_OF_HOUSEHOLD\": {\n", + " \"2026-01-01.2026-12-31\": 635900,\n", + " \"2027-01-01.2027-12-31\": 651600,\n", + " \"2028-01-01.2028-12-31\": 665100,\n", + " \"2029-01-01.2029-12-31\": 678400,\n", + " \"2030-01-01.2030-12-31\": 691900,\n", + " \"2031-01-01.2031-12-31\": 705600,\n", + " \"2032-01-01.2032-12-31\": 719500,\n", + " \"2033-01-01.2033-12-31\": 733700,\n", + " \"2034-01-01.2034-12-31\": 748300,\n", + " \"2035-01-01.2036-12-31\": 763100\n", + " }\n", + "}, country_id=\"us\")\n" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": {}, + "outputs": [], + "source": [ + "various_itemized_deductions_reform = Reform.from_dict({\n", + " \"gov.irs.deductions.itemized.misc.applies\": {\n", + " \"2026-01-01.2100-12-31\": False\n", + " },\n", + " \"gov.irs.deductions.itemized.limitation.agi_rate\": {\n", + " \"2026-01-01.2100-12-31\": 0\n", + " },\n", + " \"gov.irs.deductions.itemized.interest.mortgage.cap.JOINT\": {\n", + " \"2026-01-01.2100-12-31\": 750000\n", + " },\n", + " \"gov.irs.deductions.itemized.interest.mortgage.cap.SINGLE\": {\n", + " \"2026-01-01.2100-12-31\": 750000\n", + " },\n", + " \"gov.irs.deductions.itemized.interest.mortgage.cap.SEPARATE\": {\n", + " \"2026-01-01.2100-12-31\": 375000\n", + " },\n", + " \"gov.irs.deductions.itemized.interest.mortgage.cap.SURVIVING_SPOUSE\": {\n", + " \"2026-01-01.2100-12-31\": 750000\n", + " },\n", + " \"gov.irs.deductions.itemized.interest.mortgage.cap.HEAD_OF_HOUSEHOLD\": {\n", + " \"2026-01-01.2100-12-31\": 750000\n", + " }\n", + "}, country_id=\"us\")" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": {}, + "outputs": [], + "source": [ + "qbid_reform.__name__ = \"QBID Reform\"\n", + "sd_reform.__name__ = \"Standard Deduction Reform\"\n", + "exemption_reform.__name__ = \"Exemption Reform\"\n", + "ctc_reform.__name__ = \"CTC Reform\"\n", + "amt_reform.__name__ = \"AMT Reform\"\n", + "various_itemized_deductions_reform.__name__ = \"Various Itemized Deductions Reform\"" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": {}, + "outputs": [], + "source": [ + "years = range(2026, 2036) # 2026 to 2035 inclusive\n", + "reforms = [qbid_reform, sd_reform, exemption_reform, ctc_reform, amt_reform, various_itemized_deductions_reform]\n", + "results_df = pd.DataFrame(columns=[\"Year\", \"Reform\", \"Baseline (billions)\", \"Reformed (billions)\", \"Impact (billions)\"])\n" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": {}, + "outputs": [], + "source": [ + "def calculate_budgetary_impact(reform, year):\n", + " print(f\"\\nCalculating for Year: {year}, Reform: {reform.__name__}...\")\n", + " \n", + " # Calculate baseline\n", + " baseline = Microsimulation(dataset=\"hf://policyengine/policyengine-us-data/enhanced_cps_2024.h5\")\n", + " baseline_income = baseline.calculate(\"income_tax\", map_to=\"household\", period=year).sum()\n", + " baseline_billions = baseline_income / 1e9 \n", + " # Calculate reformed\n", + " reformed = Microsimulation(reform=reform, dataset=\"hf://policyengine/policyengine-us-data/enhanced_cps_2024.h5\")\n", + " reformed_income = reformed.calculate(\"income_tax\", map_to=\"household\", period=year).sum()\n", + " reformed_billions = reformed_income / 1e9\n", + " \n", + " # Calculate impact\n", + " budgetary_impact = reformed_income - baseline_income\n", + " impact_billions = budgetary_impact / 1e9\n", + " print(f\" Budgetary Impact: ${impact_billions:.3f} billion\")\n", + " \n", + " # Add to results\n", + " global results_df\n", + " new_row = {\n", + " \"Year\": year,\n", + " \"Reform\": reform.__name__,\n", + " \"Baseline (billions)\": baseline_billions,\n", + " \"Reformed (billions)\": reformed_billions,\n", + " \"Impact (billions)\": impact_billions\n", + " }\n", + " results_df = pd.concat([results_df, pd.DataFrame([new_row])], ignore_index=True)\n", + " \n", + " return budgetary_impact " + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "Calculating for Year: 2026, Reform: QBID Reform...\n" + ] + } + ], + "source": [ + "# Run calculations\n", + "for year in years:\n", + " for reform in reforms:\n", + " calculate_budgetary_impact(reform, year)\n", + "\n", + "# Print final table (fixing the string formatting error)\n", + "print(\"\\nFinal Results Table:\")\n", + "print(\"=\" * 80)\n", + "pd.set_option('display.float_format', '${:.3f}'.format)\n", + "print(results_df)" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "pe", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.10.14" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/us/reconciliation/qbid_reform_results.csv b/us/reconciliation/qbid_reform_results.csv new file mode 100644 index 0000000..130bcf9 --- /dev/null +++ b/us/reconciliation/qbid_reform_results.csv @@ -0,0 +1,61 @@ +Year,Reform,Baseline (billions),Reformed (billions),Impact (billions) +2026,QBID Reform,3379.2737233089883,3362.4712669811934,-16.80245632779492 +2026,Standard Deduction Reform,3379.2737233089883,3199.3597652753933,-179.91395803359472 +2026,Exemption Reform,3379.2737233089883,3594.5168679542585,215.24314464527 +2026,CTC Reform,3379.2737233089883,3294.566057952336,-84.70766535665234 +2026,AMT Reform,3379.2737233089883,3338.8276300126586,-40.44609329632959 +2026,Various Itemized Deductions Reform,3379.2737233089883,3384.0627169804256,4.7889936714375 +2027,QBID Reform,3538.690260691642,3522.347389955693,-16.34287073594922 +2027,Standard Deduction Reform,3538.690260691642,3350.2455470833193,-188.44471360832276 +2027,Exemption Reform,3538.690260691642,3762.0849647171694,223.39470402552735 +2027,CTC Reform,3538.690260691642,3451.149952900955,-87.54030779068701 +2027,AMT Reform,3538.690260691642,3498.3220156760945,-40.36824501554785 +2027,Various Itemized Deductions Reform,3538.690260691642,3543.413323984922,4.723063293279785 +2028,QBID Reform,3689.458267105765,3673.41243190021,-16.045835205555175 +2028,Standard Deduction Reform,3689.458267105765,3496.3060388055196,-193.1522283002456 +2028,Exemption Reform,3689.458267105765,3919.382704364843,229.92443725907765 +2028,CTC Reform,3689.458267105765,3600.3278455685086,-89.13042153725635 +2028,AMT Reform,3689.458267105765,3647.674776366868,-41.78349073889697 +2028,Various Itemized Deductions Reform,3689.458267105765,3694.124426911028,4.666159805262695 +2029,QBID Reform,3857.090777943869,3841.8189312830114,-15.27184666085791 +2029,Standard Deduction Reform,3857.090777943869,3681.032105424857,-176.05867251901222 +2029,Exemption Reform,3857.090777943869,4093.7179794821423,236.62720153827294 +2029,CTC Reform,3857.090777943869,3776.8350863456735,-80.2556915981958 +2029,AMT Reform,3857.090777943869,3813.5113013467385,-43.579476597130856 +2029,Various Itemized Deductions Reform,3857.090777943869,3861.6646053538284,4.573827409959472 +2030,QBID Reform,4037.835860378826,4022.887756787492,-14.948103591333984 +2030,Standard Deduction Reform,4037.835860378826,3856.0717377883498,-181.76412259047657 +2030,Exemption Reform,4037.835860378826,4281.209813929198,243.37395355037256 +2030,CTC Reform,4037.835860378826,3956.632390395349,-81.20346998347705 +2030,AMT Reform,4037.835860378826,3991.8991515448065,-45.936708834019534 +2030,Various Itemized Deductions Reform,4037.835860378826,4042.281384957777,4.445524578950684 +2031,QBID Reform,4229.689514721946,4214.640546879314,-15.048967842632324 +2031,Standard Deduction Reform,4229.689514721946,4042.331374911234,-187.35813981071192 +2031,Exemption Reform,4229.689514721946,4482.191478270972,252.50196354902587 +2031,CTC Reform,4229.689514721946,4143.717255299784,-85.97225942216211 +2031,AMT Reform,4229.689514721946,4181.167647098045,-48.521867623901365 +2031,Various Itemized Deductions Reform,4229.689514721946,4233.973751736585,4.284237014638672 +2032,QBID Reform,4433.761382314238,4418.741370383734,-15.020011930504882 +2032,Standard Deduction Reform,4433.761382314238,4240.5760096470885,-193.1853726671499 +2032,Exemption Reform,4433.761382314238,4693.447334143243,259.68595182900486 +2032,CTC Reform,4433.761382314238,4345.911010028495,-87.85037228574316 +2032,AMT Reform,4433.761382314238,4382.675813058308,-51.085569255929684 +2032,Various Itemized Deductions Reform,4433.761382314238,4437.841271893082,4.07988957884375 +2033,QBID Reform,4643.153019368795,4627.767918599673,-15.38510076912207 +2033,Standard Deduction Reform,4643.153019368795,4442.287581988541,-200.8654373802539 +2033,Exemption Reform,4643.153019368795,4909.878786242849,266.7257668740537 +2033,CTC Reform,4643.153019368795,4554.043790858118,-89.10922851067676 +2033,AMT Reform,4643.153019368795,4589.7193479072785,-53.4336714615166 +2033,Various Itemized Deductions Reform,4643.153019368795,4646.97929465116,3.826275282365234 +2034,QBID Reform,4873.11790623036,4857.716110504404,-15.401795725956054 +2034,Standard Deduction Reform,4873.11790623036,4666.4613499993775,-206.65655623098243 +2034,Exemption Reform,4873.11790623036,5148.907286490375,275.78938026001464 +2034,CTC Reform,4873.11790623036,4778.125822871191,-94.99208335916894 +2034,AMT Reform,4873.11790623036,4816.69048833925,-56.42741789111035 +2034,Various Itemized Deductions Reform,4873.11790623036,4876.6498689365535,3.5319627061933594 +2035,QBID Reform,5111.9269297699675,5095.961586931694,-15.965342838273438 +2035,Standard Deduction Reform,5111.9269297699675,4899.394314743904,-212.53261502606347 +2035,Exemption Reform,5111.9269297699675,5395.764323394323,283.8373936243545 +2035,CTC Reform,5111.9269297699675,5015.790789171094,-96.13614059887402 +2035,AMT Reform,5111.9269297699675,5054.293364478989,-57.63356529097852 +2035,Various Itemized Deductions Reform,5111.9269297699675,5115.291186932494,3.3642571625263673 From 56b7a1f35a236da1abb2236edd7df6135d0a574f Mon Sep 17 00:00:00 2001 From: PavelMakarchuk Date: Mon, 12 May 2025 14:05:39 -0400 Subject: [PATCH 2/3] add sequencing to the notebook --- us/reconciliation/2026_reconciliation.ipynb | 564 ++++++++++++++---- .../sequential_tax_reform_results_copy.csv | 100 ++++ 2 files changed, 564 insertions(+), 100 deletions(-) create mode 100644 us/reconciliation/sequential_tax_reform_results_copy.csv diff --git a/us/reconciliation/2026_reconciliation.ipynb b/us/reconciliation/2026_reconciliation.ipynb index 1ed6abc..0e0359e 100644 --- a/us/reconciliation/2026_reconciliation.ipynb +++ b/us/reconciliation/2026_reconciliation.ipynb @@ -2,18 +2,9 @@ "cells": [ { "cell_type": "code", - "execution_count": 1, + "execution_count": 23, "metadata": {}, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "/Users/pavelmakarchuk/anaconda3/envs/pe/lib/python3.10/site-packages/tqdm/auto.py:21: TqdmWarning: IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html\n", - " from .autonotebook import tqdm as notebook_tqdm\n" - ] - } - ], + "outputs": [], "source": [ "from policyengine_us import Microsimulation\n", "from policyengine_core.reforms import Reform\n", @@ -22,7 +13,23 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 24, + "metadata": {}, + "outputs": [], + "source": [ + "baseline_branching_reform = Reform.from_dict(\n", + " {\n", + " \"gov.simulation.branch_to_determine_itemization\": {\n", + " \"2026-01-01.2100-12-31\": True\n", + " },\n", + " },\n", + " country_id=\"us\",\n", + ")" + ] + }, + { + "cell_type": "code", + "execution_count": 25, "metadata": {}, "outputs": [], "source": [ @@ -107,7 +114,7 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 26, "metadata": {}, "outputs": [], "source": [ @@ -182,7 +189,7 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 27, "metadata": {}, "outputs": [], "source": [ @@ -195,51 +202,7 @@ }, { "cell_type": "code", - "execution_count": 5, - "metadata": {}, - "outputs": [], - "source": [ - "ctc_reform = Reform.from_dict({\n", - " \"gov.irs.credits.ctc.amount.base[0].amount\": {\n", - " \"2026-01-01.2028-12-31\": 2500,\n", - " \"2029-01-01.2030-12-31\": 2200,\n", - " \"2031-01-01.2033-12-31\": 2300,\n", - " \"2034-01-01.2100-12-31\": 2400\n", - " },\n", - " \"gov.irs.credits.ctc.amount.adult_dependent\": {\n", - " \"2026-01-01.2100-12-31\": 500\n", - " },\n", - " \"gov.irs.credits.ctc.phase_out.threshold.JOINT\": {\n", - " \"2026-01-01.2100-12-31\": 400000\n", - " },\n", - " \"gov.irs.credits.ctc.refundable.individual_max\": {\n", - " \"2026-01-01.2026-12-31\": 1700,\n", - " \"2027-01-01.2028-12-31\": 1800,\n", - " \"2029-01-01.2031-12-31\": 1900,\n", - " \"2032-01-01.2033-12-31\": 2000,\n", - " \"2034-01-01.2100-12-31\": 2100\n", - " },\n", - " \"gov.irs.credits.ctc.phase_out.threshold.SINGLE\": {\n", - " \"2026-01-01.2100-12-31\": 200000\n", - " },\n", - " \"gov.irs.credits.ctc.phase_out.threshold.SEPARATE\": {\n", - " \"2026-01-01.2100-12-31\": 200000\n", - " },\n", - " \"gov.irs.credits.ctc.refundable.phase_in.threshold\": {\n", - " \"2026-01-01.2100-12-31\": 2500\n", - " },\n", - " \"gov.irs.credits.ctc.phase_out.threshold.SURVIVING_SPOUSE\": {\n", - " \"2026-01-01.2100-12-31\": 400000\n", - " },\n", - " \"gov.irs.credits.ctc.phase_out.threshold.HEAD_OF_HOUSEHOLD\": {\n", - " \"2026-01-01.2100-12-31\": 200000\n", - " }\n", - "}, country_id=\"us\")\n" - ] - }, - { - "cell_type": "code", - "execution_count": 6, + "execution_count": 28, "metadata": {}, "outputs": [], "source": [ @@ -369,7 +332,7 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 29, "metadata": {}, "outputs": [], "source": [ @@ -400,64 +363,426 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 30, "metadata": {}, "outputs": [], "source": [ - "qbid_reform.__name__ = \"QBID Reform\"\n", + "tax_rate_reform = Reform.from_dict({\n", + " \"gov.irs.income.bracket.rates.2\": {\n", + " \"2026-01-01.2100-12-31\": 0.12\n", + " },\n", + " \"gov.irs.income.bracket.rates.3\": {\n", + " \"2026-01-01.2100-12-31\": 0.22\n", + " },\n", + " \"gov.irs.income.bracket.rates.4\": {\n", + " \"2026-01-01.2100-12-31\": 0.24\n", + " },\n", + " \"gov.irs.income.bracket.rates.5\": {\n", + " \"2026-01-01.2100-12-31\": 0.32\n", + " },\n", + " \"gov.irs.income.bracket.rates.7\": {\n", + " \"2026-01-01.2100-12-31\": 0.37\n", + " },\n", + " \"gov.irs.income.bracket.thresholds.3.JOINT\": {\n", + " \"2026-01-01.2026-12-31\": 208300,\n", + " \"2027-01-01.2027-12-31\": 213400,\n", + " \"2028-01-01.2028-12-31\": 217850,\n", + " \"2029-01-01.2029-12-31\": 222200,\n", + " \"2030-01-01.2030-12-31\": 226650,\n", + " \"2031-01-01.2031-12-31\": 231100,\n", + " \"2032-01-01.2032-12-31\": 235650,\n", + " \"2033-01-01.2033-12-31\": 240300,\n", + " \"2034-01-01.2034-12-31\": 245100,\n", + " \"2035-01-01.2036-12-31\": 249950\n", + " },\n", + " \"gov.irs.income.bracket.thresholds.4.JOINT\": {\n", + " \"2026-01-01.2026-12-31\": 397650,\n", + " \"2027-01-01.2027-12-31\": 407450,\n", + " \"2028-01-01.2028-12-31\": 415900,\n", + " \"2029-01-01.2029-12-31\": 424250,\n", + " \"2030-01-01.2030-12-31\": 432700,\n", + " \"2031-01-01.2031-12-31\": 441250,\n", + " \"2032-01-01.2032-12-31\": 449900,\n", + " \"2033-01-01.2033-12-31\": 458800,\n", + " \"2034-01-01.2034-12-31\": 467950,\n", + " \"2035-01-01.2036-12-31\": 477150\n", + " },\n", + " \"gov.irs.income.bracket.thresholds.5.JOINT\": {\n", + " \"2026-01-01.2026-12-31\": 512950,\n", + " \"2027-01-01.2027-12-31\": 525600,\n", + " \"2028-01-01.2028-12-31\": 536500,\n", + " \"2029-01-01.2029-12-31\": 547200,\n", + " \"2030-01-01.2030-12-31\": 558100,\n", + " \"2031-01-01.2031-12-31\": 569150,\n", + " \"2032-01-01.2032-12-31\": 580350,\n", + " \"2033-01-01.2033-12-31\": 591800,\n", + " \"2034-01-01.2034-12-31\": 603550,\n", + " \"2035-01-01.2037-12-31\": 615500\n", + " },\n", + " \"gov.irs.income.bracket.thresholds.6.JOINT\": {\n", + " \"2026-01-01.2026-12-31\": 772750,\n", + " \"2027-01-01.2027-12-31\": 791800,\n", + " \"2028-01-01.2028-12-31\": 808200,\n", + " \"2029-01-01.2029-12-31\": 824400,\n", + " \"2030-01-01.2030-12-31\": 840800,\n", + " \"2031-01-01.2031-12-31\": 857400,\n", + " \"2032-01-01.2032-12-31\": 874250,\n", + " \"2033-01-01.2033-12-31\": 891550,\n", + " \"2034-01-01.2034-12-31\": 909300,\n", + " \"2035-01-01.2036-12-31\": 927250\n", + " },\n", + " \"gov.irs.income.bracket.thresholds.3.SINGLE\": {\n", + " \"2026-01-01.2026-12-31\": 104900,\n", + " \"2027-01-01.2027-12-31\": 107500,\n", + " \"2028-01-01.2028-12-31\": 109700,\n", + " \"2029-01-01.2029-12-31\": 111900,\n", + " \"2030-01-01.2030-12-31\": 114150,\n", + " \"2031-01-01.2031-12-31\": 116400,\n", + " \"2032-01-01.2032-12-31\": 118700,\n", + " \"2033-01-01.2033-12-31\": 121050,\n", + " \"2034-01-01.2034-12-31\": 123450,\n", + " \"2035-01-01.2036-12-31\": 125900\n", + " },\n", + " \"gov.irs.income.bracket.thresholds.4.SINGLE\": {\n", + " \"2026-01-01.2026-12-31\": 198800,\n", + " \"2027-01-01.2027-12-31\": 203700,\n", + " \"2028-01-01.2028-12-31\": 207950,\n", + " \"2029-01-01.2029-12-31\": 212100,\n", + " \"2030-01-01.2030-12-31\": 216350,\n", + " \"2031-01-01.2031-12-31\": 220600,\n", + " \"2032-01-01.2032-12-31\": 224950,\n", + " \"2033-01-01.2033-12-31\": 229400,\n", + " \"2034-01-01.2034-12-31\": 233950,\n", + " \"2035-01-01.2036-12-31\": 238550\n", + " },\n", + " \"gov.irs.income.bracket.thresholds.5.SINGLE\": {\n", + " \"2026-01-01.2026-12-31\": 256450,\n", + " \"2027-01-01.2027-12-31\": 262800,\n", + " \"2028-01-01.2028-12-31\": 268250,\n", + " \"2029-01-01.2029-12-31\": 273600,\n", + " \"2030-01-01.2030-12-31\": 279050,\n", + " \"2031-01-01.2031-12-31\": 284550,\n", + " \"2032-01-01.2032-12-31\": 290150,\n", + " \"2033-01-01.2033-12-31\": 295900,\n", + " \"2034-01-01.2034-12-31\": 301750,\n", + " \"2035-01-01.2100-12-31\": 307750\n", + " },\n", + " \"gov.irs.income.bracket.thresholds.6.SINGLE\": {\n", + " \"2026-01-01.2026-12-31\": 643950,\n", + " \"2027-01-01.2027-12-31\": 659800,\n", + " \"2028-01-01.2028-12-31\": 673500,\n", + " \"2029-01-01.2029-12-31\": 687000,\n", + " \"2030-01-01.2030-12-31\": 700650,\n", + " \"2031-01-01.2031-12-31\": 714500,\n", + " \"2032-01-01.2032-12-31\": 728550,\n", + " \"2033-01-01.2033-12-31\": 742950,\n", + " \"2034-01-01.2034-12-31\": 757750,\n", + " \"2035-01-01.2036-12-31\": 772700\n", + " },\n", + " \"gov.irs.income.bracket.thresholds.3.SEPARATE\": {\n", + " \"2026-01-01.2026-12-31\": 104900,\n", + " \"2027-01-01.2027-12-31\": 107500,\n", + " \"2028-01-01.2028-12-31\": 109700,\n", + " \"2029-01-01.2029-12-31\": 111900,\n", + " \"2030-01-01.2030-12-31\": 114150,\n", + " \"2031-01-01.2031-12-31\": 116400,\n", + " \"2032-01-01.2032-12-31\": 118700,\n", + " \"2033-01-01.2033-12-31\": 121050,\n", + " \"2034-01-01.2034-12-31\": 123450,\n", + " \"2035-01-01.2036-12-31\": 125900\n", + " },\n", + " \"gov.irs.income.bracket.thresholds.4.SEPARATE\": {\n", + " \"2026-01-01.2026-12-31\": 198800,\n", + " \"2027-01-01.2027-12-31\": 203700,\n", + " \"2028-01-01.2028-12-31\": 207950,\n", + " \"2029-01-01.2029-12-31\": 212100,\n", + " \"2030-01-01.2030-12-31\": 216350,\n", + " \"2031-01-01.2031-12-31\": 220600,\n", + " \"2032-01-01.2032-12-31\": 224950,\n", + " \"2033-01-01.2033-12-31\": 229400,\n", + " \"2034-01-01.2034-12-31\": 233950,\n", + " \"2035-01-01.2036-12-31\": 238550\n", + " },\n", + " \"gov.irs.income.bracket.thresholds.5.SEPARATE\": {\n", + " \"2026-01-01.2026-12-31\": 256450,\n", + " \"2027-01-01.2027-12-31\": 262800,\n", + " \"2028-01-01.2028-12-31\": 268250,\n", + " \"2029-01-01.2029-12-31\": 273600,\n", + " \"2030-01-01.2030-12-31\": 279050,\n", + " \"2031-01-01.2031-12-31\": 284550,\n", + " \"2032-01-01.2032-12-31\": 290150,\n", + " \"2033-01-01.2033-12-31\": 295900,\n", + " \"2034-01-01.2034-12-31\": 301750,\n", + " \"2035-01-01.2100-12-31\": 307750\n", + " },\n", + " \"gov.irs.income.bracket.thresholds.6.SEPARATE\": {\n", + " \"2026-01-01.2026-12-31\": 386350,\n", + " \"2027-01-01.2027-12-31\": 395900,\n", + " \"2028-01-01.2028-12-31\": 404100,\n", + " \"2029-01-01.2029-12-31\": 412200,\n", + " \"2030-01-01.2030-12-31\": 420400,\n", + " \"2031-01-01.2031-12-31\": 428700,\n", + " \"2032-01-01.2032-12-31\": 437100,\n", + " \"2033-01-01.2033-12-31\": 445750,\n", + " \"2034-01-01.2034-12-31\": 454650,\n", + " \"2035-01-01.2036-12-31\": 463600\n", + " },\n", + " \"gov.irs.income.bracket.thresholds.3.SURVIVING_SPOUSE\": {\n", + " \"2026-01-01.2026-12-31\": 208300,\n", + " \"2027-01-01.2027-12-31\": 213400,\n", + " \"2028-01-01.2028-12-31\": 217850,\n", + " \"2029-01-01.2029-12-31\": 222200,\n", + " \"2030-01-01.2030-12-31\": 226650,\n", + " \"2031-01-01.2031-12-31\": 231100,\n", + " \"2032-01-01.2032-12-31\": 235650,\n", + " \"2033-01-01.2033-12-31\": 240300,\n", + " \"2034-01-01.2034-12-31\": 245100,\n", + " \"2035-01-01.2036-12-31\": 249950\n", + " },\n", + " \"gov.irs.income.bracket.thresholds.4.SURVIVING_SPOUSE\": {\n", + " \"2026-01-01.2026-12-31\": 397650,\n", + " \"2027-01-01.2027-12-31\": 407450,\n", + " \"2028-01-01.2028-12-31\": 415900,\n", + " \"2029-01-01.2029-12-31\": 424250,\n", + " \"2030-01-01.2030-12-31\": 432700,\n", + " \"2031-01-01.2031-12-31\": 441250,\n", + " \"2032-01-01.2032-12-31\": 449900,\n", + " \"2033-01-01.2033-12-31\": 458800,\n", + " \"2034-01-01.2034-12-31\": 467950,\n", + " \"2035-01-01.2036-12-31\": 477150\n", + " },\n", + " \"gov.irs.income.bracket.thresholds.5.SURVIVING_SPOUSE\": {\n", + " \"2026-01-01.2026-12-31\": 512950,\n", + " \"2027-01-01.2027-12-31\": 525600,\n", + " \"2028-01-01.2028-12-31\": 536500,\n", + " \"2029-01-01.2029-12-31\": 547200,\n", + " \"2030-01-01.2030-12-31\": 558100,\n", + " \"2031-01-01.2031-12-31\": 569150,\n", + " \"2032-01-01.2032-12-31\": 580350,\n", + " \"2033-01-01.2033-12-31\": 591800,\n", + " \"2034-01-01.2034-12-31\": 603550,\n", + " \"2035-01-01.2037-12-31\": 615500\n", + " },\n", + " \"gov.irs.income.bracket.thresholds.6.SURVIVING_SPOUSE\": {\n", + " \"2026-01-01.2026-12-31\": 772750,\n", + " \"2027-01-01.2027-12-31\": 791800,\n", + " \"2028-01-01.2028-12-31\": 808200,\n", + " \"2029-01-01.2029-12-31\": 824400,\n", + " \"2030-01-01.2030-12-31\": 840800,\n", + " \"2031-01-01.2031-12-31\": 857400,\n", + " \"2032-01-01.2032-12-31\": 874250,\n", + " \"2033-01-01.2033-12-31\": 891550,\n", + " \"2034-01-01.2034-12-31\": 909300,\n", + " \"2035-01-01.2036-12-31\": 927300\n", + " },\n", + " \"gov.irs.income.bracket.thresholds.3.HEAD_OF_HOUSEHOLD\": {\n", + " \"2026-01-01.2026-12-31\": 104900,\n", + " \"2027-01-01.2027-12-31\": 107500,\n", + " \"2028-01-01.2028-12-31\": 109700,\n", + " \"2029-01-01.2029-12-31\": 111900,\n", + " \"2030-01-01.2030-12-31\": 114150,\n", + " \"2031-01-01.2031-12-31\": 116400,\n", + " \"2032-01-01.2032-12-31\": 118700,\n", + " \"2033-01-01.2033-12-31\": 121050,\n", + " \"2034-01-01.2034-12-31\": 123450,\n", + " \"2035-01-01.2036-12-31\": 125900\n", + " },\n", + " \"gov.irs.income.bracket.thresholds.4.HEAD_OF_HOUSEHOLD\": {\n", + " \"2026-01-01.2026-12-31\": 198800,\n", + " \"2027-01-01.2027-12-31\": 203700,\n", + " \"2028-01-01.2028-12-31\": 207950,\n", + " \"2029-01-01.2029-12-31\": 212100,\n", + " \"2030-01-01.2030-12-31\": 216350,\n", + " \"2031-01-01.2031-12-31\": 220600,\n", + " \"2032-01-01.2032-12-31\": 224950,\n", + " \"2033-01-01.2033-12-31\": 229400,\n", + " \"2034-01-01.2034-12-31\": 233950,\n", + " \"2035-01-01.2036-12-31\": 238550\n", + " },\n", + " \"gov.irs.income.bracket.thresholds.5.HEAD_OF_HOUSEHOLD\": {\n", + " \"2026-01-01.2026-12-31\": 256486,\n", + " \"2027-01-01.2027-12-31\": 262806,\n", + " \"2028-01-01.2028-12-31\": 268250,\n", + " \"2029-01-01.2029-12-31\": 273621,\n", + " \"2030-01-01.2030-12-31\": 279065,\n", + " \"2031-01-01.2031-12-31\": 284584,\n", + " \"2032-01-01.2032-12-31\": 290175,\n", + " \"2033-01-01.2033-12-31\": 295914,\n", + " \"2034-01-01.2034-12-31\": 301800,\n", + " \"2035-01-01.2036-12-31\": 307759\n", + " },\n", + " \"gov.irs.income.bracket.thresholds.6.HEAD_OF_HOUSEHOLD\": {\n", + " \"2026-01-01.2026-12-31\": 643950,\n", + " \"2027-01-01.2027-12-31\": 659800,\n", + " \"2028-01-01.2028-12-31\": 673500,\n", + " \"2029-01-01.2029-12-31\": 687000,\n", + " \"2030-01-01.2030-12-31\": 700650,\n", + " \"2031-01-01.2031-12-31\": 714500,\n", + " \"2032-01-01.2032-12-31\": 728550,\n", + " \"2033-01-01.2033-12-31\": 742950,\n", + " \"2034-01-01.2034-12-31\": 757750,\n", + " \"2035-01-01.2036-12-31\": 772700\n", + " }\n", + "}, country_id=\"us\")\n" + ] + }, + { + "cell_type": "code", + "execution_count": 31, + "metadata": {}, + "outputs": [], + "source": [ + "ctc_expansion_reform = Reform.from_dict({\n", + " \"gov.irs.credits.ctc.amount.base[0].amount\": {\n", + " \"2026-01-01.2028-12-31\": 2000,\n", + " \"2029-01-01.2030-12-31\": 2200,\n", + " \"2031-01-01.2033-12-31\": 2300,\n", + " \"2034-01-01.2100-12-31\": 2400\n", + " },\n", + " \"gov.irs.credits.ctc.amount.adult_dependent\": {\n", + " \"2026-01-01.2100-12-31\": 500\n", + " },\n", + " \"gov.irs.credits.ctc.phase_out.threshold.JOINT\": {\n", + " \"2026-01-01.2100-12-31\": 400000\n", + " },\n", + " \"gov.irs.credits.ctc.refundable.individual_max\": {\n", + " \"2026-01-01.2026-12-31\": 1700,\n", + " \"2027-01-01.2028-12-31\": 1800,\n", + " \"2029-01-01.2031-12-31\": 1900,\n", + " \"2032-01-01.2033-12-31\": 2000,\n", + " \"2034-01-01.2100-12-31\": 2100\n", + " },\n", + " \"gov.irs.credits.ctc.phase_out.threshold.SINGLE\": {\n", + " \"2026-01-01.2100-12-31\": 200000\n", + " },\n", + " \"gov.irs.credits.ctc.phase_out.threshold.SEPARATE\": {\n", + " \"2026-01-01.2100-12-31\": 200000\n", + " },\n", + " \"gov.irs.credits.ctc.refundable.phase_in.threshold\": {\n", + " \"2026-01-01.2100-12-31\": 2500\n", + " },\n", + " \"gov.irs.credits.ctc.phase_out.threshold.SURVIVING_SPOUSE\": {\n", + " \"2026-01-01.2100-12-31\": 400000\n", + " },\n", + " \"gov.irs.credits.ctc.phase_out.threshold.HEAD_OF_HOUSEHOLD\": {\n", + " \"2026-01-01.2100-12-31\": 200000\n", + " }\n", + "}, country_id=\"us\")" + ] + }, + { + "cell_type": "code", + "execution_count": 32, + "metadata": {}, + "outputs": [], + "source": [ + "ctc_temp_enhancement_reform = Reform.from_dict({\n", + " \"gov.irs.credits.ctc.amount.base[0].amount\": {\n", + " \"2025-01-01.2028-12-31\": 2500,\n", + " }\n", + "}, country_id=\"us\")" + ] + }, + { + "cell_type": "code", + "execution_count": 33, + "metadata": {}, + "outputs": [], + "source": [ + "tax_rate_reform.__name__ = \"Tax Rate Reform\"\n", "sd_reform.__name__ = \"Standard Deduction Reform\"\n", "exemption_reform.__name__ = \"Exemption Reform\"\n", - "ctc_reform.__name__ = \"CTC Reform\"\n", + "ctc_expansion_reform.__name__ = \"CTC Expansion Reform\"\n", + "ctc_temp_enhancement_reform.__name__ = \"CTC Temporary Enhancement Reform\"\n", + "qbid_reform.__name__ = \"QBID Reform\"\n", "amt_reform.__name__ = \"AMT Reform\"\n", "various_itemized_deductions_reform.__name__ = \"Various Itemized Deductions Reform\"" ] }, { "cell_type": "code", - "execution_count": 9, + "execution_count": 34, + "metadata": {}, + "outputs": [], + "source": [ + "years = range(2025, 2036) # 2025 to 2035 inclusive\n", + "reforms = [tax_rate_reform, sd_reform, exemption_reform, ctc_expansion_reform, ctc_temp_enhancement_reform, qbid_reform, amt_reform, various_itemized_deductions_reform]\n" + ] + }, + { + "cell_type": "code", + "execution_count": 35, "metadata": {}, "outputs": [], "source": [ - "years = range(2026, 2036) # 2026 to 2035 inclusive\n", - "reforms = [qbid_reform, sd_reform, exemption_reform, ctc_reform, amt_reform, various_itemized_deductions_reform]\n", - "results_df = pd.DataFrame(columns=[\"Year\", \"Reform\", \"Baseline (billions)\", \"Reformed (billions)\", \"Impact (billions)\"])\n" + "# Initialize results DataFrame\n", + "results_df = pd.DataFrame(columns=[\"Year\", \"Reform\", \"Impact (billions)\"])" ] }, { "cell_type": "code", - "execution_count": 10, + "execution_count": 36, "metadata": {}, "outputs": [], "source": [ - "def calculate_budgetary_impact(reform, year):\n", - " print(f\"\\nCalculating for Year: {year}, Reform: {reform.__name__}...\")\n", + "def calculate_stacked_budgetary_impact(reforms, year, results_df):\n", + " \"\"\"\n", + " Calculate the incremental budgetary impact of each reform when applied sequentially.\n", + " \n", + " Parameters:\n", + " reforms - List of reform objects\n", + " year - Year to perform calculation for\n", + " results_df - DataFrame to append results to\n", " \n", - " # Calculate baseline\n", - " baseline = Microsimulation(dataset=\"hf://policyengine/policyengine-us-data/enhanced_cps_2024.h5\")\n", + " Returns:\n", + " Updated results_df with new rows\n", + " \"\"\"\n", + " # Start with baseline\n", + " baseline = Microsimulation(\n", + " reform=baseline_branching_reform, \n", + " dataset=\"hf://policyengine/policyengine-us-data/enhanced_cps_2024.h5\"\n", + " )\n", " baseline_income = baseline.calculate(\"income_tax\", map_to=\"household\", period=year).sum()\n", - " baseline_billions = baseline_income / 1e9 \n", - " # Calculate reformed\n", - " reformed = Microsimulation(reform=reform, dataset=\"hf://policyengine/policyengine-us-data/enhanced_cps_2024.h5\")\n", - " reformed_income = reformed.calculate(\"income_tax\", map_to=\"household\", period=year).sum()\n", - " reformed_billions = reformed_income / 1e9\n", " \n", - " # Calculate impact\n", - " budgetary_impact = reformed_income - baseline_income\n", - " impact_billions = budgetary_impact / 1e9\n", - " print(f\" Budgetary Impact: ${impact_billions:.3f} billion\")\n", + " previous_income = baseline_income\n", + " cumulative_reform = baseline_branching_reform\n", " \n", - " # Add to results\n", - " global results_df\n", - " new_row = {\n", - " \"Year\": year,\n", - " \"Reform\": reform.__name__,\n", - " \"Baseline (billions)\": baseline_billions,\n", - " \"Reformed (billions)\": reformed_billions,\n", - " \"Impact (billions)\": impact_billions\n", - " }\n", - " results_df = pd.concat([results_df, pd.DataFrame([new_row])], ignore_index=True)\n", + " print(f\"\\nCalculating sequential reforms for Year: {year}...\")\n", " \n", - " return budgetary_impact " + " for i, reform in enumerate(reforms):\n", + " # Add the current reform to the cumulative reform\n", + " if i == 0:\n", + " # For the first reform, start with baseline_branching_reform and add the current reform\n", + " cumulative_reform = (baseline_branching_reform, reform)\n", + " else:\n", + " # For subsequent reforms, add to the already existing cumulative reform\n", + " cumulative_reform = (cumulative_reform, reform)\n", + " \n", + " # Calculate with the cumulative reform\n", + " reformed = Microsimulation(\n", + " reform=cumulative_reform, \n", + " dataset=\"hf://policyengine/policyengine-us-data/enhanced_cps_2024.h5\"\n", + " )\n", + " reformed_income = reformed.calculate(\"income_tax\", map_to=\"household\", period=year).sum()\n", + " \n", + " # Calculate impact compared to the previous state\n", + " budgetary_impact = reformed_income - previous_income\n", + " impact_billions = budgetary_impact / 1e9\n", + " \n", + " print(f\" {reform.__name__}: ${impact_billions:.3f} billion\")\n", + " \n", + " # Add to results\n", + " new_row = {\n", + " \"Year\": year,\n", + " \"Reform\": reform.__name__,\n", + " \"Impact (billions)\": impact_billions\n", + " }\n", + " results_df = pd.concat([results_df, pd.DataFrame([new_row])], ignore_index=True)\n", + " \n", + " # Update for next iteration\n", + " previous_income = reformed_income\n", + " \n", + " return results_df" ] }, { @@ -470,22 +795,61 @@ "output_type": "stream", "text": [ "\n", - "Calculating for Year: 2026, Reform: QBID Reform...\n" + "Calculating sequential reforms for Year: 2026...\n", + " Tax Rate Reform: $-197.115 billion\n", + " Standard Deduction Reform: $-143.689 billion\n", + " Exemption Reform: $140.173 billion\n", + " CTC Expansion Reform: $-68.089 billion\n" ] } ], "source": [ - "# Run calculations\n", + "# Run calculations for each year\n", "for year in years:\n", - " for reform in reforms:\n", - " calculate_budgetary_impact(reform, year)\n", - "\n", - "# Print final table (fixing the string formatting error)\n", + " results_df = calculate_stacked_budgetary_impact(reforms, year, results_df)" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "Final Results Table:\n", + "================================================================================\n", + "Empty DataFrame\n", + "Columns: [Year, Reform, Impact (billions)]\n", + "Index: []\n" + ] + } + ], + "source": [ + "# Print final table\n", "print(\"\\nFinal Results Table:\")\n", "print(\"=\" * 80)\n", - "pd.set_option('display.float_format', '${:.3f}'.format)\n", - "print(results_df)" + "pd.set_option('display.float_format', '{:.3f}'.format)\n", + "print(results_df)\n" ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": {}, + "outputs": [], + "source": [ + "results_df.to_csv(\"sequential_tax_reform_results.csv\", index=False)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] } ], "metadata": { diff --git a/us/reconciliation/sequential_tax_reform_results_copy.csv b/us/reconciliation/sequential_tax_reform_results_copy.csv new file mode 100644 index 0000000..bd449da --- /dev/null +++ b/us/reconciliation/sequential_tax_reform_results_copy.csv @@ -0,0 +1,100 @@ + +Calculating sequential reforms for Year: 2026... + Tax Rate Reform: $-197.115 billion + Standard Deduction Reform: $-143.689 billion + Exemption Reform: $140.173 billion + CTC Expansion Reform: $-68.089 billion + CTC Temporary Enhancement Reform: $-19.852 billion + QBID Reform: $-15.616 billion + AMT Reform: $-142.841 billion + Various Itemized Deductions Reform: $5.570 billion + +Calculating sequential reforms for Year: 2027... + Tax Rate Reform: $-208.250 billion + Standard Deduction Reform: $-149.539 billion + Exemption Reform: $143.150 billion + CTC Expansion Reform: $-70.055 billion + CTC Temporary Enhancement Reform: $-20.154 billion + QBID Reform: $-15.331 billion + AMT Reform: $-150.602 billion + Various Itemized Deductions Reform: $5.587 billion + +Calculating sequential reforms for Year: 2028... + Tax Rate Reform: $-216.887 billion + Standard Deduction Reform: $-152.213 billion + Exemption Reform: $145.951 billion + CTC Expansion Reform: $-71.332 billion + CTC Temporary Enhancement Reform: $-20.338 billion + QBID Reform: $-15.029 billion + AMT Reform: $-158.463 billion + Various Itemized Deductions Reform: $5.569 billion + +Calculating sequential reforms for Year: 2029... + Tax Rate Reform: $-226.435 billion + Standard Deduction Reform: $-138.774 billion + Exemption Reform: $154.168 billion + CTC Expansion Reform: $-81.961 billion + CTC Temporary Enhancement Reform: $0.000 billion + QBID Reform: $-14.454 billion + AMT Reform: $-163.119 billion + Various Itemized Deductions Reform: $5.571 billion + +Calculating sequential reforms for Year: 2030... + Tax Rate Reform: $-235.817 billion + Standard Deduction Reform: $-142.397 billion + Exemption Reform: $156.989 billion + CTC Expansion Reform: $-82.881 billion + CTC Temporary Enhancement Reform: $0.000 billion + QBID Reform: $-14.279 billion + AMT Reform: $-171.762 billion + Various Itemized Deductions Reform: $5.450 billion + +Calculating sequential reforms for Year: 2031... + Tax Rate Reform: $-245.182 billion + Standard Deduction Reform: $-145.912 billion + Exemption Reform: $161.335 billion + CTC Expansion Reform: $-88.026 billion + CTC Temporary Enhancement Reform: $0.000 billion + QBID Reform: $-14.592 billion + AMT Reform: $-180.590 billion + Various Itemized Deductions Reform: $5.351 billion + +Calculating sequential reforms for Year: 2032... + Tax Rate Reform: $-255.363 billion + Standard Deduction Reform: $-149.721 billion + Exemption Reform: $164.186 billion + CTC Expansion Reform: $-89.526 billion + CTC Temporary Enhancement Reform: $0.000 billion + QBID Reform: $-14.751 billion + AMT Reform: $-190.086 billion + Various Itemized Deductions Reform: $5.251 billion + +Calculating sequential reforms for Year: 2033... + Tax Rate Reform: $-265.827 billion + Standard Deduction Reform: $-154.796 billion + Exemption Reform: $166.984 billion + CTC Expansion Reform: $-90.771 billion + CTC Temporary Enhancement Reform: $0.000 billion + QBID Reform: $-14.800 billion + AMT Reform: $-199.613 billion + Various Itemized Deductions Reform: $5.148 billion + +Calculating sequential reforms for Year: 2034... + Tax Rate Reform: $-276.834 billion + Standard Deduction Reform: $-158.800 billion + Exemption Reform: $172.022 billion + CTC Expansion Reform: $-96.710 billion + CTC Temporary Enhancement Reform: $0.000 billion + QBID Reform: $-15.342 billion + AMT Reform: $-210.078 billion + Various Itemized Deductions Reform: $5.009 billion + +Calculating sequential reforms for Year: 2035... + Tax Rate Reform: $-288.564 billion + Standard Deduction Reform: $-163.113 billion + Exemption Reform: $176.943 billion + CTC Expansion Reform: $-97.852 billion + CTC Temporary Enhancement Reform: $0.000 billion + QBID Reform: $-16.111 billion + AMT Reform: $-220.627 billion + Various Itemized Deductions Reform: $5.026 billion From db8711c663bfe67b8fad399238e44575bb040bb1 Mon Sep 17 00:00:00 2001 From: PavelMakarchuk Date: Tue, 13 May 2025 12:33:18 -0400 Subject: [PATCH 3/3] runs --- us/reconciliation/2026_reconciliation.ipynb | 129 ++++++++++++++------ 1 file changed, 89 insertions(+), 40 deletions(-) diff --git a/us/reconciliation/2026_reconciliation.ipynb b/us/reconciliation/2026_reconciliation.ipynb index 0e0359e..096ef4f 100644 --- a/us/reconciliation/2026_reconciliation.ipynb +++ b/us/reconciliation/2026_reconciliation.ipynb @@ -2,9 +2,18 @@ "cells": [ { "cell_type": "code", - "execution_count": 23, + "execution_count": 1, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/Users/pavelmakarchuk/anaconda3/envs/pe/lib/python3.10/site-packages/tqdm/auto.py:21: TqdmWarning: IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html\n", + " from .autonotebook import tqdm as notebook_tqdm\n" + ] + } + ], "source": [ "from policyengine_us import Microsimulation\n", "from policyengine_core.reforms import Reform\n", @@ -13,7 +22,7 @@ }, { "cell_type": "code", - "execution_count": 24, + "execution_count": 2, "metadata": {}, "outputs": [], "source": [ @@ -29,7 +38,7 @@ }, { "cell_type": "code", - "execution_count": 25, + "execution_count": 3, "metadata": {}, "outputs": [], "source": [ @@ -114,7 +123,7 @@ }, { "cell_type": "code", - "execution_count": 26, + "execution_count": 4, "metadata": {}, "outputs": [], "source": [ @@ -189,7 +198,7 @@ }, { "cell_type": "code", - "execution_count": 27, + "execution_count": 5, "metadata": {}, "outputs": [], "source": [ @@ -202,7 +211,7 @@ }, { "cell_type": "code", - "execution_count": 28, + "execution_count": 6, "metadata": {}, "outputs": [], "source": [ @@ -332,7 +341,7 @@ }, { "cell_type": "code", - "execution_count": 29, + "execution_count": 7, "metadata": {}, "outputs": [], "source": [ @@ -363,7 +372,7 @@ }, { "cell_type": "code", - "execution_count": 30, + "execution_count": 8, "metadata": {}, "outputs": [], "source": [ @@ -628,7 +637,7 @@ }, { "cell_type": "code", - "execution_count": 31, + "execution_count": 9, "metadata": {}, "outputs": [], "source": [ @@ -672,7 +681,7 @@ }, { "cell_type": "code", - "execution_count": 32, + "execution_count": 10, "metadata": {}, "outputs": [], "source": [ @@ -685,7 +694,7 @@ }, { "cell_type": "code", - "execution_count": 33, + "execution_count": 11, "metadata": {}, "outputs": [], "source": [ @@ -701,7 +710,7 @@ }, { "cell_type": "code", - "execution_count": 34, + "execution_count": 12, "metadata": {}, "outputs": [], "source": [ @@ -711,7 +720,7 @@ }, { "cell_type": "code", - "execution_count": 35, + "execution_count": 13, "metadata": {}, "outputs": [], "source": [ @@ -721,7 +730,7 @@ }, { "cell_type": "code", - "execution_count": 36, + "execution_count": 14, "metadata": {}, "outputs": [], "source": [ @@ -794,12 +803,72 @@ "name": "stdout", "output_type": "stream", "text": [ + "\n", + "Calculating sequential reforms for Year: 2025...\n", + " Tax Rate Reform: $0.000 billion\n", + " Standard Deduction Reform: $-25.596 billion\n", + " Exemption Reform: $0.000 billion\n", + " CTC Expansion Reform: $0.000 billion\n", + " CTC Temporary Enhancement Reform: $-19.589 billion\n", + " QBID Reform: $80.212 billion\n", + " AMT Reform: $0.000 billion\n", + " Various Itemized Deductions Reform: $0.000 billion\n", "\n", "Calculating sequential reforms for Year: 2026...\n", - " Tax Rate Reform: $-197.115 billion\n", - " Standard Deduction Reform: $-143.689 billion\n", + " Tax Rate Reform: $-197.103 billion\n", + " Standard Deduction Reform: $-143.688 billion\n", " Exemption Reform: $140.173 billion\n", - " CTC Expansion Reform: $-68.089 billion\n" + " CTC Expansion Reform: $-68.089 billion\n", + " CTC Temporary Enhancement Reform: $-19.852 billion\n", + " QBID Reform: $-15.616 billion\n", + " AMT Reform: $-142.841 billion\n", + " Various Itemized Deductions Reform: $5.570 billion\n", + "\n", + "Calculating sequential reforms for Year: 2027...\n", + " Tax Rate Reform: $-208.233 billion\n", + " Standard Deduction Reform: $-149.539 billion\n", + " Exemption Reform: $143.150 billion\n", + " CTC Expansion Reform: $-70.055 billion\n", + " CTC Temporary Enhancement Reform: $-20.154 billion\n", + " QBID Reform: $-15.331 billion\n", + " AMT Reform: $-150.602 billion\n", + " Various Itemized Deductions Reform: $5.587 billion\n", + "\n", + "Calculating sequential reforms for Year: 2028...\n", + " Tax Rate Reform: $-216.859 billion\n", + " Standard Deduction Reform: $-152.212 billion\n", + " Exemption Reform: $145.951 billion\n", + " CTC Expansion Reform: $-71.332 billion\n", + " CTC Temporary Enhancement Reform: $-20.338 billion\n", + " QBID Reform: $-15.029 billion\n", + " AMT Reform: $-158.463 billion\n", + " Various Itemized Deductions Reform: $5.569 billion\n", + "\n", + "Calculating sequential reforms for Year: 2029...\n", + " Tax Rate Reform: $-225.966 billion\n", + " Standard Deduction Reform: $-138.463 billion\n", + " Exemption Reform: $155.309 billion\n", + " CTC Expansion Reform: $-81.961 billion\n", + " CTC Temporary Enhancement Reform: $0.000 billion\n", + " QBID Reform: $-14.454 billion\n", + " AMT Reform: $-163.119 billion\n", + " Various Itemized Deductions Reform: $5.571 billion\n", + "\n", + "Calculating sequential reforms for Year: 2030...\n", + " Tax Rate Reform: $-235.331 billion\n", + " Standard Deduction Reform: $-142.069 billion\n", + " Exemption Reform: $158.125 billion\n", + " CTC Expansion Reform: $-82.881 billion\n", + " CTC Temporary Enhancement Reform: $0.000 billion\n", + " QBID Reform: $-14.279 billion\n", + " AMT Reform: $-171.762 billion\n", + " Various Itemized Deductions Reform: $5.450 billion\n", + "\n", + "Calculating sequential reforms for Year: 2031...\n", + " Tax Rate Reform: $-245.152 billion\n", + " Standard Deduction Reform: $-145.912 billion\n", + " Exemption Reform: $161.335 billion\n", + " CTC Expansion Reform: $-88.026 billion\n" ] } ], @@ -811,22 +880,9 @@ }, { "cell_type": "code", - "execution_count": 19, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\n", - "Final Results Table:\n", - "================================================================================\n", - "Empty DataFrame\n", - "Columns: [Year, Reform, Impact (billions)]\n", - "Index: []\n" - ] - } - ], + "outputs": [], "source": [ "# Print final table\n", "print(\"\\nFinal Results Table:\")\n", @@ -843,13 +899,6 @@ "source": [ "results_df.to_csv(\"sequential_tax_reform_results.csv\", index=False)" ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] } ], "metadata": {