{
  "tool_id": "art-259-compute-multilateral-netting",
  "note": "Corporate multilateral cash netting: 3-entity gross matrix → net positions → settlement legs. NOT FICC margin netting.",
  "vectors": [
    {
      "name": "three_entity_netting_67pct_savings",
      "description": "3 entities (A, B, C): 3 gross legs, 2 net settlement legs, 33.33% wire-count savings, 83.33% netting efficiency.",
      "policy_parameters": {
        "base_currency": "USD",
        "entities": [
          {
            "entity_id": "ENTITY_A",
            "name": "Parent Co"
          },
          {
            "entity_id": "ENTITY_B",
            "name": "Sub US"
          },
          {
            "entity_id": "ENTITY_C",
            "name": "Sub EU"
          }
        ],
        "gross_positions": [
          {
            "from_entity": "ENTITY_A",
            "to_entity": "ENTITY_B",
            "amount": 1000,
            "currency": "USD"
          },
          {
            "from_entity": "ENTITY_B",
            "to_entity": "ENTITY_C",
            "amount": 800,
            "currency": "USD"
          },
          {
            "from_entity": "ENTITY_C",
            "to_entity": "ENTITY_A",
            "amount": 600,
            "currency": "USD"
          }
        ],
        "fx_rates": {}
      },
      "output_payload": {
        "entity_count": 3,
        "gross_count": 3,
        "net_count": 2,
        "wire_count_savings": 1,
        "wire_count_savings_pct": 33.33,
        "gross_volume": 2400,
        "net_volume": 400,
        "netting_efficiency_pct": 83.33,
        "entity_net_positions": [
          {
            "entity_id": "ENTITY_A",
            "entity_name": "Parent Co",
            "net_amount": -400,
            "currency": "USD",
            "role": "PAYER"
          },
          {
            "entity_id": "ENTITY_B",
            "entity_name": "Sub US",
            "net_amount": 200,
            "currency": "USD",
            "role": "RECEIVER"
          },
          {
            "entity_id": "ENTITY_C",
            "entity_name": "Sub EU",
            "net_amount": 200,
            "currency": "USD",
            "role": "RECEIVER"
          }
        ],
        "settlement_legs": [
          {
            "from_entity": "ENTITY_A",
            "to_entity": "ENTITY_B",
            "amount": 200,
            "currency": "USD"
          },
          {
            "from_entity": "ENTITY_A",
            "to_entity": "ENTITY_C",
            "amount": 200,
            "currency": "USD"
          }
        ],
        "base_currency": "USD",
        "table_version": "MULTILATERAL-NETTING-MATH-V1.0-2025",
        "table_source": "SWIFT gpi multilateral netting guide; ISO 20022 pacs.010 Financial Institution Credit Transfer; BIS CPMI net settlement framework 2012",
        "regulatory_basis": "Multilateral netting per SWIFT gpi multilateral netting guide; BIS CPMI net settlement framework (2012, cpmi96). NOT estimate_ficc_margin_netting (FICC clearing margin netting). This node computes corporate CASH netting for TMS / in-house-bank settlement cycles. Netting statement suitable for anchor_batch Merkle-leaf receipts.",
        "pii_note": "ZERO PII: entity IDs, currency codes, and amounts only. No account holder, beneficial owner, or personal data enters this kernel.",
        "not_legal_advice": "Not legal or accounting advice. Netting arrangements must be validated under applicable netting law (e.g. ISDA master netting agreement, national netting legislation).",
        "anchor_surface": "anchor.ainumbers.co/mcp -- use anchor_batch to anchor the netting statement as a Merkle tree (one leaf per entity). Each entity receives an individual inclusion proof of the same net settlement cycle."
      },
      "golden_hash": "dab674733605c002a2b8c9e43a823070cbcd17e9acecff0b52fc70764e57215f"
    },
    {
      "name": "two_entity_bilateral_netting",
      "description": "2 entities with bilateral positions: A→B 500, B→A 300 → A nets -200 (payer), B nets +200 (receiver), 1 settlement leg, 50% savings.",
      "policy_parameters": {
        "base_currency": "USD",
        "entities": [
          {
            "entity_id": "ALPHA",
            "name": "Alpha Corp"
          },
          {
            "entity_id": "BETA",
            "name": "Beta Ltd"
          }
        ],
        "gross_positions": [
          {
            "from_entity": "ALPHA",
            "to_entity": "BETA",
            "amount": 500,
            "currency": "USD"
          },
          {
            "from_entity": "BETA",
            "to_entity": "ALPHA",
            "amount": 300,
            "currency": "USD"
          }
        ],
        "fx_rates": {}
      },
      "output_payload": {
        "entity_count": 2,
        "gross_count": 2,
        "net_count": 1,
        "wire_count_savings": 1,
        "wire_count_savings_pct": 50,
        "gross_volume": 800,
        "net_volume": 200,
        "netting_efficiency_pct": 75,
        "entity_net_positions": [
          {
            "entity_id": "ALPHA",
            "entity_name": "Alpha Corp",
            "net_amount": -200,
            "currency": "USD",
            "role": "PAYER"
          },
          {
            "entity_id": "BETA",
            "entity_name": "Beta Ltd",
            "net_amount": 200,
            "currency": "USD",
            "role": "RECEIVER"
          }
        ],
        "settlement_legs": [
          {
            "from_entity": "ALPHA",
            "to_entity": "BETA",
            "amount": 200,
            "currency": "USD"
          }
        ],
        "base_currency": "USD",
        "table_version": "MULTILATERAL-NETTING-MATH-V1.0-2025",
        "table_source": "SWIFT gpi multilateral netting guide; ISO 20022 pacs.010 Financial Institution Credit Transfer; BIS CPMI net settlement framework 2012",
        "regulatory_basis": "Multilateral netting per SWIFT gpi multilateral netting guide; BIS CPMI net settlement framework (2012, cpmi96). NOT estimate_ficc_margin_netting (FICC clearing margin netting). This node computes corporate CASH netting for TMS / in-house-bank settlement cycles. Netting statement suitable for anchor_batch Merkle-leaf receipts.",
        "pii_note": "ZERO PII: entity IDs, currency codes, and amounts only. No account holder, beneficial owner, or personal data enters this kernel.",
        "not_legal_advice": "Not legal or accounting advice. Netting arrangements must be validated under applicable netting law (e.g. ISDA master netting agreement, national netting legislation).",
        "anchor_surface": "anchor.ainumbers.co/mcp -- use anchor_batch to anchor the netting statement as a Merkle tree (one leaf per entity). Each entity receives an individual inclusion proof of the same net settlement cycle."
      },
      "golden_hash": "28d082a9fbccc92613811f33563f7c30540f410057c6cac51821a21c85d017a1"
    },
    {
      "name": "empty_no_positions",
      "description": "Empty input: no entities, no positions → zero counts, empty arrays.",
      "policy_parameters": {
        "base_currency": "USD",
        "entities": [],
        "gross_positions": [],
        "fx_rates": {}
      },
      "output_payload": {
        "entity_count": 0,
        "gross_count": 0,
        "net_count": 0,
        "wire_count_savings": 0,
        "wire_count_savings_pct": 0,
        "gross_volume": 0,
        "net_volume": 0,
        "netting_efficiency_pct": 0,
        "entity_net_positions": [],
        "settlement_legs": [],
        "base_currency": "USD",
        "table_version": "MULTILATERAL-NETTING-MATH-V1.0-2025",
        "table_source": "SWIFT gpi multilateral netting guide; ISO 20022 pacs.010 Financial Institution Credit Transfer; BIS CPMI net settlement framework 2012",
        "regulatory_basis": "Multilateral netting per SWIFT gpi multilateral netting guide; BIS CPMI net settlement framework (2012, cpmi96). NOT estimate_ficc_margin_netting (FICC clearing margin netting). This node computes corporate CASH netting for TMS / in-house-bank settlement cycles. Netting statement suitable for anchor_batch Merkle-leaf receipts.",
        "pii_note": "ZERO PII: entity IDs, currency codes, and amounts only. No account holder, beneficial owner, or personal data enters this kernel.",
        "not_legal_advice": "Not legal or accounting advice. Netting arrangements must be validated under applicable netting law (e.g. ISDA master netting agreement, national netting legislation).",
        "anchor_surface": "anchor.ainumbers.co/mcp -- use anchor_batch to anchor the netting statement as a Merkle tree (one leaf per entity). Each entity receives an individual inclusion proof of the same net settlement cycle."
      },
      "golden_hash": "fc7c29a1699a5c34920508bf083ce1f4e352421aa0c59e1a367f1fb8de5afe72"
    }
  ]
}
