From 2bb270741f638f90462622327a06470b83a533c0 Mon Sep 17 00:00:00 2001 From: andersonfrailey Date: Mon, 6 Feb 2017 11:47:47 -0500 Subject: [PATCH 1/2] commit before merging --- taxcalc/records.py | 43 +++++++------- taxcalc/reforms/REFORMS.md | 103 ++++++--------------------------- taxcalc/reforms/Trump2016.json | 10 ++-- taxcalc/reforms/adjust0.txt | 21 ------- taxcalc/reforms/ptaxes0.txt | 13 ----- taxcalc/reforms/ptaxes1.txt | 10 ---- taxcalc/reforms/ptaxes2.txt | 8 --- taxcalc/reforms/ptaxes3.txt | 16 ----- taxcalc/tests/test_reforms.py | 4 +- 9 files changed, 43 insertions(+), 185 deletions(-) delete mode 100644 taxcalc/reforms/adjust0.txt delete mode 100644 taxcalc/reforms/ptaxes0.txt delete mode 100644 taxcalc/reforms/ptaxes1.txt delete mode 100644 taxcalc/reforms/ptaxes2.txt delete mode 100644 taxcalc/reforms/ptaxes3.txt diff --git a/taxcalc/records.py b/taxcalc/records.py index 776f2f5cf..fb84f3237 100644 --- a/taxcalc/records.py +++ b/taxcalc/records.py @@ -513,26 +513,23 @@ def _extrapolate_2009_puf(self): """ Initial year blowup factors for 2009 IRS-PUF/Census-CPS merged data. """ - year = 2009 - self.BF.AGDPN[year] = 1.0 - self.BF.ATXPY[year] = 1.0 - self.BF.AWAGE[year] = 1.0053 - self.BF.ASCHCI[year] = 1.0041 - self.BF.ASCHCL[year] = 1.1629 - self.BF.ASCHF[year] = 1.0 - self.BF.AINTS[year] = 1.0357 - self.BF.ADIVS[year] = 1.0606 - self.BF.ASCHEI[year] = 1.1089 - self.BF.ASCHEL[year] = 1.2953 - self.BF.ACGNS[year] = 1.1781 - self.BF.ABOOK[year] = 1.0 - self.BF.ARETS[year] = 1.0026 - self.BF.APOPN[year] = 1.0 - self.BF.ACPIU[year] = 1.0 - self.BF.APOPDEP[year] = 1.0 - self.BF.ASOCSEC[year] = 0.9941 - self.BF.ACPIM[year] = 1.0 - self.BF.AUCOMP[year] = 1.0034 - self.BF.APOPSNR[year] = 1.0 - self.BF.AIPD[year] = 1.0 - self._blowup(year) + self.BF.AGDPN[2009] = 1.0 + self.BF.ATXPY[2009] = 1.0 + self.BF.AWAGE[2009] = 1.0053 + self.BF.ASCHCI[2009] = 1.0041 + self.BF.ASCHCL[2009] = 1.1629 + self.BF.ASCHF[2009] = 1.0 + self.BF.AINTS[2009] = 1.0357 + self.BF.ADIVS[2009] = 1.0606 + self.BF.ASCHEI[2009] = 1.1089 + self.BF.ASCHEL[2009] = 1.2953 + self.BF.ACGNS[2009] = 1.1781 + self.BF.ABOOK[2009] = 1.0 + self.BF.APOPN[2009] = 1.0 + self.BF.ACPIU[2009] = 1.0 + self.BF.ASOCSEC[2009] = 0.9941 + self.BF.ACPIM[2009] = 1.0 + self.BF.AUCOMP[2009] = 1.0034 + self.BF.APOPSNR[2009] = 1.0 + self.BF.AIPD[2009] = 1.0 + self._blowup(2009) diff --git a/taxcalc/reforms/REFORMS.md b/taxcalc/reforms/REFORMS.md index e84b04aaa..760b52a27 100644 --- a/taxcalc/reforms/REFORMS.md +++ b/taxcalc/reforms/REFORMS.md @@ -11,8 +11,8 @@ interface to Tax-Calculator) to estimate reform effects. ## Example JSON Reform File -Here is an example of a tax reform proposal that consists of several -reform provisions. The structure of this file is as follows: +Here is an abstract example of a tax reform proposal that consists of +several reform provisions. The structure of this file is as follows: ``` { @@ -20,28 +20,13 @@ reform provisions. The structure of this file is as follows: : {: , ..., : }, - "param_code": {: , - ..., - : }, : {: }, ..., : {: , ..., : } - }, - "behavior": { - : {: }, - ..., - : {: } - }, - "growth": { - : {: } - }, - "consumption": { - : {: }, - ..., - : {: } } +} ``` Notice each pair of reform provision is separated by commas. @@ -54,62 +39,8 @@ is one that varies by filing status (MARS) with the vector containing six parameter values for single, married filing joint, married filing separate, head of household, widow, separate. -``` -// Example of a reform file suitable for local use or uploading to TaxBrain. -// This JSON file can contain any number of trailing //-style comments, which -// will be removed before the contents are converted from JSON to a dictionary. -// Within each "policy", "behavior", "growth", and "consumption" object, the -// primary keys are parameters and secondary keys are years. -// Both the primary and secondary key values must be enclosed in quotes ("). -// Boolean variables are specified as true or false (no quotes; all lowercase). -// Parameter code in the policy object is enclosed inside a pair of double -// pipe characters (||). -{ - "policy": { - "param_code": { // all the parameter code must go in one place -"ALD_InvInc_ec_base_code": -|| -// base is sum of taxable interest, qualified dividends and long-term cap gains -returned_value = e00300 + e00650 + p23250 -||}, - "_ALD_InvInc_ec_base_code_active": - {"2016": [true] - }, - "_AMT_brk1": // top of first AMT tax bracket - {"2015": [200000], - "2017": [300000] - }, - "_EITC_c": // maximum EITC amount by number of qualifying kids (0,1,2,3+) - {"2016": [[ 900, 5000, 8000, 9000]], - "2019": [[1200, 7000, 10000, 12000]] - }, - "_II_em": // personal exemption amount (see indexing changes below) - {"2016": [6000], - "2018": [7500], - "2020": [9000] - }, - "_II_em_cpi": // personal exemption amount indexing status - {"2016": false, // values in future years are same as this year value - "2018": true // values in future years indexed with this year as base - }, - "_SS_Earnings_c": // social security (OASDI) maximum taxable earnings - {"2016": [300000], - "2018": [500000], - "2020": [700000] - }, - "_AMT_em_cpi": // AMT exemption amount indexing status - {"2017": false, // values in future years are same as this year value - "2020": true // values in future years indexed with this year as base - } - }, - "behavior": { - }, - "growth": { - }, - "consumption": { - } -} -``` +A concrete example of a JSON reform file characterizes the 2016 Trump +Campaign Tax Plan is [here](Trump2016.json). ## Example Policy Reform Provisions @@ -123,14 +54,14 @@ shown in [this JSON file](../current_law_policy.json). ### Payroll Taxes -[Raise OASDI and HI payroll tax rates](ptaxes0.txt) +[Raise OASDI and HI payroll tax rates](ptaxes0.json) -[Raise OASDI maximum taxable earnings](ptaxes1.txt) +[Raise OASDI maximum taxable earnings](ptaxes1.json) -[Eliminate OASDI maximum taxable earnings](ptaxes2.txt) +[Eliminate OASDI maximum taxable earnings](ptaxes2.json) [Raise Additional Medicare Tax (Form 8959) tax rate and -thresholds](ptaxes3.txt) +thresholds](ptaxes3.json) ### Social Security Taxability @@ -139,7 +70,7 @@ Links will be added here. ### Adjustments [Specify AGI exclusion of some fraction of investment -income](adjust0.txt) +income](adjust0.json) Other links will be added here. @@ -186,13 +117,6 @@ The definition of each of behavioral-response parameter is shown in A link will be added here. -## Example Growth-Response Assumptions - -The definition of each of growth-response parameter is shown in [this -JSON file](../growth.json). - -A link will be added here. - ## Example Consumption-Response Assumptions The definition of each of consumption-response parameter (used in @@ -200,3 +124,10 @@ marginal tax rate calculations) is shown in [this JSON file](../consumption.json). A link will be added here. + +## Example Growth-Response Assumptions + +The definition of each of growth-response parameter is shown in [this +JSON file](../growth.json). + +A link will be added here. diff --git a/taxcalc/reforms/Trump2016.json b/taxcalc/reforms/Trump2016.json index e6ef75cd6..fe1d7480c 100644 --- a/taxcalc/reforms/Trump2016.json +++ b/taxcalc/reforms/Trump2016.json @@ -1,4 +1,4 @@ -// Title: 2016 Trump Campaign Tax Plan +// Title: 2016 Trump Campaign Tax Plan // Reform_File_Author: Matt Jensen // Reform_Reference: https://www.donaldjtrump.com/policies/tax-plan // Reform_Description: @@ -21,10 +21,8 @@ // - 7: _II_em // - 8: _ALD_Dependents* // - 9: _ID_c - - { - "policy": { + "policy": { "_II_rt1": {"2017": [0.12]}, "_II_brk1": @@ -99,5 +97,5 @@ {"2017": [7156]}, "_ID_c": {"2017": [[100000, 200000, 100000, 100000, 200000, 100000]]} - } -} \ No newline at end of file + } +} diff --git a/taxcalc/reforms/adjust0.txt b/taxcalc/reforms/adjust0.txt deleted file mode 100644 index a9f9ace4e..000000000 --- a/taxcalc/reforms/adjust0.txt +++ /dev/null @@ -1,21 +0,0 @@ -// Specify AGI exclusion of some fraction of investment income -{ - "policy": { - // specify fraction of investment income that can be excluded from AGI - "_ALD_InvInc_ec_rt": {"2016": [0.50]}, - - // specify "investment income" base to mean the sum of three things: - // taxable interest (e00300), qualified dividends (e00650), and - // long-term capital gains (p23250) [see functions.py for other - // types of investment income that can be included in the base] - "param_code": { -"ALD_InvInc_ec_base_code": -|| -returned_value = e00300 + e00650 + p23250 -||}, - - "_ALD_InvInc_ec_base_code_active": {"2016": [true]} - // the dollar exclusion is the product of the base defined by code - // and the fraction defined above - } -} diff --git a/taxcalc/reforms/ptaxes0.txt b/taxcalc/reforms/ptaxes0.txt deleted file mode 100644 index c51b65402..000000000 --- a/taxcalc/reforms/ptaxes0.txt +++ /dev/null @@ -1,13 +0,0 @@ -// Raise OASDI ("social security") and HI ("Medicare") payroll tax rates -{ - "policy": { - "_FICA_ss_trt": { // currently at 0.124 (employee+employer share) - "2018": [0.130], // raise by 0.6 percentage point - "2020": [0.140] // raise by another 1.0 percentage point - }, - "_FICA_mc_trt": { // currently at 0.029 (employee+employer share) - "2019": [0.030], // raise by 0.1 percentage point - "2021": [0.032] // raise by another 0.2 percentage point - } - } -} diff --git a/taxcalc/reforms/ptaxes1.txt b/taxcalc/reforms/ptaxes1.txt deleted file mode 100644 index 2e0da43e7..000000000 --- a/taxcalc/reforms/ptaxes1.txt +++ /dev/null @@ -1,10 +0,0 @@ -// Raise OASDI maximum taxable earnings, the "social security tax cap" -{ - "policy": { - "_SS_Earnings_c": { // at $118,500 in 2016; wage indexed after that - "2018": [200000], // raise to $200,000 and wage index after that - "2020": [250000] // raise to $250,000 and wage index after that - } - } -} - diff --git a/taxcalc/reforms/ptaxes2.txt b/taxcalc/reforms/ptaxes2.txt deleted file mode 100644 index 88d1b5f62..000000000 --- a/taxcalc/reforms/ptaxes2.txt +++ /dev/null @@ -1,8 +0,0 @@ -// Eliminate OASDI maximum taxable earnings, the so-called "pop-the-cap" reform -{ - "policy": { - "_SS_Earnings_c": { // at $118,500 in 2016; wage indexed after that - "2022": [9e99] // raise to essentially infinity - } - } -} diff --git a/taxcalc/reforms/ptaxes3.txt b/taxcalc/reforms/ptaxes3.txt deleted file mode 100644 index 4f9b2cc10..000000000 --- a/taxcalc/reforms/ptaxes3.txt +++ /dev/null @@ -1,16 +0,0 @@ -// Raise Additional Medicare Tax (Form 8959) tax rate and earnings exclusion -{ - "policy": { - "_AMEDT_rt": { // currently at 0.009 on non-excluded earnings - "2019": [0.010] // raise by 0.1 percentage point - }, - "_AMEDT_ec": { // earnings exclusion varies by MARS and is NOT price indexed - // current MARS-indexed values are as follows: - // [[200000, 250000, 125000, 200000, 200000, 125000]] - "2019": [[250000, 300000, 150000, 250000, 250000, 150000]] - }, - "_AMEDT_ec_cpi": { // start price-indexing the exclusion - "2019": true // values in future years price indexed - } - } -} diff --git a/taxcalc/tests/test_reforms.py b/taxcalc/tests/test_reforms.py index 5a05af1f1..24cd48a8c 100644 --- a/taxcalc/tests/test_reforms.py +++ b/taxcalc/tests/test_reforms.py @@ -17,9 +17,9 @@ @pytest.fixture(scope='session') def reforms_path(tests_path): """ - Return path to taxcalc/reforms/*.txt files + Return path to taxcalc/reforms/*.json files """ - return os.path.join(tests_path, '..', 'reforms', '*.txt') + return os.path.join(tests_path, '..', 'reforms', '*.json') def test_reforms(reforms_path): # pylint: disable=redefined-outer-name From e32c93b7e8800b60e1b12324338e32ed668c9756 Mon Sep 17 00:00:00 2001 From: andersonfrailey Date: Wed, 15 Feb 2017 15:51:07 -0500 Subject: [PATCH 2/2] update manifest --- MANIFEST.in | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/MANIFEST.in b/MANIFEST.in index d4f964b3e..5e27cb8c4 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,7 +1,8 @@ include versioneer.py include taxcalc/_version.py -include taxcalc/StageIFactors.csv -include taxcalc/WEIGHTS.csv +include taxcalc/growfactors.csv +include taxcalc/puf_weights.csv +include taxcalc/puf_ratios.csv include taxcalc/current_law_policy.json include taxcalc/behavior.json include taxcalc/growth.json