WIP: port 75y long-run projection engine to microplex-us (rebase on MP base)#213
Draft
MaxGhenis wants to merge 1 commit into
Draft
WIP: port 75y long-run projection engine to microplex-us (rebase on MP base)#213MaxGhenis wants to merge 1 commit into
MaxGhenis wants to merge 1 commit into
Conversation
policyengine-us-data is being deprecated in favor of microplex-us, and the 75y long-run (CRFB) projection should build from the MP dataset, not the eCPS. This relocates the engine ahead of MP promotion. Done: - Relocate the 4-file engine (run_household_projection, projection_utils, calibration, ssa_data) into src/microplex_us/longrun/. - Rewire imports: relative cross-module imports; STORAGE_FOLDER -> local longrun/data/ (only us-data coupling was this one import). - Port the SSA Trustees data files it depends on (SSPopJul_TR2024.csv, social_security_aux.csv). - Add the MP-base rebase hook to the dataset registry (mp_2024). - Library modules import + smoke-test clean. TODO (post-promotion): - Rebase base_dataset on the promoted MP arch-calibrated dataset (set SELECTED_DATASET=mp_2024). - Income anchoring (the real fix for income-tax>GDP under-determination): regularize forward weights toward the income-rich MP base + add a CBO long-run income-tax-receipts %GDP target. (calibration only constrains age/SS/payroll/TOB today; income tax is a free functional.) - Refactor run_household_projection.py from a top-level script into an importable entrypoint (def main()). - Finish lint cleanup of inherited code (bare excepts, unused vars). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
WIP: port the 75y long-run projection engine to microplex-us
policyengine-us-datais being deprecated in favor of microplex-us, and the 75y long-run (CRFB) projection currently builds from the eCPS — it should build from the MP dataset. This PR relocates the engine intomicroplex_us.longrunahead of MP promotion so it's ready to rebase the moment MP is promoted. Opening as draft.Done
run_household_projection,projection_utils,calibration,ssa_data) intosrc/microplex_us/longrun/.STORAGE_FOLDER→ locallongrun/data/(the only us-data coupling was that one import).SSPopJul_TR2024.csv,social_security_aux.csv).mp_2024).calibration,projection_utils,ssa_data) import + smoke-test clean.Calibration backends (for reviewers)
The default reweighter is entropy balancing (KL-divergence min vs base weights via
scipy.optimize.minimize); the L0 path is microcalibrate / HardConcrete (torch GD + L0). The 75y profile only calibrates age / SS / payroll / TOB — income tax is a free functional, which is why the native model can produce income tax > GDP (see TODO + loop journal iter87).TODO (post-promotion)
base_dataseton the promoted MP arch-calibrated dataset (setSELECTED_DATASET="mp_2024").run_household_projection.pyfrom a top-level script into an importabledef main()entrypoint.Depends on MP promotion (the 75y base = the promoted MP dataset). Tracks the calibration-fix work in #200 and the under-determination findings in the mp-ecps loop journal.