{
  "tool_id": "art-447-securitization-risk-retention-check",
  "note": "golden_hash filled by golden-parity.test.mjs --update. Vector 1: EU vertical-slice retention exactly at the 5% threshold, compliant. Vector 2: EU horizontal first-loss retention below 5%, noncompliant. Vector 3: US Reg RR retention meets 5% numerically but the retainer fails the EU sole-purpose test AND the retained interest was hedged -- both structural breaches fire even though the percentage passes (only meaningful under EU jurisdiction; included to prove the structural gates are independent of the percentage gate). Vector 4: US QRM-exempt pool, zero securitized exposure and zero retained amount -- finite gate (null ratio, not Infinity/NaN) and the QRM exemption zeroing the required percentage so a zero-retention pool is still compliant.",
  "vectors": [
    {
      "name": "eu_vertical_slice_at_threshold_compliant",
      "description": "EU jurisdiction, vertical-slice retention. Total securitized exposure EUR2000M, retained EUR100M = exactly 5.00%, no sole-purpose or hedging flags. Compliant.",
      "policy_parameters": {
        "jurisdiction": "eu",
        "retention_method": "vertical_slice",
        "total_securitized_exposure_musd": 2000,
        "retained_amount_musd": 100,
        "all_exposures_qrm_qualified": false,
        "retainer_is_sole_purpose_entity": false,
        "retained_interest_hedged_or_sold": false
      },
      "output_payload": {
        "jurisdiction": "eu",
        "retention_method": "vertical_slice",
        "retention_method_valid": true,
        "total_securitized_exposure_musd": 2000,
        "retained_amount_musd": 100,
        "actual_retention_pct": 5,
        "required_retention_pct": 5,
        "qrm_exemption_applied": false,
        "retainer_is_sole_purpose_entity": false,
        "retained_interest_hedged_or_sold": false,
        "compliant": true,
        "breach_reasons": [],
        "regulatory_basis": "EU Securitisation Regulation (EU) 2017/2402 Art.6 (originator/sponsor/original-lender net economic interest, ongoing 5% retention, no hedging/sale, sole-purpose-entity prohibition); U.S. Credit Risk Retention Rule (Dodd-Frank Sec.941, Reg RR, 12 CFR Part 244) 5% base retention with Sec_.19 Qualified Residential Mortgage exemption.",
        "note": "Deterministic structural check from caller-supplied retention method, exposure/retained nominal amounts, and jurisdiction-specific flags for a single reporting date."
      },
      "compliance_flags": [
        "RETENTION_COMPLIANT"
      ],
      "golden_hash": "89cb5a95a48436106a89a22b6a17504ddb0d7165189bd4775451d02df918e9b2"
    },
    {
      "name": "eu_horizontal_below_threshold_noncompliant",
      "description": "EU jurisdiction, horizontal first-loss retention. Total securitized exposure EUR1500M, retained EUR45M = 3.00%, below the 5% requirement. Noncompliant.",
      "policy_parameters": {
        "jurisdiction": "eu",
        "retention_method": "horizontal_first_loss",
        "total_securitized_exposure_musd": 1500,
        "retained_amount_musd": 45,
        "all_exposures_qrm_qualified": false,
        "retainer_is_sole_purpose_entity": false,
        "retained_interest_hedged_or_sold": false
      },
      "output_payload": {
        "jurisdiction": "eu",
        "retention_method": "horizontal_first_loss",
        "retention_method_valid": true,
        "total_securitized_exposure_musd": 1500,
        "retained_amount_musd": 45,
        "actual_retention_pct": 3,
        "required_retention_pct": 5,
        "qrm_exemption_applied": false,
        "retainer_is_sole_purpose_entity": false,
        "retained_interest_hedged_or_sold": false,
        "compliant": false,
        "breach_reasons": [
          "RETENTION_BELOW_REQUIRED_THRESHOLD"
        ],
        "regulatory_basis": "EU Securitisation Regulation (EU) 2017/2402 Art.6 (originator/sponsor/original-lender net economic interest, ongoing 5% retention, no hedging/sale, sole-purpose-entity prohibition); U.S. Credit Risk Retention Rule (Dodd-Frank Sec.941, Reg RR, 12 CFR Part 244) 5% base retention with Sec_.19 Qualified Residential Mortgage exemption.",
        "note": "Deterministic structural check from caller-supplied retention method, exposure/retained nominal amounts, and jurisdiction-specific flags for a single reporting date."
      },
      "compliance_flags": [
        "RETENTION_NONCOMPLIANT"
      ],
      "golden_hash": "342509ce367020bc86661bd592a1e2626d9628e640e4edcbb7abad12e5b66c1f"
    },
    {
      "name": "eu_sole_purpose_and_hedging_breach",
      "description": "EU jurisdiction, L-shaped retention meeting the 5% numeric threshold (EUR1000M / EUR50M = 5%), but the retainer is flagged as a sole-purpose securitisation entity AND the retained interest was hedged -- both structural gates fire independently of the percentage pass.",
      "policy_parameters": {
        "jurisdiction": "eu",
        "retention_method": "l_shaped",
        "total_securitized_exposure_musd": 1000,
        "retained_amount_musd": 50,
        "all_exposures_qrm_qualified": false,
        "retainer_is_sole_purpose_entity": true,
        "retained_interest_hedged_or_sold": true
      },
      "output_payload": {
        "jurisdiction": "eu",
        "retention_method": "l_shaped",
        "retention_method_valid": true,
        "total_securitized_exposure_musd": 1000,
        "retained_amount_musd": 50,
        "actual_retention_pct": 5,
        "required_retention_pct": 5,
        "qrm_exemption_applied": false,
        "retainer_is_sole_purpose_entity": true,
        "retained_interest_hedged_or_sold": true,
        "compliant": false,
        "breach_reasons": [
          "RETAINER_FAILS_SOLE_PURPOSE_TEST",
          "RETAINED_INTEREST_HEDGED_OR_SOLD"
        ],
        "regulatory_basis": "EU Securitisation Regulation (EU) 2017/2402 Art.6 (originator/sponsor/original-lender net economic interest, ongoing 5% retention, no hedging/sale, sole-purpose-entity prohibition); U.S. Credit Risk Retention Rule (Dodd-Frank Sec.941, Reg RR, 12 CFR Part 244) 5% base retention with Sec_.19 Qualified Residential Mortgage exemption.",
        "note": "Deterministic structural check from caller-supplied retention method, exposure/retained nominal amounts, and jurisdiction-specific flags for a single reporting date."
      },
      "compliance_flags": [
        "RETENTION_NONCOMPLIANT"
      ],
      "golden_hash": "9cc4083712cfa9f2deecfef4f84ef8cae8a621b35fe114af4b63b7269d781359"
    },
    {
      "name": "us_qrm_exempt_zero_input_edge",
      "description": "US jurisdiction, all exposures QRM-qualified (Reg RR Sec_.19 exemption), zero securitized exposure and zero retained amount. Finite gate: ratio resolves to null (not Infinity/NaN); required retention percentage zeroes out under the QRM exemption so a zero-retention pool is still compliant.",
      "policy_parameters": {
        "jurisdiction": "us",
        "retention_method": "sellers_interest",
        "total_securitized_exposure_musd": 0,
        "retained_amount_musd": 0,
        "all_exposures_qrm_qualified": true,
        "retainer_is_sole_purpose_entity": false,
        "retained_interest_hedged_or_sold": false
      },
      "output_payload": {
        "jurisdiction": "us",
        "retention_method": "sellers_interest",
        "retention_method_valid": true,
        "total_securitized_exposure_musd": 0,
        "retained_amount_musd": 0,
        "actual_retention_pct": null,
        "required_retention_pct": 0,
        "qrm_exemption_applied": true,
        "retainer_is_sole_purpose_entity": false,
        "retained_interest_hedged_or_sold": false,
        "compliant": true,
        "breach_reasons": [],
        "regulatory_basis": "EU Securitisation Regulation (EU) 2017/2402 Art.6 (originator/sponsor/original-lender net economic interest, ongoing 5% retention, no hedging/sale, sole-purpose-entity prohibition); U.S. Credit Risk Retention Rule (Dodd-Frank Sec.941, Reg RR, 12 CFR Part 244) 5% base retention with Sec_.19 Qualified Residential Mortgage exemption.",
        "note": "Deterministic structural check from caller-supplied retention method, exposure/retained nominal amounts, and jurisdiction-specific flags for a single reporting date."
      },
      "compliance_flags": [
        "RETENTION_COMPLIANT"
      ],
      "golden_hash": "9232b3b9bb3800921bc6255903971555c252b9b0b07c04661fff737f8b1342b9"
    }
  ]
}
