Skip to content

Commit

Permalink
Merge branch '4.0.0-release' into v4_development
Browse files Browse the repository at this point in the history
  • Loading branch information
bodiyang authored Jun 4, 2024
2 parents f313bfe + 802e20e commit dcdf068
Show file tree
Hide file tree
Showing 9 changed files with 53 additions and 15 deletions.
14 changes: 14 additions & 0 deletions docs/about/releases.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,20 @@ Release history
Go [here](https://github.com/PSLmodels/Tax-Calculator/pulls?q=is%3Apr+is%3Aclosed)
for a complete commit history.

2024-06-01 Release 4.0.0
------------------------
(last merged pull request is
[#2749](https://github.com/PSLmodels/Tax-Calculator/pull/2749))

**This is a major release with changes that make Tax-Calculator incompatible with earlier releases.**

**API Changes**
- Apply a new framework for the payroll tax policy parameters: Payroll tax parameters are split into the employer side and employee side ~ `FICA_mc_trt`, `FICA_ss_trt` are replaced by `FICA_mc_trt_employer`, `FICA_mc_trt_employee`, `FICA_ss_trt_employer` and `FICA_ss_trt_employee`. [[#2669](https://github.com/PSLmodels/Tax-Calculator/pull/2669) by Bodi Yang]
- CDCC rate scale (`CDCC_crt`, `CDCC_frt`) changed from 0~1 to 0~100. [[#2628](https://github.com/PSLmodels/Tax-Calculator/pull/2628) by Duncan Hobbs and [#2671](https://github.com/PSLmodels/Tax-Calculator/pull/2671) by Jason DeBacker]

**New Features**
- Tax-Calculator 4.0.0 starts to incorporate with new [Taxcalc-Payroll](https://github.com/bodiyang/Taxcalc-Payroll) model, micro-simulation model focusing on payroll tax analysis. New features include (1) payroll tax reform simulation upon either employer side or employee side; (2) employer side payroll tax offset. [[Taxcalc-Payroll](https://github.com/bodiyang/Taxcalc-Payroll) developed by Bodi Yang]

2024-05-10 Release 3.6.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}`3.6.0 (2024-05-10) <about/releases>`
{doc}`4.0.0 (2024-06-01) <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 = "3.6.0"
version = "4.0.0"

config = {
"description": "Tax Calculator",
Expand Down
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.6.0
Version: 4.0.0
Summary: taxcalc
Home-page: https://github.com/PSLmodels/Tax-Calculator
Download-URL: https://github.com/PSLmodels/Tax-Calculator
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__ = '3.6.0'
__version__ = '4.0.0'
18 changes: 17 additions & 1 deletion taxcalc/cli/tc.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

import os
import sys
import time
import argparse
import difflib
import taxcalc as tc
Expand All @@ -29,7 +30,7 @@ def cli_tc_main():
(' '
'[--baseline BASELINE] [--reform REFORM] [--assump ASSUMP]\n'),
(' '
'[--exact] [--tables] [--graphs]\n'),
'[--exact] [--tables] [--graphs] [--timings]\n'),
(' '
'[--dump] [--dvars DVARS] [--sqldb] [--outdir OUTDIR]\n'),
(' '
Expand Down Expand Up @@ -88,6 +89,11 @@ def cli_tc_main():
'to HTML files for viewing in browser.'),
default=False,
action="store_true")
parser.add_argument('--timings',
help=('optional flag that causes execution times to '
'be written to stdout.'),
default=False,
action="store_true")
parser.add_argument('--dump',
help=('optional flag that causes OUTPUT to contain '
'all INPUT variables (extrapolated to TAXYEAR) '
Expand Down Expand Up @@ -158,11 +164,16 @@ def cli_tc_main():
inputfn.endswith('cps.csv') or
inputfn.endswith('tmd.csv')
)
if args.timings:
stime = time.time()
tcio.init(input_data=inputfn, tax_year=taxyear,
baseline=args.baseline,
reform=args.reform, assump=args.assump,
aging_input_data=aging,
exact_calculations=args.exact)
if args.timings:
xtime = time.time() - stime
sys.stdout.write(f'TIMINGS: init time = {xtime:.2f} secs\n')
if tcio.errmsg:
sys.stderr.write(tcio.errmsg)
sys.stderr.write('USAGE: tc --help\n')
Expand All @@ -183,12 +194,17 @@ def cli_tc_main():
sys.stderr.write('USAGE: tc --help\n')
return 1
# conduct tax analysis
if args.timings:
stime = time.time()
tcio.analyze(writing_output_file=True,
output_tables=args.tables,
output_graphs=args.graphs,
dump_varset=dumpvar_set,
output_dump=args.dump,
output_sqldb=args.sqldb)
if args.timings:
xtime = time.time() - stime
sys.stdout.write(f'TIMINGS: calc time = {xtime:.2f} secs\n')
# compare test output with expected test output if --test option specified
if args.test:
retcode = _compare_test_output_files()
Expand Down
6 changes: 6 additions & 0 deletions taxcalc/records_variables.json
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,12 @@
"form": {"2013-2016": "sample construction info"},
"availability": "taxdata_puf, taxdata_cps"
},
"s006_original": {
"type": "float",
"desc": "Sample weight before reweighting (not used in tax-calculation logic)",
"form": {"2013-2016": "sample construction info"},
"availability": "tax-microdata_tmd"
},
"data_source": {
"type": "int",
"desc": "1 if unit is created primarily from IRS-SOI PUF data; 0 if created primarily from CPS data (not used in tax-calculation logic)",
Expand Down
22 changes: 12 additions & 10 deletions taxcalc/reforms/ptaxes0.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,17 @@
// - raise OASDI payroll tax rate in 2018 and 2020 (1)
// - raise HI payroll tax rate in 2019 and 2021 (2)
// Reform_Parameter_Map:
// - 1: FICA_ss_trt
// - 2: FICA_mc_trt
// NOTE: this reform produces the following rates (employee+employer) by year:
// 2017: 0.124 0.029
// 2018: 0.130 0.029
// 2019: 0.130 0.030
// 2020: 0.140 0.030
// 2021: 0.140 0.032
// 2022: 0.140 0.032
// - 1: FICA_ss_trt_employer
// - 2: FICA_ss_trt_employee
// - 3: FICA_mc_trt_employer
// - 4: FICA_mc_trt_employee
// NOTE: this reform produces the following rates by year:
// 2017: FICA_ss_trt_employer 0.062 FICA_ss_trt_employee 0.062 FICA_mc_trt_employer 0.0145 FICA_mc_trt_employee 0.0145
// 2018: FICA_ss_trt_employer 0.065 FICA_ss_trt_employee 0.065 FICA_mc_trt_employer 0.0145 FICA_mc_trt_employee 0.0145
// 2019: FICA_ss_trt_employer 0.065 FICA_ss_trt_employee 0.065 FICA_mc_trt_employer 0.015 FICA_mc_trt_employee 0.015
// 2020: FICA_ss_trt_employer 0.070 FICA_ss_trt_employee 0.070 FICA_mc_trt_employer 0.015 FICA_mc_trt_employee 0.015
// 2021: FICA_ss_trt_employer 0.070 FICA_ss_trt_employee 0.070 FICA_mc_trt_employer 0.016 FICA_mc_trt_employee 0.016
// 2022: FICA_ss_trt_employer 0.070 FICA_ss_trt_employee 0.070 FICA_mc_trt_employer 0.016 FICA_mc_trt_employee 0.016
{
"FICA_ss_trt_employer": {
"2018": 0.065,
Expand All @@ -31,5 +33,5 @@
"FICA_mc_trt_employee": {
"2019": 0.015,
"2021": 0.016
}
}
}
Binary file modified taxcalc/tmd_weights.csv.gz
Binary file not shown.

0 comments on commit dcdf068

Please sign in to comment.