-
-
Notifications
You must be signed in to change notification settings - Fork 158
/
update_pcl.py
621 lines (542 loc) · 26.1 KB
/
update_pcl.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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
"""
This script uses known values of inflation-indexed policy parameters after
2022 to write an updated version of the taxcalc/policy_current_law.json file.
USAGE: (taxcalc-dev) T-C% python update_pcl.py
THEN CHECK: % diff pcl.json taxcalc/policy_current_law.json
IF DIFFS OK: % mv pcl.json taxcalc/policy_current_law.json
WHEN TO USE: use this script to update taxcalc/policy_current_law.json
whenever post-2016 inflation rates in the growfactors.csv files are changed,
or whenever new known policy parameter values are published.
"""
import os
import sys
import json
LIST_MARS_ZERO = [
{'year': 2023, 'MARS': 'single', 'value': 0.0},
{'year': 2023, 'MARS': 'mjoint', 'value': 0.0},
{'year': 2023, 'MARS': 'mseparate', 'value': 0.0},
{'year': 2023, 'MARS': 'headhh', 'value': 0.0},
{'year': 2023, 'MARS': 'widow', 'value': 0.0},
{'year': 2024, 'MARS': 'single', 'value': 0.0},
{'year': 2024, 'MARS': 'mjoint', 'value': 0.0},
{'year': 2024, 'MARS': 'mseparate', 'value': 0.0},
{'year': 2024, 'MARS': 'headhh', 'value': 0.0},
{'year': 2024, 'MARS': 'widow', 'value': 0.0},
{'year': 2025, 'MARS': 'single', 'value': 0.0},
{'year': 2025, 'MARS': 'mjoint', 'value': 0.0},
{'year': 2025, 'MARS': 'mseparate', 'value': 0.0},
{'year': 2025, 'MARS': 'headhh', 'value': 0.0},
{'year': 2025, 'MARS': 'widow', 'value': 0.0},
]
LIST_MARS_INF = [
{'year': 2023, 'MARS': 'single', 'value': 9e99},
{'year': 2023, 'MARS': 'mjoint', 'value': 9e99},
{'year': 2023, 'MARS': 'mseparate', 'value': 9e99},
{'year': 2023, 'MARS': 'headhh', 'value': 9e99},
{'year': 2023, 'MARS': 'widow', 'value': 9e99},
{'year': 2024, 'MARS': 'single', 'value': 9e99},
{'year': 2024, 'MARS': 'mjoint', 'value': 9e99},
{'year': 2024, 'MARS': 'mseparate', 'value': 9e99},
{'year': 2024, 'MARS': 'headhh', 'value': 9e99},
{'year': 2024, 'MARS': 'widow', 'value': 9e99},
{'year': 2025, 'MARS': 'single', 'value': 9e99},
{'year': 2025, 'MARS': 'mjoint', 'value': 9e99},
{'year': 2025, 'MARS': 'mseparate', 'value': 9e99},
{'year': 2025, 'MARS': 'headhh', 'value': 9e99},
{'year': 2025, 'MARS': 'widow', 'value': 9e99},
]
LIST_SCALAR_ZERO = [
{'year': 2023, 'value': 0.0},
{'year': 2024, 'value': 0.0},
{'year': 2025, 'value': 0.0},
]
NEW_KNOWN_ITEMS = {
# PAYROLL TAX PARAMETER SOURCES:
# - SSA Office of the Chief Actuary: Contribution and Benefit Base
# https://www.ssa.gov/OACT/COLA/cbb.html
'SS_Earnings_c': [
{'year': 2023, 'value': 160200.0},
{'year': 2024, 'value': 168600.0},
{'year': 2025, 'value': 176100.0},
],
# INCOME TAX PARAMETER SOURCES:
# - IRS Rev. Proc. 2022-38 containing 2023 policy parameter values is at:
# https://www.irs.gov/pub/irs-drop/rp-22-38.pdf
# - IRS Rev. Proc. 2023-34 containing 2024 policy parameter values is at:
# https://www.irs.gov/pub/irs-drop/rp-23-34.pdf
# - IRS Rev. Proc. 2024-40 containing 2025 policy parameter values is at:
# https://www.irs.gov/pub/irs-drop/rp-24-40.pdf
'II_brk1': [
{'year': 2023, 'MARS': 'single', 'value': 11000.0},
{'year': 2023, 'MARS': 'mjoint', 'value': 22000.0},
{'year': 2023, 'MARS': 'mseparate', 'value': 11000.0},
{'year': 2023, 'MARS': 'headhh', 'value': 15700.0},
{'year': 2023, 'MARS': 'widow', 'value': 22000.0},
{'year': 2024, 'MARS': 'single', 'value': 11600.0},
{'year': 2024, 'MARS': 'mjoint', 'value': 23200.0},
{'year': 2024, 'MARS': 'mseparate', 'value': 11600.0},
{'year': 2024, 'MARS': 'headhh', 'value': 16550.0},
{'year': 2024, 'MARS': 'widow', 'value': 23200.0},
{'year': 2025, 'MARS': 'single', 'value': 11925.0},
{'year': 2025, 'MARS': 'mjoint', 'value': 23850.0},
{'year': 2025, 'MARS': 'mseparate', 'value': 11925.0},
{'year': 2025, 'MARS': 'headhh', 'value': 17000.0},
{'year': 2025, 'MARS': 'widow', 'value': 23850.0},
],
'II_brk2': [
{'year': 2023, 'MARS': 'single', 'value': 44725.},
{'year': 2023, 'MARS': 'mjoint', 'value': 89450.0},
{'year': 2023, 'MARS': 'mseparate', 'value': 44725.0},
{'year': 2023, 'MARS': 'headhh', 'value': 59850.0},
{'year': 2023, 'MARS': 'widow', 'value': 89450.0},
{'year': 2024, 'MARS': 'single', 'value': 47150.0},
{'year': 2024, 'MARS': 'mjoint', 'value': 94300.0},
{'year': 2024, 'MARS': 'mseparate', 'value': 47150.0},
{'year': 2024, 'MARS': 'headhh', 'value': 63100.0},
{'year': 2024, 'MARS': 'widow', 'value': 94300.0},
{'year': 2025, 'MARS': 'single', 'value': 48475.0},
{'year': 2025, 'MARS': 'mjoint', 'value': 96950.0},
{'year': 2025, 'MARS': 'mseparate', 'value': 48475.0},
{'year': 2025, 'MARS': 'headhh', 'value': 64850.0},
{'year': 2025, 'MARS': 'widow', 'value': 96950.0},
],
'II_brk3': [
{'year': 2023, 'MARS': 'single', 'value': 95375.0},
{'year': 2023, 'MARS': 'mjoint', 'value': 190750.0},
{'year': 2023, 'MARS': 'mseparate', 'value': 95375.0},
{'year': 2023, 'MARS': 'headhh', 'value': 95350.0},
{'year': 2023, 'MARS': 'widow', 'value': 190750.0},
{'year': 2024, 'MARS': 'single', 'value': 100525.0},
{'year': 2024, 'MARS': 'mjoint', 'value': 201050.0},
{'year': 2024, 'MARS': 'mseparate', 'value': 100525.0},
{'year': 2024, 'MARS': 'headhh', 'value': 100500.0},
{'year': 2024, 'MARS': 'widow', 'value': 201050.0},
{'year': 2025, 'MARS': 'single', 'value': 103350.0},
{'year': 2025, 'MARS': 'mjoint', 'value': 206700.0},
{'year': 2025, 'MARS': 'mseparate', 'value': 103350.0},
{'year': 2025, 'MARS': 'headhh', 'value': 103350.0},
{'year': 2025, 'MARS': 'widow', 'value': 206700.0},
],
'II_brk4': [
{'year': 2023, 'MARS': 'single', 'value': 182100.0},
{'year': 2023, 'MARS': 'mjoint', 'value': 364200.0},
{'year': 2023, 'MARS': 'mseparate', 'value': 182100.0},
{'year': 2023, 'MARS': 'headhh', 'value': 182100.0},
{'year': 2023, 'MARS': 'widow', 'value': 364200.0},
{'year': 2024, 'MARS': 'single', 'value': 191950.0},
{'year': 2024, 'MARS': 'mjoint', 'value': 383900.0},
{'year': 2024, 'MARS': 'mseparate', 'value': 191950.0},
{'year': 2024, 'MARS': 'headhh', 'value': 191950.0},
{'year': 2024, 'MARS': 'widow', 'value': 383900.0},
{'year': 2025, 'MARS': 'single', 'value': 197300.0},
{'year': 2025, 'MARS': 'mjoint', 'value': 394600.0},
{'year': 2025, 'MARS': 'mseparate', 'value': 197300.0},
{'year': 2025, 'MARS': 'headhh', 'value': 197300.0},
{'year': 2025, 'MARS': 'widow', 'value': 394600.0},
],
'II_brk5': [
{'year': 2023, 'MARS': 'single', 'value': 231250.0},
{'year': 2023, 'MARS': 'mjoint', 'value': 462500.0},
{'year': 2023, 'MARS': 'mseparate', 'value': 231250.0},
{'year': 2023, 'MARS': 'headhh', 'value': 231250.0},
{'year': 2023, 'MARS': 'widow', 'value': 462500.0},
{'year': 2024, 'MARS': 'single', 'value': 243725.0},
{'year': 2024, 'MARS': 'mjoint', 'value': 487450.0},
{'year': 2024, 'MARS': 'mseparate', 'value': 243725.0},
{'year': 2024, 'MARS': 'headhh', 'value': 243700.0},
{'year': 2024, 'MARS': 'widow', 'value': 487450.0},
{'year': 2025, 'MARS': 'single', 'value': 250525.0},
{'year': 2025, 'MARS': 'mjoint', 'value': 501050.0},
{'year': 2025, 'MARS': 'mseparate', 'value': 250525.0},
{'year': 2025, 'MARS': 'headhh', 'value': 250500.0},
{'year': 2025, 'MARS': 'widow', 'value': 501050.0},
],
'II_brk6': [
{'year': 2023, 'MARS': 'single', 'value': 578125.0},
{'year': 2023, 'MARS': 'mjoint', 'value': 693750.0},
{'year': 2023, 'MARS': 'mseparate', 'value': 578125.0},
{'year': 2023, 'MARS': 'headhh', 'value': 578100.0},
{'year': 2023, 'MARS': 'widow', 'value': 693750.0},
{'year': 2024, 'MARS': 'single', 'value': 609350.0},
{'year': 2024, 'MARS': 'mjoint', 'value': 731200.0},
{'year': 2024, 'MARS': 'mseparate', 'value': 365600.0},
{'year': 2024, 'MARS': 'headhh', 'value': 609350.0},
{'year': 2024, 'MARS': 'widow', 'value': 731200.0},
{'year': 2025, 'MARS': 'single', 'value': 626350.0},
{'year': 2025, 'MARS': 'mjoint', 'value': 751600.0},
{'year': 2025, 'MARS': 'mseparate', 'value': 375800.0},
{'year': 2025, 'MARS': 'headhh', 'value': 626350.0},
{'year': 2025, 'MARS': 'widow', 'value': 751600.0},
],
'II_brk7': [
{'year': 2023, 'MARS': 'single', 'value': 9e99},
{'year': 2023, 'MARS': 'mjoint', 'value': 9e99},
{'year': 2023, 'MARS': 'mseparate', 'value': 9e99},
{'year': 2023, 'MARS': 'headhh', 'value': 9e99},
{'year': 2023, 'MARS': 'widow', 'value': 9e99},
{'year': 2024, 'MARS': 'single', 'value': 9e99},
{'year': 2024, 'MARS': 'mjoint', 'value': 9e99},
{'year': 2024, 'MARS': 'mseparate', 'value': 9e99},
{'year': 2024, 'MARS': 'headhh', 'value': 9e99},
{'year': 2024, 'MARS': 'widow', 'value': 9e99},
{'year': 2025, 'MARS': 'single', 'value': 9e99},
{'year': 2025, 'MARS': 'mjoint', 'value': 9e99},
{'year': 2025, 'MARS': 'mseparate', 'value': 9e99},
{'year': 2025, 'MARS': 'headhh', 'value': 9e99},
{'year': 2025, 'MARS': 'widow', 'value': 9e99},
],
'CG_brk1': [
{'year': 2023, 'MARS': 'single', 'value': 44625.0},
{'year': 2023, 'MARS': 'mjoint', 'value': 89250.0},
{'year': 2023, 'MARS': 'mseparate', 'value': 44625.0},
{'year': 2023, 'MARS': 'headhh', 'value': 59750.0},
{'year': 2023, 'MARS': 'widow', 'value': 89250.0},
{'year': 2024, 'MARS': 'single', 'value': 47025.0},
{'year': 2024, 'MARS': 'mjoint', 'value': 94050.0},
{'year': 2024, 'MARS': 'mseparate', 'value': 47025.0},
{'year': 2024, 'MARS': 'headhh', 'value': 63000.0},
{'year': 2024, 'MARS': 'widow', 'value': 94050.0},
{'year': 2025, 'MARS': 'single', 'value': 48350.0},
{'year': 2025, 'MARS': 'mjoint', 'value': 96700.0},
{'year': 2025, 'MARS': 'mseparate', 'value': 48350.0},
{'year': 2025, 'MARS': 'headhh', 'value': 64750.0},
{'year': 2025, 'MARS': 'widow', 'value': 96700.0},
],
'CG_brk2': [
{'year': 2023, 'MARS': 'single', 'value': 492300.0},
{'year': 2023, 'MARS': 'mjoint', 'value': 553850.0},
{'year': 2023, 'MARS': 'mseparate', 'value': 276900.0},
{'year': 2023, 'MARS': 'headhh', 'value': 523050.0},
{'year': 2023, 'MARS': 'widow', 'value': 553850.0},
{'year': 2024, 'MARS': 'single', 'value': 518900.0},
{'year': 2024, 'MARS': 'mjoint', 'value': 583750.0},
{'year': 2024, 'MARS': 'mseparate', 'value': 291850.0},
{'year': 2024, 'MARS': 'headhh', 'value': 551350.0},
{'year': 2024, 'MARS': 'widow', 'value': 583750.0},
{'year': 2025, 'MARS': 'single', 'value': 533400.0},
{'year': 2025, 'MARS': 'mjoint', 'value': 600050.0},
{'year': 2025, 'MARS': 'mseparate', 'value': 300000.0},
{'year': 2025, 'MARS': 'headhh', 'value': 566700.0},
{'year': 2025, 'MARS': 'widow', 'value': 600050.0},
],
'CG_brk3': [
{'year': 2023, 'MARS': 'single', 'value': 9e99},
{'year': 2023, 'MARS': 'mjoint', 'value': 9e99},
{'year': 2023, 'MARS': 'mseparate', 'value': 9e99},
{'year': 2023, 'MARS': 'headhh', 'value': 9e99},
{'year': 2023, 'MARS': 'widow', 'value': 9e99},
{'year': 2024, 'MARS': 'single', 'value': 9e99},
{'year': 2024, 'MARS': 'mjoint', 'value': 9e99},
{'year': 2024, 'MARS': 'mseparate', 'value': 9e99},
{'year': 2024, 'MARS': 'headhh', 'value': 9e99},
{'year': 2024, 'MARS': 'widow', 'value': 9e99},
{'year': 2025, 'MARS': 'single', 'value': 9e99},
{'year': 2025, 'MARS': 'mjoint', 'value': 9e99},
{'year': 2025, 'MARS': 'mseparate', 'value': 9e99},
{'year': 2025, 'MARS': 'headhh', 'value': 9e99},
{'year': 2025, 'MARS': 'widow', 'value': 9e99},
],
'EITC_c': [
{'year': 2023, 'EIC': '0kids', 'value': 600.0},
{'year': 2023, 'EIC': '1kid', 'value': 3995.0},
{'year': 2023, 'EIC': '2kids', 'value': 6604.0},
{'year': 2023, 'EIC': '3+kids', 'value': 7430.0},
{'year': 2024, 'EIC': '0kids', 'value': 632.0},
{'year': 2024, 'EIC': '1kid', 'value': 4213.0},
{'year': 2024, 'EIC': '2kids', 'value': 6960.0},
{'year': 2024, 'EIC': '3+kids', 'value': 7830.0},
{'year': 2025, 'EIC': '0kids', 'value': 649.0},
{'year': 2025, 'EIC': '1kid', 'value': 4328.0},
{'year': 2025, 'EIC': '2kids', 'value': 7152.0},
{'year': 2025, 'EIC': '3+kids', 'value': 8046.0},
],
'EITC_ps': [
{'year': 2023, 'EIC': '0kids', 'value': 9800.0},
{'year': 2023, 'EIC': '1kid', 'value': 21560.0},
{'year': 2023, 'EIC': '2kids', 'value': 21560.0},
{'year': 2023, 'EIC': '3+kids', 'value': 21560.0},
{'year': 2024, 'EIC': '0kids', 'value': 10330.0},
{'year': 2024, 'EIC': '1kid', 'value': 22720.0},
{'year': 2024, 'EIC': '2kids', 'value': 22720.0},
{'year': 2024, 'EIC': '3+kids', 'value': 22720.0},
{'year': 2025, 'EIC': '0kids', 'value': 10620.0},
{'year': 2025, 'EIC': '1kid', 'value': 23350.0},
{'year': 2025, 'EIC': '2kids', 'value': 23350.0},
{'year': 2025, 'EIC': '3+kids', 'value': 23350.0},
],
'EITC_ps_MarriedJ': [
{'year': 2023, 'EIC': '0kids', 'value': 6570.0},
{'year': 2023, 'EIC': '1kid', 'value': 6560.0},
{'year': 2023, 'EIC': '2kids', 'value': 6560.0},
{'year': 2023, 'EIC': '3+kids', 'value': 6560.0},
{'year': 2024, 'EIC': '0kids', 'value': 6920.0},
{'year': 2024, 'EIC': '1kid', 'value': 6920.0},
{'year': 2024, 'EIC': '2kids', 'value': 6920.0},
{'year': 2024, 'EIC': '3+kids', 'value': 6920.0},
{'year': 2025, 'EIC': '0kids', 'value': 7110.0},
{'year': 2025, 'EIC': '1kid', 'value': 7120.0},
{'year': 2025, 'EIC': '2kids', 'value': 7120.0},
{'year': 2025, 'EIC': '3+kids', 'value': 7120.0},
],
'EITC_InvestIncome_c': [
{'year': 2023, 'value': 11000.0},
{'year': 2024, 'value': 11600.0},
{'year': 2025, 'value': 11950.0},
],
'AMT_brk1': [
{'year': 2023, 'value': 220700.0},
{'year': 2024, 'value': 232600.0},
{'year': 2025, 'value': 239100.0},
],
'AMT_em': [
{'year': 2023, 'MARS': 'single', 'value': 81300.0},
{'year': 2023, 'MARS': 'mjoint', 'value': 126500.0},
{'year': 2023, 'MARS': 'mseparate', 'value': 63250.0},
{'year': 2023, 'MARS': 'headhh', 'value': 81300.0},
{'year': 2023, 'MARS': 'widow', 'value': 126500.0},
{'year': 2024, 'MARS': 'single', 'value': 85700.0},
{'year': 2024, 'MARS': 'mjoint', 'value': 133300.0},
{'year': 2024, 'MARS': 'mseparate', 'value': 66650.0},
{'year': 2024, 'MARS': 'headhh', 'value': 85700.0},
{'year': 2024, 'MARS': 'widow', 'value': 133300.0},
{'year': 2025, 'MARS': 'single', 'value': 88100.0},
{'year': 2025, 'MARS': 'mjoint', 'value': 137000.0},
{'year': 2025, 'MARS': 'mseparate', 'value': 68500.0},
{'year': 2025, 'MARS': 'headhh', 'value': 88100.0},
{'year': 2025, 'MARS': 'widow', 'value': 137000.0},
],
'AMT_em_ps': [
{'year': 2023, 'MARS': 'single', 'value': 578150.0},
{'year': 2023, 'MARS': 'mjoint', 'value': 1156300.0},
{'year': 2023, 'MARS': 'mseparate', 'value': 578150.0},
{'year': 2023, 'MARS': 'headhh', 'value': 578150.0},
{'year': 2023, 'MARS': 'widow', 'value': 1156300.0},
{'year': 2024, 'MARS': 'single', 'value': 609350.0},
{'year': 2024, 'MARS': 'mjoint', 'value': 1218700.0},
{'year': 2024, 'MARS': 'mseparate', 'value': 609350.0},
{'year': 2024, 'MARS': 'headhh', 'value': 609350.0},
{'year': 2024, 'MARS': 'widow', 'value': 1218700.0},
{'year': 2025, 'MARS': 'single', 'value': 626350.0},
{'year': 2025, 'MARS': 'mjoint', 'value': 1252700.0},
{'year': 2025, 'MARS': 'mseparate', 'value': 626350.0},
{'year': 2025, 'MARS': 'headhh', 'value': 626350.0},
{'year': 2025, 'MARS': 'widow', 'value': 1252700.0},
],
'AMT_em_pe': [
{"year": 2023, "value": 831150.0},
{"year": 2024, "value": 875950.0},
{"year": 2025, "value": 900350.0},
],
'AMT_child_em': [
{'year': 2023, 'value': 8800.0},
{'year': 2024, 'value': 9250.0},
{'year': 2025, 'value': 9550.0},
],
'STD': [
{'year': 2023, 'MARS': 'single', 'value': 13850.0},
{'year': 2023, 'MARS': 'mjoint', 'value': 27700.0},
{'year': 2023, 'MARS': 'mseparate', 'value': 13850.0},
{'year': 2023, 'MARS': 'headhh', 'value': 20800.0},
{'year': 2023, 'MARS': 'widow', 'value': 27700.0},
{'year': 2024, 'MARS': 'single', 'value': 14600.0},
{'year': 2024, 'MARS': 'mjoint', 'value': 29200.0},
{'year': 2024, 'MARS': 'mseparate', 'value': 14600.0},
{'year': 2024, 'MARS': 'headhh', 'value': 21900.0},
{'year': 2024, 'MARS': 'widow', 'value': 29200.0},
{'year': 2025, 'MARS': 'single', 'value': 15000.0},
{'year': 2025, 'MARS': 'mjoint', 'value': 30000.0},
{'year': 2025, 'MARS': 'mseparate', 'value': 15000.0},
{'year': 2025, 'MARS': 'headhh', 'value': 22500.0},
{'year': 2025, 'MARS': 'widow', 'value': 30000.0},
],
'STD_Dep': [
{'year': 2023, 'value': 1250.0},
{'year': 2024, 'value': 1300.0},
{'year': 2025, 'value': 1350.0},
],
'STD_Aged': [
{'year': 2023, 'MARS': 'single', 'value': 1800.0},
{'year': 2023, 'MARS': 'mjoint', 'value': 1500.0},
{'year': 2023, 'MARS': 'mseparate', 'value': 1500.0},
{'year': 2023, 'MARS': 'headhh', 'value': 1800.0},
{'year': 2023, 'MARS': 'widow', 'value': 1800.0},
{'year': 2024, 'MARS': 'single', 'value': 1950.0},
{'year': 2024, 'MARS': 'mjoint', 'value': 1550.0},
{'year': 2024, 'MARS': 'mseparate', 'value': 1550.0},
{'year': 2024, 'MARS': 'headhh', 'value': 1950.0},
{'year': 2024, 'MARS': 'widow', 'value': 1950.0},
{'year': 2025, 'MARS': 'single', 'value': 2000.0},
{'year': 2025, 'MARS': 'mjoint', 'value': 1600.0},
{'year': 2025, 'MARS': 'mseparate', 'value': 1600.0},
{'year': 2025, 'MARS': 'headhh', 'value': 2000.0},
{'year': 2025, 'MARS': 'widow', 'value': 1600.0},
],
'PT_qbid_taxinc_thd': [
{'year': 2023, 'MARS': 'single', 'value': 182100.0},
{'year': 2023, 'MARS': 'mjoint', 'value': 364200.0},
{'year': 2023, 'MARS': 'mseparate', 'value': 182100.0},
{'year': 2023, 'MARS': 'headhh', 'value': 182100.0},
{'year': 2023, 'MARS': 'widow', 'value': 182100.0},
{'year': 2024, 'MARS': 'single', 'value': 191950.0},
{'year': 2024, 'MARS': 'mjoint', 'value': 383900.0},
{'year': 2024, 'MARS': 'mseparate', 'value': 191950.0},
{'year': 2024, 'MARS': 'headhh', 'value': 191950.0},
{'year': 2024, 'MARS': 'widow', 'value': 191950.0},
{'year': 2025, 'MARS': 'single', 'value': 197300.0},
{'year': 2025, 'MARS': 'mjoint', 'value': 394600.0},
{'year': 2025, 'MARS': 'mseparate', 'value': 197300.0},
{'year': 2025, 'MARS': 'headhh', 'value': 197300.0},
{'year': 2025, 'MARS': 'widow', 'value': 197300.0},
],
'ALD_BusinessLosses_c': [
{'year': 2023, 'MARS': 'single', 'value': 289000.0},
{'year': 2023, 'MARS': 'mjoint', 'value': 578000.0},
{'year': 2023, 'MARS': 'mseparate', 'value': 289000.0},
{'year': 2023, 'MARS': 'headhh', 'value': 289000.0},
{'year': 2023, 'MARS': 'widow', 'value': 578000.0},
{'year': 2024, 'MARS': 'single', 'value': 305000.0},
{'year': 2024, 'MARS': 'mjoint', 'value': 610000.0},
{'year': 2024, 'MARS': 'mseparate', 'value': 305000.0},
{'year': 2024, 'MARS': 'headhh', 'value': 305000.0},
{'year': 2024, 'MARS': 'widow', 'value': 610000.0},
{'year': 2025, 'MARS': 'single', 'value': 313000.0},
{'year': 2025, 'MARS': 'mjoint', 'value': 626000.0},
{'year': 2025, 'MARS': 'mseparate', 'value': 313000.0},
{'year': 2025, 'MARS': 'headhh', 'value': 313000.0},
{'year': 2025, 'MARS': 'widow', 'value': 626000.0},
],
'FST_AGI_thd_lo': [ # not part of current-law policy, but needs to be here
{'year': 2023, 'MARS': 'single', 'value': 1000000.0},
{'year': 2023, 'MARS': 'mjoint', 'value': 1000000.0},
{'year': 2023, 'MARS': 'mseparate', 'value': 500000.0},
{'year': 2023, 'MARS': 'headhh', 'value': 1000000.0},
{'year': 2023, 'MARS': 'widow', 'value': 1000000.0},
{'year': 2024, 'MARS': 'single', 'value': 1000000.0},
{'year': 2024, 'MARS': 'mjoint', 'value': 1000000.0},
{'year': 2024, 'MARS': 'mseparate', 'value': 500000.0},
{'year': 2024, 'MARS': 'headhh', 'value': 1000000.0},
{'year': 2024, 'MARS': 'widow', 'value': 1000000.0},
{'year': 2025, 'MARS': 'single', 'value': 1000000.0},
{'year': 2025, 'MARS': 'mjoint', 'value': 1000000.0},
{'year': 2025, 'MARS': 'mseparate', 'value': 500000.0},
{'year': 2025, 'MARS': 'headhh', 'value': 1000000.0},
{'year': 2025, 'MARS': 'widow', 'value': 1000000.0},
# each year's values are the same as for the prior year
],
'FST_AGI_thd_hi': [ # not part of current-law policy, but needs to be here
{'year': 2023, 'MARS': 'single', 'value': 2000000.0},
{'year': 2023, 'MARS': 'mjoint', 'value': 2000000.0},
{'year': 2023, 'MARS': 'mseparate', 'value': 1000000.0},
{'year': 2023, 'MARS': 'headhh', 'value': 2000000.0},
{'year': 2023, 'MARS': 'widow', 'value': 2000000.0},
{'year': 2024, 'MARS': 'single', 'value': 2000000.0},
{'year': 2024, 'MARS': 'mjoint', 'value': 2000000.0},
{'year': 2024, 'MARS': 'mseparate', 'value': 1000000.0},
{'year': 2024, 'MARS': 'headhh', 'value': 2000000.0},
{'year': 2024, 'MARS': 'widow', 'value': 2000000.0},
{'year': 2025, 'MARS': 'single', 'value': 2000000.0},
{'year': 2025, 'MARS': 'mjoint', 'value': 2000000.0},
{'year': 2025, 'MARS': 'mseparate', 'value': 1000000.0},
{'year': 2025, 'MARS': 'headhh', 'value': 2000000.0},
{'year': 2025, 'MARS': 'widow', 'value': 2000000.0},
# each year's values are the same as for the prior year
],
# ITEMS NOT PART OF CURRENT-LAW POLICY IN 2022-2025 PERIOD:
'ALD_Dependents_Child_c': LIST_SCALAR_ZERO,
'ALD_Dependents_Elder_c': LIST_SCALAR_ZERO,
'II_em': LIST_SCALAR_ZERO,
'II_em_ps': LIST_MARS_INF,
'II_credit': LIST_MARS_ZERO,
'II_credit_ps': LIST_MARS_ZERO,
'II_credit_nr': LIST_MARS_ZERO,
'II_credit_nr_ps': LIST_MARS_ZERO,
'ID_Medical_c': LIST_MARS_INF,
'ID_StateLocalTax_c': LIST_MARS_INF,
'ID_RealEstate_c': LIST_MARS_INF,
'ID_InterestPaid_c': LIST_MARS_INF,
'ID_Charity_c': LIST_MARS_INF,
'ID_Casualty_c': LIST_MARS_INF,
'ID_Miscellaneous_c': LIST_MARS_INF,
'ID_ps': LIST_MARS_INF,
'ID_BenefitSurtax_em': LIST_MARS_ZERO,
'ID_c': LIST_MARS_INF,
'CG_ec': LIST_SCALAR_ZERO,
'PT_qbid_ps': LIST_MARS_INF,
'RPTC_c': LIST_SCALAR_ZERO,
'CTC_new_ps': LIST_MARS_ZERO,
'AGI_surtax_thd': LIST_MARS_INF,
'UBI_u18': LIST_SCALAR_ZERO,
'UBI_1820': LIST_SCALAR_ZERO,
'UBI_21': LIST_SCALAR_ZERO,
}
for num in range(1, 7 + 1):
NEW_KNOWN_ITEMS[f'PT_brk{num}'] = NEW_KNOWN_ITEMS[f'II_brk{num}']
for num in range(1, 3 + 1):
NEW_KNOWN_ITEMS[f'AMT_CG_brk{num}'] = NEW_KNOWN_ITEMS[f'CG_brk{num}']
CHECK_FOR_MISSING = False
def check_for_missing(pdict):
"""
Prints to sdtout indexed parameters with missing values in or before 2022.
"""
first_year = 2013
last_known_year = 2022
for pname, pinfo in pdict.items():
if pname == 'schema':
continue
if not pinfo['indexed']:
continue
years_used = []
plist = pinfo['value']
for item in plist:
year = item['year']
if year <= last_known_year:
if year not in years_used:
years_used.append(year)
for year in range(first_year, last_known_year + 1):
if year not in years_used:
print(f'MISSING INDEXED VALUE FOR {pname} IN {year}')
def main():
"""
High-level script logic.
"""
# read existing policy_current_law.json into a Python dictionary
fname = os.path.join('taxcalc', 'policy_current_law.json')
with open(fname, 'r', encoding='utf-8') as jfile:
pdict = json.load(jfile)
# optionally check for missing indexed parameters in years <= 2022
if CHECK_FOR_MISSING:
check_for_missing(pdict)
return 1
# add parameter values to dictionary
for pname, pinfo in pdict.items():
if pname == 'schema':
continue
if not pinfo['indexed']:
continue
if pname not in NEW_KNOWN_ITEMS:
print(f'NO NEW_KNOWN_ITEMS FOR {pname}')
continue
plist = pdict[pname]['value']
# ... see if adding values before existing plist items for 2026
bindex = None
for itm in plist:
if itm['year'] == 2026:
bindex = plist.index(itm)
break
# ... add new items to plist for this pname
for item in NEW_KNOWN_ITEMS[pname]:
if item in plist:
continue
if bindex:
plist.insert(bindex, item)
bindex += 1
else:
plist.append(item)
# write updated dictionary to pcl.json file
with open('pcl.json', 'w', encoding='utf-8') as jfile:
jfile.write(json.dumps(pdict, indent=4) + '\n')
# return no-error exit code
return 0
# end main function code
if __name__ == '__main__':
sys.exit(main())