Skip to content

Commit

Permalink
Merge pull request #50 from PSLmodels/master
Browse files Browse the repository at this point in the history
merge
  • Loading branch information
bodiyang authored Aug 1, 2024
2 parents f9a529a + 8ebc51c commit 2052a19
Show file tree
Hide file tree
Showing 9 changed files with 65 additions and 25 deletions.
21 changes: 21 additions & 0 deletions docs/about/releases.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,27 @@ Go [here](https://github.com/PSLmodels/Tax-Calculator/pulls?q=is%3Apr+is%3Aclose
for a complete commit history.


2024-07-30 Release 4.2.1
------------------------
(last merged pull request is
[#2786](https://github.com/PSLmodels/Tax-Calculator/pull/2786))

**This is a bug-fix release.**

**API Changes**

**New Features**

**Bug Fixes**
- Add custom `reforms/growfactors_ext.json` file to use in dynamic analysis of the `reforms/ext.json` extend-TCJA-beyond-2025 reform [[#2770](https://github.com/PSLmodels/Tax-Calculator/pull/2777) by Jason DeBacker]
- Fix CDCC phase-out calculations [[#2779](https://github.com/PSLmodels/Tax-Calculator/pull/2779) by Martin Holmer]
- Fix CARES charity deduction for nonitemizers [[#2781](https://github.com/PSLmodels/Tax-Calculator/pull/2781) by Martin Holmer]
- Fix four 2020 PT_rt? parameter values [[#2783](https://github.com/PSLmodels/Tax-Calculator/pull/2783) by Martin Holmer]
- Correct AMT taxable income calculation to handle QBID correctly [[#2784](https://github.com/PSLmodels/Tax-Calculator/pull/2784) by Martin Holmer]
- Fix qualified business income calculation [[#2785](https://github.com/PSLmodels/Tax-Calculator/pull/2785) by Martin Holmer]
- Add `ctc_nonrefundable` variable [[#2786](https://github.com/PSLmodels/Tax-Calculator/pull/2786) by Martin Holmer]


2024-07-21 Release 4.2.0
------------------------
(last merged pull request is
Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ The cross-model validation work with NBER's TAXSIM-27 model is described

## Latest release

{doc}`4.2.0 (2024-07-21) <about/releases>`
{doc}`4.2.1 (2024-07-30) <about/releases>`

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

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
with open("README.md") as f:
longdesc = f.read()

version = "4.2.0"
version = "4.2.1"

config = {
"description": "Tax Calculator",
Expand Down
9 changes: 8 additions & 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: 4.2.0
Version: 4.2.1
Summary: taxcalc
Home-page: https://github.com/PSLmodels/Tax-Calculator
Download-URL: https://github.com/PSLmodels/Tax-Calculator
Expand All @@ -19,6 +19,13 @@ Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: setuptools
Requires-Dist: numpy
Requires-Dist: pandas
Requires-Dist: bokeh
Requires-Dist: numba
Requires-Dist: requests
Requires-Dist: paramtools

| | |
| --- | --- |
Expand Down
2 changes: 1 addition & 1 deletion taxcalc/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@
from taxcalc.utils import *
from taxcalc.cli import *

__version__ = '4.2.0'
__version__ = '4.2.1'
37 changes: 22 additions & 15 deletions taxcalc/calcfunctions.py
Original file line number Diff line number Diff line change
Expand Up @@ -2455,7 +2455,7 @@ def ChildDepTaxCredit(age_head, age_spouse, nu18, n24, MARS, c00100, XTOT, num,
c07200,
CTC_c, CTC_ps, CTC_prt, exact, ODC_c,
CTC_c_under6_bonus, nu06,
CTC_refundable, CTC_include17,
CTC_is_refundable, CTC_include17,
c07220, odc, codtc_limited):
"""
Computes amounts on "Child Tax Credit and Credit for Other Dependents
Expand Down Expand Up @@ -2554,7 +2554,7 @@ def ChildDepTaxCredit(age_head, age_spouse, nu18, n24, MARS, c00100, XTOT, num,
line13 = line11 - line12
line14 = 0.
line15 = max(0., line13 - line14)
if CTC_refundable:
if CTC_is_refundable:
c07220 = line10 * line1 / line3
odc = max(0., line10 - c07220)
codtc_limited = max(0., line10 - c07220 - odc)
Expand Down Expand Up @@ -2924,7 +2924,7 @@ def CharityCredit(e19800, e20100, c00100, CR_Charity_rt, CR_Charity_f,
def NonrefundableCredits(c05800, e07240, e07260, e07300, e07400,
e07600, p08000, odc,
personal_nonrefundable_credit,
CTC_refundable,
CTC_is_refundable,
CR_RetirementSavings_hc, CR_ForeignTax_hc,
CR_ResidentialEnergy_hc, CR_GeneralBusiness_hc,
CR_MinimumTax_hc, CR_OtherCredits_hc, charity_credit,
Expand Down Expand Up @@ -2953,7 +2953,7 @@ def NonrefundableCredits(c05800, e07240, e07260, e07300, e07400,
Other Dependent Credit
personal_nonrefundable_credit: float
Personal nonrefundable credit
CTC_refundable: bool
CTC_is_refundable: bool
Whether the child tax credit is fully refundable
CR_RetirementSavings_hc: float
Credit for retirement savings haircut
Expand Down Expand Up @@ -3033,7 +3033,7 @@ def NonrefundableCredits(c05800, e07240, e07260, e07300, e07400,
c07240 = min(e07240 * (1. - CR_RetirementSavings_hc), avail)
avail = avail - c07240
# Child tax credit
if not CTC_refundable:
if not CTC_is_refundable:
c07220 = min(c07220, avail)
avail = avail - c07220
# Other dependent credit
Expand Down Expand Up @@ -3067,7 +3067,8 @@ def NonrefundableCredits(c05800, e07240, e07260, e07300, e07400,
@iterate_jit(nopython=True)
def AdditionalCTC(codtc_limited, ACTC_c, n24, earned, ACTC_Income_thd,
ACTC_rt, nu06, ACTC_rt_bonus_under6family, ACTC_ChildNum,
CTC_refundable, CTC_include17, age_head, age_spouse, MARS, nu18,
CTC_is_refundable, CTC_include17,
age_head, age_spouse, MARS, nu18,
ptax_was, c03260, e09800, c59660, e11200,
c11070):
"""
Expand Down Expand Up @@ -3115,7 +3116,7 @@ def AdditionalCTC(codtc_limited, ACTC_c, n24, earned, ACTC_Income_thd,
# Part I
line3 = codtc_limited

if CTC_refundable:
if CTC_is_refundable:
line4 = 0.
else:
if CTC_include17:
Expand Down Expand Up @@ -3156,7 +3157,8 @@ def AdditionalCTC(codtc_limited, ACTC_c, n24, earned, ACTC_Income_thd,
def C1040(c05800, c07180, c07200, c07220, c07230, c07240, c07260, c07300,
c07400, c07600, c08000, e09700, e09800, e09900, niit, othertaxes,
c07100, c09200, odc, charity_credit,
personal_nonrefundable_credit, CTC_refundable, ODC_refundable):
personal_nonrefundable_credit,
CTC_is_refundable, ODC_is_refundable):
"""
Computes total used nonrefundable credits, c07100, othertaxes, and
income tax before refundable credits, c09200.
Expand Down Expand Up @@ -3217,8 +3219,9 @@ def C1040(c05800, c07180, c07200, c07220, c07230, c07240, c07260, c07300,
"""
# total used nonrefundable credits (as computed in NonrefundableCredits)
c07100 = (c07180 + c07200 + c07600 + c07300 + c07400 +
c07220 * (1. - CTC_refundable) + c08000 +
c07230 + c07240 + c07260 + odc * (1. - ODC_refundable) + charity_credit +
c07220 * (1. - CTC_is_refundable) + c08000 +
c07230 + c07240 + c07260 +
odc * (1. - ODC_is_refundable) + charity_credit +
personal_nonrefundable_credit)
# tax after credits (2016 Form 1040, line 56)
tax_net_nonrefundable_credits = max(0., c05800 - c07100)
Expand Down Expand Up @@ -3319,8 +3322,8 @@ def CTC_new(CTC_new_c, CTC_new_rt, CTC_new_c_under6_bonus,
@iterate_jit(nopython=True)
def IITAX(c59660, c11070, c10960, personal_refundable_credit, ctc_new, rptc,
c09200, payrolltax, CDCC_refund, recovery_rebate_credit,
eitc, c07220, odc, CTC_refundable, ODC_refundable, refund,
ctc_total, ctc_refundable, iitax, combined):
eitc, c07220, odc, CTC_is_refundable, ODC_is_refundable, refund,
ctc_total, ctc_refundable, ctc_nonrefundable, iitax, combined):
"""
Computes final taxes.
Expand Down Expand Up @@ -3366,17 +3369,19 @@ def IITAX(c59660, c11070, c10960, personal_refundable_credit, ctc_new, rptc,
Total CTC amount (c07220 + c11070 + odc + ctc_new)
ctc_refundable: float
Portion of total CTC amount that is refundable
ctc_nonrefundable: float
Portion of total CTC amount that is nonrefundable
iitax: float
Total federal individual income tax liability
combined: float
Sum of iitax and payrolltax and lumpsum_tax
"""
eitc = c59660
if CTC_refundable:
if CTC_is_refundable:
ctc_refund = c07220
else:
ctc_refund = 0.
if ODC_refundable:
if ODC_is_refundable:
odc_refund = odc
else:
odc_refund = 0.
Expand All @@ -3385,9 +3390,11 @@ def IITAX(c59660, c11070, c10960, personal_refundable_credit, ctc_new, rptc,
odc_refund)
ctc_total = c07220 + c11070 + odc + ctc_new
ctc_refundable = ctc_refund + c11070 + odc_refund + ctc_new
ctc_nonrefundable = max(0., ctc_total - ctc_refundable)
iitax = c09200 - refund
combined = iitax + payrolltax
return (eitc, refund, ctc_total, ctc_refundable, iitax, combined)
return (eitc, refund, ctc_total, ctc_refundable, ctc_nonrefundable,
iitax, combined)


@JIT(nopython=True)
Expand Down
4 changes: 2 additions & 2 deletions taxcalc/policy_current_law.json
Original file line number Diff line number Diff line change
Expand Up @@ -16591,7 +16591,7 @@
"cps": true
}
},
"CTC_refundable": {
"CTC_is_refundable": {
"title": "Whether the child tax credit is fully refundable",
"description": "If true, the child tax credit is made fully refundable.",
"notes": "If true, the Additional Child Tax Credit is not used.",
Expand Down Expand Up @@ -16625,7 +16625,7 @@
"cps": true
}
},
"ODC_refundable": {
"ODC_is_refundable": {
"title": "Whether the other dependents tax credit is fully refundable",
"description": "If true, the other dependents tax credit is made fully refundable.",
"notes": "",
Expand Down
5 changes: 5 additions & 0 deletions taxcalc/records_variables.json
Original file line number Diff line number Diff line change
Expand Up @@ -1046,6 +1046,11 @@
"desc": "Total CTC amount (c07220 + c11070 + odc + ctc_new)",
"form": {"2013-20??": "calculated variable"}
},
"ctc_nonrefundable": {
"type": "float",
"desc": "Portion of total CTC amount that is nonrefundable",
"form": {"2013-20??": "calculated variable"}
},
"ctc_refundable": {
"type": "float",
"desc": "Portion of total CTC amount that is refundable",
Expand Down
8 changes: 4 additions & 4 deletions taxcalc/reforms/ARPA.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@
"2021": 0},
"UI_thd": {"2020": [150000, 150000, 150000, 150000, 150000],
"2021": [0, 0, 0, 0, 0]},
"CTC_refundable": {"2021": true,
"2022": false},
"ODC_refundable": {"2021": true,
"2022": false},
"CTC_is_refundable": {"2021": true,
"2022": false},
"ODC_is_refundable": {"2021": true,
"2022": false},
"CTC_include17": {"2021": true,
"2022": false},
"CTC_new_c": {"2021": 1000,
Expand Down

0 comments on commit 2052a19

Please sign in to comment.