Repository navigation
Hold imports to BEA's summary groups in the balance, and condition service exports on the summary rows (#1288, #1250) - #1303
WesIngwersen wants to merge 3 commits into
Conversation
…vice exports on summary F040 (#1288, #1250) Two flags, both off: - hold_imports_on_summary_groups: the Step 5 balance holds MCIF by summary group (import_group_holds, the same GroupHold as TOP/SUB) instead of one soft column total. In 2017 service imports enter at the published $267.2bn and leave at $247.0bn. - condition_service_exports_on_summary: each service summary group of F04000 is scaled to BEA's summary Use F040; the ITA growth blends keep only the detail split. Goods exports stay on Census trade. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…itioned (#1250) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Test rebuild: both fixes work, and the tables still balanceRun 43442148416, build Service exports (#1250). Every service row equals BEA's summary Service imports (#1288). Within 0.1% of BEA every year:
The largest remaining row miss is other professional services ( Where the restored imports went. Service rows,
Domestic production moves the same amount onto goods commodities, so industry output is unchanged. The largest moves are inside the professional services block: scientific R&D ( Balance. Next. Turning the flags on means a re-pin to a build of this code, as in #1302. 🤖 Generated with Claude Code |
Impact on N: small, with one outlierTotal emission factors (N) on the test build
The largest movers other than the outlier are under 3.2% in every year: computers ( The outlier is 🤖 Generated with Claude Code |
Closes #1288 and #1250 once the rebuild grades clean. Both flags are off in this PR. They get turned on with the re-pin after the test rebuild, as #1260 and #1302 did.
What this does
1.
hold_imports_on_summary_groups(#1288). #785 scales each summary group of the seed's imports (MCIF) to BEA's summary Supply table. The Step 5 balance, though, holds imports only as one soft column total (T7), and the service import cells are free, so the commodity identities move imports between groups. In 2017, service imports enter the balance at the published $267.2bn and leave at $247.0bn (v1.0.0_fd271dc).With the flag, the balance holds
MCIFby summary group, the same way it already holdsTOP/SUB(GroupHold). The newimport_group_holdstargets BEA's summaryMCIFfor each group, less the frozen cells. The detail cells inside a group stay free, and the held groups replace the T7 column total. Restored service imports then raise those rows' supply, so the balance has to raise their use too, mostly business services bought by industries.2.
condition_service_exports_on_summary(#1250). Service exports (F04000) are each row's published 2017 value moved by a blend of ITA categories. By 2024 the blends are off by about 40% on data processing (514, +42.7%), administrative and support (561, -37.6%) and management of companies (55, +42.1%), 2018-2024 means onfd271dc. The balance barely moves exports, so the error is in the blends.With the flag,
condition_service_exports_on_summaryscales each service summary group ofF04000to BEA's summary UseF040for that year, with the guardsnowcast_fd_conditioningalready uses for the NIPA columns: an empty group or a sign disagreement keeps a factor of 1. The blends keep only the detail split inside each group. Goods exports stay on Census trade, andOtherandUsedare left alone. It runs inderive_initial_Y_purafter #1295's anchoring.The balance then keeps those cells where conditioning put them:
fix_service_exportsmakes the serviceF04000cells Tier 1 fixed in the Use mask, so each row closes on its other cells. Without it the balance would move them again. Onfd271dcit took pipelines' (486) export error from $47M to $527M a year, and banking's (521CI) from $51M to $673M.Tests
import_group_holdstargets the published groups less frozen cells. On a small Supply block where the rows would move imports between groups, the held block keeps each group and the industry column absorbs the move instead.fix_service_exportsfixes service export cells and leaves goods free.F040(2023 workbook), goods rows don't move, and the split inside a group is unchanged.is_service_groupexcludes goods, government,OtherandUsed.Test rebuild
Run 43442148416 on the throwaway branch
service_trade_rebuild_check: this branch with both flags on in the nine v1.0 configs. Nothing is uploaded. It is graded withservice_trade_vs_publishedagainstv1.0.0_fd271dc; results go here when it finishes.🤖 Generated with Claude Code