1212# is updated with new projection years, datasets will automatically
1313# extend to match — no hardcoded year constant to maintain.
1414CPI_U_PARAM_PATH = "gov.bls.cpi.cpi_u"
15+ DEFAULT_MICRODATA_UPRATING = (
16+ "calibration.gov.cbo.income_by_source.adjusted_gross_income"
17+ )
18+
19+ MICRODATA_UPRATING_OVERRIDES = {
20+ "american_opportunity_credit" : DEFAULT_MICRODATA_UPRATING ,
21+ "cdcc_relevant_expenses" : DEFAULT_MICRODATA_UPRATING ,
22+ "employment_income" : "calibration.gov.irs.soi.employment_income" ,
23+ "employment_income_last_year" : "calibration.gov.irs.soi.employment_income" ,
24+ "energy_efficient_home_improvement_credit" : DEFAULT_MICRODATA_UPRATING ,
25+ "foreign_tax_credit" : DEFAULT_MICRODATA_UPRATING ,
26+ "interest_deduction" : DEFAULT_MICRODATA_UPRATING ,
27+ "long_term_capital_gains" : "calibration.gov.irs.soi.long_term_capital_gains" ,
28+ "misc_deduction" : DEFAULT_MICRODATA_UPRATING ,
29+ "person_weight" : "calibration.gov.census.populations.total" ,
30+ "pre_tax_contributions" : DEFAULT_MICRODATA_UPRATING ,
31+ "rent" : "gov.bls.cpi.cpi_u" ,
32+ "savers_credit" : DEFAULT_MICRODATA_UPRATING ,
33+ "self_employment_income" : "calibration.gov.irs.soi.self_employment_income" ,
34+ "self_employed_health_insurance_ald" : DEFAULT_MICRODATA_UPRATING ,
35+ "self_employed_pension_contribution_ald" : DEFAULT_MICRODATA_UPRATING ,
36+ "social_security" : "calibration.gov.irs.soi.social_security" ,
37+ "spm_unit_weight" : "calibration.gov.census.populations.total" ,
38+ "spm_unit_spm_threshold" : DEFAULT_MICRODATA_UPRATING ,
39+ "state_and_local_sales_or_income_tax" : DEFAULT_MICRODATA_UPRATING ,
40+ "sstb_self_employment_income" : "calibration.gov.irs.soi.self_employment_income" ,
41+ "taxable_pension_income" : "calibration.gov.irs.soi.taxable_pension_income" ,
42+ "taxable_unemployment_compensation" : DEFAULT_MICRODATA_UPRATING ,
43+ "tax_unit_weight" : "calibration.gov.census.populations.total" ,
44+ "tax_exempt_pension_income" : DEFAULT_MICRODATA_UPRATING ,
45+ "total_self_employment_income" : "calibration.gov.irs.soi.self_employment_income" ,
46+ }
1547
1648
1749def get_parameter_last_year (parameter ) -> int :
@@ -100,11 +132,10 @@ def _apply_uprating(dataset: USMultiYearDataset, system=None) -> USMultiYearData
100132def _apply_single_year_uprating (current , previous , system ):
101133 """Apply multiplicative uprating from previous year to current year.
102134
103- For each variable column in each entity DataFrame, looks up the
104- variable's uprating parameter path in ``system.variables``. If the
105- variable has an uprating parameter, computes the growth factor as
106- ``param(current_year) / param(previous_year)`` and multiplies the
107- column by that factor.
135+ For each variable column in each entity DataFrame, looks up its
136+ dataset-extension uprating parameter path. Formula and adds/subtracts
137+ variables cannot use Core variable-level uprating, so their dataset-only
138+ upraters live in ``MICRODATA_UPRATING_OVERRIDES`` instead.
108139
109140 Variables without an uprating parameter (or whose uprating parameter
110141 evaluates to 0 for the previous year) are left unchanged — they were
@@ -122,7 +153,9 @@ def _apply_single_year_uprating(current, previous, system):
122153 if col not in system .variables :
123154 continue
124155 var = system .variables [col ]
125- uprating_path = getattr (var , "uprating" , None )
156+ uprating_path = MICRODATA_UPRATING_OVERRIDES .get (col ) or getattr (
157+ var , "uprating" , None
158+ )
126159 if uprating_path is None :
127160 continue
128161
0 commit comments