|
34 | 34 |
|
35 | 35 | # National calibration targets consumed by build_loss_matrix(). |
36 | 36 | # These values are specific to 2024 — they should NOT be applied to |
37 | | -# other years without re-sourcing. They are duplicated in |
38 | | -# db/etl_national_targets.py which loads them into policy_data.db. |
39 | | -# A future PR should wire build_loss_matrix() to read from the |
40 | | -# database so this dict can be deleted. See PR #488. |
| 37 | +# other years without re-sourcing. They must stay registered here for |
| 38 | +# ECPS calibration, in db/etl_national_targets.py for policy_data.db, |
| 39 | +# and in calibration/target_config.yaml when the default calibration |
| 40 | +# include list should train on them. A future PR should wire |
| 41 | +# build_loss_matrix() to read from the database so this duplication can |
| 42 | +# be deleted. See PR #488. |
41 | 43 |
|
42 | 44 | BEA_NIPA_WAGES_AND_SALARIES_2024 = 12_387_929_000_000 |
43 | 45 | BEA_NIPA_PROPRIETORS_INCOME_2024 = 2_023_080_000_000 |
44 | 46 | BEA_NIPA_PERSONAL_INTEREST_INCOME_2024 = 1_926_644_000_000 |
45 | 47 | BEA_NIPA_PERSONAL_DIVIDEND_INCOME_2024 = 2_218_700_000_000 |
46 | 48 |
|
47 | | -NIPA_PROPRIETORS_INCOME_VARIABLE = ( |
48 | | - "total_self_employment_income+farm_operations_income+partnership_s_corp_income" |
49 | | -) |
| 49 | +NIPA_PROPRIETORS_INCOME_VARIABLE = "nipa_proprietors_income" |
50 | 50 | NIPA_PERSONAL_INTEREST_INCOME_VARIABLE = "interest_income" |
51 | 51 | TAXABLE_INTEREST_AND_ORDINARY_DIVIDENDS_VARIABLE = ( |
52 | 52 | "taxable_interest_income+dividend_income" |
53 | 53 | ) |
54 | 54 |
|
| 55 | +BEA_NIPA_DIRECT_SUM_TARGETS = ( |
| 56 | + ( |
| 57 | + "nation/bea/nipa_wages_and_salaries", |
| 58 | + "employment_income_before_lsr", |
| 59 | + BEA_NIPA_WAGES_AND_SALARIES_2024, |
| 60 | + ), |
| 61 | + ( |
| 62 | + "nation/bea/nipa_proprietors_income", |
| 63 | + NIPA_PROPRIETORS_INCOME_VARIABLE, |
| 64 | + BEA_NIPA_PROPRIETORS_INCOME_2024, |
| 65 | + ), |
| 66 | + ( |
| 67 | + "nation/bea/nipa_personal_interest_income", |
| 68 | + NIPA_PERSONAL_INTEREST_INCOME_VARIABLE, |
| 69 | + BEA_NIPA_PERSONAL_INTEREST_INCOME_2024, |
| 70 | + ), |
| 71 | + ( |
| 72 | + "nation/bea/nipa_personal_dividend_income", |
| 73 | + "dividend_income", |
| 74 | + BEA_NIPA_PERSONAL_DIVIDEND_INCOME_2024, |
| 75 | + ), |
| 76 | +) |
| 77 | + |
55 | 78 | CBO_INCOME_BY_SOURCE_TARGETS = [ |
56 | 79 | ("irs_employment_income", "employment_income"), |
57 | 80 | ("self_employment_income", "self_employment_income"), |
@@ -1249,29 +1272,7 @@ def build_loss_matrix(dataset: type, time_period): |
1249 | 1272 | ) |
1250 | 1273 | targets_array.append(income_by_source._children[parameter]) |
1251 | 1274 |
|
1252 | | - bea_nipa_targets = [ |
1253 | | - ( |
1254 | | - "nation/bea/nipa_wages_and_salaries", |
1255 | | - "employment_income_before_lsr", |
1256 | | - BEA_NIPA_WAGES_AND_SALARIES_2024, |
1257 | | - ), |
1258 | | - ( |
1259 | | - "nation/bea/nipa_proprietors_income", |
1260 | | - NIPA_PROPRIETORS_INCOME_VARIABLE, |
1261 | | - BEA_NIPA_PROPRIETORS_INCOME_2024, |
1262 | | - ), |
1263 | | - ( |
1264 | | - "nation/bea/nipa_personal_interest_income", |
1265 | | - NIPA_PERSONAL_INTEREST_INCOME_VARIABLE, |
1266 | | - BEA_NIPA_PERSONAL_INTEREST_INCOME_2024, |
1267 | | - ), |
1268 | | - ( |
1269 | | - "nation/bea/nipa_personal_dividend_income", |
1270 | | - "dividend_income", |
1271 | | - BEA_NIPA_PERSONAL_DIVIDEND_INCOME_2024, |
1272 | | - ), |
1273 | | - ] |
1274 | | - for label, variable, target in bea_nipa_targets: |
| 1275 | + for label, variable, target in BEA_NIPA_DIRECT_SUM_TARGETS: |
1275 | 1276 | loss_matrix[label] = _calculate_household_target_values( |
1276 | 1277 | sim, |
1277 | 1278 | variable, |
|
0 commit comments