2.5 KiB
2.5 KiB
Title: ISDA Quantitative Engine Mathematical & Data Overhaul
Goal
Transform the climate risk engine from a heuristic-based approximation model into a mathematically rigorous, ISDA-compliant valuation framework. Eliminate theoretical "fudging", correct NGFS data scaling errors, and ensure that all market scenarios accurately map to formal reference data and baseline dataset snapshots instead of arbitrary values.
Proposed Steps
1. Data Governance & Entity Relational Mapping
- Create
firm_reference_datatable: Implement a Security Master mechanism (SQLite or CSV) mappingasset_codeto specific ISDA Firmographics (gics_sector,credit_rating,ksic_code). - Load Firmographic Reference Data: Implement logic in
base_market_data_loader.pyto join against this robust catalog, replacing all previous Pythonlambdaarbitrary sector mapping.
2. Market Data Integration (ISDA Baseline)
- JSONB Parsing: Extract the pre-evaluated market dataset snapshot (
spots&vols) from theeval_datasetsPostgres table. - Bind True Starting State (
V_0&\sigma_0): Substitute all uniformly hardcoded constants (V_{base} = 100.0, \sigma_V = 0.20) with actual market prices and observed implied volatilities for precise baseline setting (e.g., Samsung Electronics56300).
3. Quantitative Formulation Overhaul
- Merton Model Rectification: Halt arbitrary scalar amplifications of Firm Asset Volatility (
\sigma_V). Restore\sigma_Vas an invariant across normal & stressed environments so equity spread amplification triggers organically via capital structural leverage (V/E \cdot N(d_1)). - Hull-White 1-Factor Correct Pricing Formula: Replace simplistic Beta curve increments. Implement the precise Affine Term Structure
B(0, T)Zero Rate formulation factoring mean reversion (hw_kappa). - NGFS Percentage Recalibration: Divide structural NGFS policy inputs by 100 to map them into formal decimal yield configurations (
0.0525instead of5.25), aligning seamlessly with HW mathematical bounds.
4. UI & Presentation Integration
- Extend existing frontend (
App.jsx) and API serialization (main.py) to expose accurate curveTenorfields explicitly. - Render accurate HW mathematical formulas on the guidance panels corresponding to the reformed backend physics.
Testing & Verification
- Manually review
engine_resultsand JSON API outputs to verify newly produced PVs and Deltas align with expected Quant characteristics. - Ensure the UI adequately parses
Tenorwithout exceptions.