forked from PSLmodels/Business-Taxation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
demo.py
111 lines (91 loc) · 3.55 KB
/
demo.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
"""
Business-Taxation demo for PSL event
"""
import taxcalc as itax # capabilities of individual Tax-Calculator
from biztax import Policy, BusinessModel, Response
import pandas as pd
btax_reform_dict0 = {'tau_c': {2020: 0.20}}
# Create business Policy object
btax_policy_reform0 = Policy()
btax_policy_reform0.implement_reform(btax_reform_dict0)
# Create an individual-tax itax.Policy object with no reform
itax_policy_noreform0 = itax.Policy()
# Execute BusinessModel calculations with no response
BM0 = BusinessModel(btax_policy_reform0, itax_policy_noreform0,
investor_data='rpuf.csv')
BM0.calc_all(response=None)
print(BM0.model_results)
print('Change in corporate tax revenue ($B): ' +
str(sum(BM0.model_results['CTax_change'])))
btax_reform_dict1 = {
'depr_3yr_method': {2020: 'Expensing'},
'depr_5yr_method': {2020: 'Expensing'},
'depr_7yr_method': {2020: 'Expensing'},
'depr_10yr_method': {2020: 'Expensing'},
'depr_15yr_method': {2020: 'Expensing'},
'depr_20yr_method': {2020: 'Expensing'},
'depr_25yr_method': {2020: 'Expensing'},
'depr_275yr_method': {2020: 'Expensing'},
'depr_39yr_method': {2020: 'Expensing'},
'undepBasis_corp_hc': {2020: 1.0},
'undepBasis_corp_hcyear': {2020: 2020},
'undepBasis_noncorp_hc': {2020: 1.0},
'undepBasis_noncorp_hcyear': {2020: 2020},
'intPaid_corp_hc': {2020: 1.0},
'intPaid_noncorp_hc': {2020: 1.0},
'capgains_corp_hc': {2020: 1.0},
'statelocaltax_hc': {2020: 1.0},
'pymtc_hc': {2020: 1.0}
}
# Create business Policy object
btax_policy_reform1 = Policy()
btax_policy_reform1.implement_reform(btax_reform_dict1)
# Create an individual-tax itax.Policy object with no reform
itax_policy_noreform1 = itax.Policy()
# Execute BusinessModel calculations with no response
BM1 = BusinessModel(btax_policy_reform1, itax_policy_noreform1,
investor_data='rpuf.csv')
BM1.calc_all(response=None)
print(BM1.model_results)
print('Change in corporate tax revenue ($B): ' +
str(sum(BM1.model_results['CTax_change'])))
btax_reform_dict2 = {
'tau_c': {2020: 0.15},
'depr_3yr_method': {2020: 'Economic'},
'depr_5yr_method': {2020: 'Economic'},
'depr_7yr_method': {2020: 'Economic'},
'depr_10yr_method': {2020: 'Economic'},
'depr_15yr_method': {2020: 'Economic'},
'depr_20yr_method': {2020: 'Economic'},
'depr_25yr_method': {2020: 'Economic'},
'depr_275yr_method': {2020: 'Economic'},
'depr_39yr_method': {2020: 'Economic'},
'depr_3yr_bonus': {2020: 0.0},
'depr_5yr_bonus': {2020: 0.0},
'depr_7yr_bonus': {2020: 0.0},
'depr_10yr_bonus': {2020: 0.0},
'depr_15yr_bonus': {2020: 0.0},
'depr_20yr_bonus': {2020: 0.0},
'depr_25yr_bonus': {2020: 0.0},
'depr_275yr_bonus': {2020: 0.0},
'depr_39yr_bonus': {2020: 0.0},
'muniIntIncome_corp_hc': {2020: 0.0},
'adjustedTaxInc_limit': {2020: 9e99},
'statelocaltax_hc': {2020: 1.0},
'pymtc_hc': {2020: 1.0},
'GILTI_thd': {2020: 0.0},
'GILTI_inclusion': {2020: 1.0},
'fdii_rt': {2020: 0.0}
}
# Create business Policy object
btax_policy_reform2 = Policy()
btax_policy_reform2.implement_reform(btax_reform_dict2)
# Create an individual-tax itax.Policy object with no reform
itax_policy_noreform2 = itax.Policy()
# Execute BusinessModel calculations with no response
BM2 = BusinessModel(btax_policy_reform2, itax_policy_noreform2,
investor_data='rpuf.csv')
BM2.calc_all(response=None)
print(BM2.model_results)
print('Change in corporate tax revenue ($B): ' +
str(sum(BM2.model_results['CTax_change'])))