Skip to content

Add automatic exports and visualization artifacts (decay/slotting/scenarios/methods)#2

Open
junsier9 wants to merge 1 commit intomainfrom
codex/add-display-components-and-export-functionality
Open

Add automatic exports and visualization artifacts (decay/slotting/scenarios/methods)#2
junsier9 wants to merge 1 commit intomainfrom
codex/add-display-components-and-export-functionality

Conversation

@junsier9
Copy link
Copy Markdown
Owner

Motivation

  • Provide the four required presentation/export artifacts (decay profile, slotting table, scenario results, methods/assumptions) from a single run of python -m src.run without changing core computation logic.
  • Make plot outputs compliant with presentation requirements (matplotlib, clear titles/axes/units) and ensure output file names are written to outputs/.
  • Add a concise machine-readable method_summary.md suitable to paste into PPT/report and a console summary highlighting worst-case scenarios.

Description

  • Added METHOD_SUMMARY_MD constant in src/config.py and a write_method_summary writer in src/irrbb/report.py that emits the required methods/assumptions text (fields/diagnostics, decay model, 5Y cap, bucket defs, shock functions with parameters, EVE/NII formulas).
  • Changed build_decay_profile in src/nmd/repricing_profile.py to accept weights and balance and to output the requested schema: bucket_label, t_start_years, t_end_years, t_mid_years, weight, survival, amount.
  • Reworked plotting in src/utils/plotting.py to produce: plot_decay.png (survival S(t) + bucket weight bar), plot_slotting.png (bucket_label vs amount bar), and plot_scenarios.png (grouped bars for ΔEVE and ΔNII(1Y)).
  • Updated src/run.py to call the new build_decay_profile(..., balance=b0), persist decay_profile, slotting_table, scenario_results, and method_summary.md, print a console scenario summary table with worst-case markers, and validate exactly 4 shock scenarios are produced; core engines for decay fitting, slotting, EVE and NII computations were not modified.

Testing

  • Compiled key modules with python -m py_compile src/run.py src/irrbb/report.py src/nmd/repricing_profile.py src/utils/plotting.py src/config.py and the compilation succeeded.
  • Attempted end-to-end run with python -m src.run but it failed due to missing pandas in the execution environment.
  • Attempted pip install -r requirements.txt to resolve dependencies but installation failed due to proxy/network restrictions (HTTP 403), so automated end-to-end file generation could not be verified in this environment.

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant