Skip to content

Add Base Currency column to scenario and stress test reports#335

Open
mattmenefee wants to merge 2 commits intoOpenSourceRisk:masterfrom
mattmenefee:add-base-currency-to-scenario-report
Open

Add Base Currency column to scenario and stress test reports#335
mattmenefee wants to merge 2 commits intoOpenSourceRisk:masterfrom
mattmenefee:add-base-currency-to-scenario-report

Conversation

@mattmenefee
Copy link
Copy Markdown

@mattmenefee mattmenefee commented Mar 7, 2026

Summary

  • Add a "Base Currency" column to scenario reports (placed after "Base NPV") so users can see which currency the NPV values are denominated in
  • Add baseCurrency parameter to ReportWriter::writeScenarioReport() and update all three callers (pricinganalytic, crifanalytic, xvaenginecg) to pass the simulation base currency
  • Add a "Base Currency" column to stress test reports (placed after "Base NPV") using the existing baseCcy variable in runStressTest()
  • Add unit test verifying scenario report column structure, header names, and data values
  • Update test column indices in stress test suites for the shifted Sensitivity column
  • Update comparison_config.json with "Base Currency" column settings for both scenario and stress test reports (null tolerances for exact string matching)
  • Update all expected output CSV files to include the new column

Motivation

Scenario and stress test reports previously had no indication of which currency the NPV values were denominated in. In multi-currency portfolios, this made it difficult to interpret the Base NPV, Scenario NPV, and Sensitivity columns without cross-referencing the simulation configuration.

Test plan

  • orea-test-suite passes (includes new testWriteScenarioReportBaseCurrency)
  • Stress test suite passes with updated column indices
  • Full ctest suite passes
  • Example expected outputs verified against regenerated CSVs

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant