Skip to content

Commit

Permalink
Merge pull request #2693 from PSLmodels/master
Browse files Browse the repository at this point in the history
Update v4 development branch with latest from master
jdebacker authored Sep 28, 2023

Verified

This commit was signed with the committer’s verified signature.
michaelsproul Michael Sproul
2 parents 01ebe83 + a01f6f2 commit bc20f78
Showing 43 changed files with 1,764 additions and 411 deletions.
2 changes: 2 additions & 0 deletions conda.recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -17,6 +17,7 @@ requirements:
- "paramtools>=0.18.0"
- behresp
- aiohttp
- curl

run:
- python
@@ -28,6 +29,7 @@ requirements:
- "paramtools>=0.18.0"
- behresp
- aiohttp
- curl

test:
commands:
36 changes: 36 additions & 0 deletions docs/about/releases.md
Original file line number Diff line number Diff line change
@@ -3,6 +3,42 @@ Release history
Go [here](https://github.com/PSLmodels/Tax-Calculator/pulls?q=is%3Apr+is%3Aclosed)
for a complete commit history.

2023-06-20 Release 3.4.1
------------------------
(last merged pull request is
[#2686](https://github.com/PSLmodels/Tax-Calculator/pull/2686))

**This is an enhancement and bug-fix release.**

**API Changes**

**New Features**
- Update documentation of use cases [[#2686](https://github.com/PSLmodels/Tax-Calculator/pull/2686) by Jason Debacker]
- Update the last budget year to 2033 ~ also extend the projections to 2033 [[#2682](https://github.com/PSLmodels/Tax-Calculator/pull/2682) by Bodi Yang]

**Bug Fixes**
- Reweight PUF data for the year 2033, to fix the odd PUF weightings, PUF ratios and odd projections [[#2685](https://github.com/PSLmodels/Tax-Calculator/pull/2685) by Bodi Yang], with primary work in [[TaxData PR #429](https://github.com/PSLmodels/taxdata/pull/429)by Bodi Yang]
- Fix incorrect value for EITC_c in 2020 [[#2684](https://github.com/PSLmodels/Tax-Calculator/pull/2684) by Matt Jensen]


2023-05-05 Release 3.4.0
------------------------
(last merged pull request is
[#2677](https://github.com/PSLmodels/Tax-Calculator/pull/2677))

**This is an enhancement and bug-fix release.**

**API Changes**

**New Features**
- Tax-Calculator baseline update for CBO economic projections, published in May, "The Budget and Economic Outlook: 2023 to 2033" [[#2676](https://github.com/PSLmodels/Tax-Calculator/pull/2676) by Bodi Yang], with primary work in [[TaxData PR #421](https://github.com/PSLmodels/taxdata/pull/421)by Bodi Yang]

**Bug Fixes**
- Replacement of the deprecated Pandas `.append()` method in the model [[#2676](https://github.com/PSLmodels/Tax-Calculator/pull/2676) by Bodi Yang]
- Fix calculaton of 2021 child and other dependent credit [[#2677](https://github.com/PSLmodels/Tax-Calculator/pull/2677) by Matt Jensen]
- Fix exemption of UI from AGI for EITC in certain years [[#2675](https://github.com/PSLmodels/Tax-Calculator/pull/2675) by Jason Debacker]
- Fix incorrect value for max EITC in 2022 [[#2673](https://github.com/PSLmodels/Tax-Calculator/pull/2673) by Jason Debacker]

2022-12-16 Release 3.3.0
------------------------
(last merged pull request is
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
@@ -51,7 +51,7 @@ The cross-model validation work with NBER's TAXSIM-27 model is described

## Latest release

{doc}`3.3.0 (2022-12-16) <about/releases>`
{doc}`3.4.1 (2023-06-20) <about/releases>`

If you are already using Tax-Calculator, upgrade using the following command:

41 changes: 38 additions & 3 deletions docs/use_cases.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,51 @@
Recorded use cases
==================

\[72\] JORDAN WEISSMANN. It's Time for Democrats to Buck Up and Give Joe Manchin What He Wants. *Slate*.
\[79\] Alex Brill, Kyle Pomerleau, and Grant M. Seiter. Flawed Approach: The Working Families Tax Cut Act as a Response to Inflation. American Enterprise Institute.
June 8, 2023. URL:
<https://www.aei.org/economics/flawed-approach-the-working-families-tax-cut-act-as-a-response-to-inflation/>
(visited on 2023-06-16).

\[78\] Kyle Pomerleau. Section 199A and "Tax Parity". American Enterprise Institute.
September 2022. URL:
<https://www.aei.org/research-products/report/section-199a-and-tax-parity/>
(visited on 2023-06-16).

\[77\] Halah Ahmad, Jack Landry, and Stephen Nunez. Revisiting the Child Tax Credit for the Lame Duck Session: Comparing Parameters for Anti-Poverty Impacts.
November 2022. Jain Family Institute Report. URL:
<https://jainfamilyinstitute.org/revisiting-the-child-tax-credit-for-the-lame-duck-session-comparing-parameters-for-anti-poverty-impacts/>
(visited on 2023-06-19).

\[76\] Jack Landry.The Expanded Child Tax Credit and Parental Employment: Tenuous Evidence Points to Work Disincentives.
February 2022. Jain Family Institute Report. URL:
<https://jainfamilyinstitute.org/the-expanded-child-tax-credit-and-parental-employment-tenuous-evidence-points-to-work-disincentives/>
(visited on 2023-06-19).

\[75\] Jordan Weissmann. It's Time for Democrats to Buck Up and Give Joe Manchin What He Wants. *Slate*.
December 2021. URL:
<https://slate.com/business/2021/12/manchin-democrats-bbb-spending.html>
(visited on 2021-12-17).

\[71\] Jack Landry and Stephen Nunez. Analysis of Full Refundability of the Child Tax Credit Without Expansion.
December 2021. Jain Family Instuite Report. URL:
\[74\] Jack Landry and Stephen Nunez. Memo: Cost Simulations of a Fully-Refundable Child Tax Credit (CTC) 2022-2031.
December 2021. Jain Family Institute Report. URL:
<https://jainfamilyinstitute.org/memo-cost-simulations-of-a-fully-refundable-child-tax-credit-ctc-2022-2031/>
(visited on 2023-06-19).

\[73\] Jack Landry and Stephen Nunez. Analysis of Full Refundability of the Child Tax Credit Without Expansion.
December 2021. Jain Family Institute Report. URL:
<https://www.jainfamilyinstitute.org/assets/full-refundability-of-child-tax-credit-without-expansion.pdf>
(visited on 2021-12-17).

\[72\] Jack Landry and Stephen Nunez. Reducing Refundability of the Child Tax Credit: Assessing Poverty Impacts and Trade-offs.
September 2021. Jain Family Institute Report. URL:
<https://jainfamilyinstitute.org/reducing-refundability-of-the-child-tax-credit-assessing-poverty-impacts-and-trade-offs/>
(visited on 2023-06-19).

\[71\] Jack Landry and Stephen Nunez. Assessing Non-filer Rates & Poverty Impacts for the American Rescue Plan Act’s Expanded CTC.
September 2021. Jain Family Institute Report. URL:
<https://jainfamilyinstitute.org/assessing-non-filer-rates-poverty-impacts-for-the-american-rescue-plan-acts-expanded-ctc/>
(visited on 2023-06-19).

\[70\] Cody Kallen and Arparna Mathur. Estimating the Distributional Implications of the Tax Cuts and Jobs Act. *National Tax Journal*.
September 2021. URL:
<https://www.journals.uchicago.edu/doi/abs/10.1086/714449>
3 changes: 2 additions & 1 deletion environment.yml
Original file line number Diff line number Diff line change
@@ -3,6 +3,7 @@ channels:
- conda-forge
dependencies:
- python
- curl
- "numpy>=1.14"
- "pandas>=1.2.0"
- "bokeh>=1.4.0, <3.0.0"
@@ -21,4 +22,4 @@ dependencies:
- pip
- pip:
- jupyter-book
- pytest_harvest
- pytest_harvest
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@
with open('README.md') as f:
longdesc = f.read()

version = '3.3.0'
version = '3.4.1'

config = {
'description': 'Tax Calculator',
@@ -16,7 +16,7 @@
'packages': ['taxcalc', 'taxcalc.cli'],
'include_package_data': True,
'name': 'taxcalc',
'install_requires': ['numpy', 'pandas', 'bokeh', 'numba'],
'install_requires': ['setuptools', 'numpy', 'pandas', 'bokeh', 'numba'],
'classifiers': [
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
2 changes: 1 addition & 1 deletion taxcalc.egg-info/PKG-INFO
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: taxcalc
Version: 3.3.0
Version: 3.4.1
Summary: taxcalc
Home-page: https://github.com/PSLmodels/Tax-Calculator
Download-URL: https://github.com/PSLmodels/Tax-Calculator
1 change: 1 addition & 0 deletions taxcalc.egg-info/requires.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
setuptools
numpy
pandas
bokeh
2 changes: 1 addition & 1 deletion taxcalc/__init__.py
Original file line number Diff line number Diff line change
@@ -14,4 +14,4 @@
from taxcalc.utils import *
from taxcalc.cli import *

__version__ = '3.3.0'
__version__ = '3.4.1'
5 changes: 3 additions & 2 deletions taxcalc/calcfunctions.py
Original file line number Diff line number Diff line change
@@ -2625,8 +2625,9 @@ def PersonalTaxCredit(MARS, c00100, XTOT, nu18,
(RRC_pe[MARS - 1] - RRC_ps[MARS - 1]))
recovery_rebate_credit = RRC_c * XTOT * (1 - prt)
else:
recovery_rebate_credit = max(0, RRC_c_unit[MARS-1] + RRC_c_kids *
nu18 - RRC_prt * (c00100 - RRC_ps[MARS -1]))
recovery_rebate_credit = max(
0, RRC_c_unit[MARS-1] + RRC_c_kids * nu18 - RRC_prt *
(c00100 - RRC_ps[MARS -1]))
return (personal_refundable_credit, personal_nonrefundable_credit,
recovery_rebate_credit)

4 changes: 2 additions & 2 deletions taxcalc/cli/tc.py
Original file line number Diff line number Diff line change
@@ -221,8 +221,8 @@ def _compare_test_output_files():
Private function that compares expected and actual tc --test output files;
returns 0 if pass test, otherwise returns 1.
"""
explines = open(EXPECTED_TEST_OUTPUT_FILENAME, 'U').readlines()
actlines = open(ACTUAL_TEST_OUTPUT_FILENAME, 'U').readlines()
explines = open(EXPECTED_TEST_OUTPUT_FILENAME, 'r').readlines()
actlines = open(ACTUAL_TEST_OUTPUT_FILENAME, 'r').readlines()
if ''.join(explines) == ''.join(actlines):
sys.stdout.write('PASSED TEST\n')
retcode = 0
2 changes: 1 addition & 1 deletion taxcalc/consumption.json
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@
"validators": {
"range": {
"min": 2013,
"max": 2032
"max": 2033
}
}
},
2 changes: 1 addition & 1 deletion taxcalc/growdiff.json
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@
"validators": {
"range": {
"min": 2013,
"max": 2032
"max": 2033
}
}
},
2 changes: 1 addition & 1 deletion taxcalc/growdiff.py
Original file line number Diff line number Diff line change
@@ -27,7 +27,7 @@ class instance: GrowDiff
"""

JSON_START_YEAR = 2013 # must be same as Policy.JSON_START_YEAR
DEFAULT_NUM_YEARS = 20 # must be same as Policy.DEFAULT_NUM_YEARS
DEFAULT_NUM_YEARS = 21 # must be same as Policy.DEFAULT_NUM_YEARS
DEFAULTS_FILE_NAME = 'growdiff.json'
DEFAULTS_FILE_PATH = os.path.abspath(os.path.dirname(__file__))

2 changes: 1 addition & 1 deletion taxcalc/policy.py
Original file line number Diff line number Diff line change
@@ -39,7 +39,7 @@ class instance: Policy
JSON_START_YEAR = 2013 # remains the same unless earlier data added
LAST_KNOWN_YEAR = 2020 # last year for which indexed param vals are known
# should increase LAST_KNOWN_YEAR by one every calendar year
LAST_BUDGET_YEAR = 2032 # last extrapolation year
LAST_BUDGET_YEAR = 2033 # last extrapolation year
# should increase LAST_BUDGET_YEAR by one every calendar year
DEFAULT_NUM_YEARS = LAST_BUDGET_YEAR - JSON_START_YEAR + 1

12 changes: 6 additions & 6 deletions taxcalc/policy_current_law.json
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@
"validators": {
"range": {
"min": 2013,
"max": 2032
"max": 2033
}
}
},
@@ -16983,11 +16983,11 @@
},
{
"year": 2023,
"value": 1500.0
"value": 1600.0
},
{
"year": 2024,
"value": 1500.0
"value": 1600.0
},
{
"year": 2025,
@@ -18005,17 +18005,17 @@
{
"year": 2020,
"EIC": "0kids",
"value": 5980.0
"value": 5890.0
},
{
"year": 2020,
"EIC": "1kid",
"value": 5980.0
"value": 5890.0
},
{
"year": 2020,
"EIC": "2kids",
"value": 5980.0
"value": 5890.0
},
{
"year": 2020,
2 changes: 1 addition & 1 deletion taxcalc/puf_ratios.csv
Original file line number Diff line number Diff line change
@@ -21,4 +21,4 @@ INT2029,1.0107,0.9939,0.9780,0.9801,0.9823,0.9852,1.0025,0.9850,0.9945,0.9933,0.
INT2030,1.0289,1.0010,0.9821,0.9840,0.9821,0.9917,0.9823,0.9877,0.9826,0.9890,0.9815,0.9919,1.0055,1.0363,1.0382,1.0449,1.0301,0.9951,0.9921
INT2031,1.0279,1.0213,0.9858,0.9918,0.9829,0.9886,0.9858,0.9770,0.9914,0.9938,0.9794,0.9871,0.9953,1.0447,1.0439,1.0732,1.0284,1.0061,0.9932
INT2032,1.0080,1.1006,0.9919,0.9812,0.9867,0.9850,0.9881,0.9740,0.9732,0.9791,0.9656,0.9835,0.9900,1.0785,1.0904,1.1373,1.0484,1.0099,0.9983
INT2033,1.0858,1.2516,1.5470,1.5126,1.4087,1.3807,1.3807,1.2578,1.2154,1.0363,1.0770,0.9676,0.9318,0.8139,0.7723,0.7487,0.7294,0.7180,0.7156
INT2033,0.9351,0.8350,0.9708,0.9751,0.9896,0.9850,0.9879,1.0383,1.0312,1.0351,1.1160,1.0744,1.0375,0.8505,0.8247,0.7425,0.8975,1.0567,1.0931
Binary file modified taxcalc/puf_weights.csv.gz
Binary file not shown.
6 changes: 5 additions & 1 deletion taxcalc/reforms/rounding2022.json
Original file line number Diff line number Diff line change
@@ -119,7 +119,7 @@
"2021": [11610, 19520, 19520, 19520],
"2022": [9160, 20130, 20130, 20130]},
"EITC_ps_MarriedJ": {"2019": [5800, 5790, 5790, 5790],
"2020": [5980, 5980, 5980, 6250],
"2020": [5890, 5890, 5890, 6250],
"2021": [5950, 5950, 5950, 5950],
"2022": [6130, 6130, 6130, 6130]},
"EITC_InvestIncome_c": {"2019": 3600,
@@ -134,6 +134,10 @@
"2020": 138,
"2021": 180,
"2022": 180},
"ACTC_c": {"2023": 1600,
"2024": 1600,
"2025": 1600,
"2026": 1000},
"FST_AGI_thd_lo": {"2019": [1000000, 1000000, 500000, 1000000, 1000000]},
"FST_AGI_thd_hi": {"2019": [2000000, 2000000, 1000000, 2000000, 2000000]}
}
8 changes: 8 additions & 0 deletions taxcalc/tests/benefits_expect.csv
Original file line number Diff line number Diff line change
@@ -151,3 +151,11 @@ year,bname,benamt,bencnt,benavg
2032,tanf,36.782,9.701,3.8
2032,vet,251.045,12.862,19.5
2032,housing,84.103,14.431,5.8
2033,ssi,80.757,18.094,4.5
2033,mcare,1573.033,96.777,16.3
2033,mcaid,809.874,91.615,8.8
2033,snap,161.978,83.282,1.9
2033,wic,5.374,23.33,0.2
2033,tanf,36.919,9.743,3.8
2033,vet,254.375,13.019,19.5
2033,housing,84.96,14.556,5.8
6 changes: 3 additions & 3 deletions taxcalc/tests/cpscsv_agg_expect.csv
Original file line number Diff line number Diff line change
@@ -12,13 +12,13 @@ AMT Income ($b),8319.8,10262.0,10680.4,11012.7,12497.3,13059.3,13639.6,14233.9,1
AMT Liability ($b),8.1,0.8,0.7,0.6,1.8,1.3,1.1,1.0,1.0,16.7
AMT Filers (#m),2.6,0.2,0.2,0.1,0.3,0.2,0.2,0.2,0.2,4.0
Tax before Credits ($b),1116.0,1380.6,1449.5,1505.8,1762.7,1866.0,1913.9,1986.7,2086.0,2309.0
Refundable Credits ($b),70.8,102.4,102.7,655.1,824.0,98.2,107.2,111.2,112.7,97.9
Refundable Credits ($b),70.8,102.4,102.7,655.0,824.0,98.2,107.9,111.9,112.7,97.9
Nonrefundable Credits ($b),32.7,97.2,99.1,99.4,3.2,107.7,107.8,109.1,110.9,29.9
Reform Surtaxes ($b),0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0
Other Taxes ($b),5.5,10.7,11.3,12.6,13.8,14.4,15.4,15.8,16.4,17.5
Ind Income Tax ($b),1018.1,1191.6,1259.0,764.0,950.4,1674.6,1714.3,1782.2,1878.8,2198.7
Ind Income Tax ($b),1018.1,1191.6,1259.0,764.0,950.4,1674.6,1713.6,1781.5,1878.8,2198.7
Payroll Taxes ($b),1040.8,1141.6,1194.9,1217.9,1318.7,1421.6,1499.5,1571.9,1648.9,1723.0
Combined Liability ($b),2059.0,2333.2,2453.9,1981.9,2269.1,3096.2,3213.9,3354.0,3527.7,3921.7
Combined Liability ($b),2059.0,2333.2,2453.9,1982.0,2269.1,3096.2,3213.2,3353.3,3527.7,3921.7
With Income Tax <= 0 (#m),88.1,96.2,97.0,135.2,127.7,96.0,98.3,99.5,100.1,98.0
With Combined Tax <= 0 (#m),62.8,65.4,66.4,98.2,97.7,67.7,69.5,70.7,71.6,71.0
UBI Benefits ($b),0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0
Loading

0 comments on commit bc20f78

Please sign in to comment.