{
  "tool_id": "art-530-default-fund-cover2-sizing",
  "note": "Vectors computed directly from the shipped kernel. Covers a fund adequate against the worst declared stress scenario, a fund short of the worst declared scenario across 2 members, the single-member edge (second_largest null, Cover-2 collapses to one member's loss), the zero-members/zero-scenarios finite gate (COVER2_INPUTS_INSUFFICIENT, never NaN), and a rejected fractional exposure input coerced to 0 and named, never silently dropped.",
  "vectors": [
    {
      "name": "fund-adequate-two-scenarios",
      "description": "3 declared members, 2 declared stress scenarios shaped from a qfa-03-style scenario_losses set (converted to bps). Worst case is gfc_2008 at 4620 bps: Cover-2 requirement 1617000.00 against member-alpha + member-beta. Declared fund 2000000.00 is adequate.",
      "policy_parameters": {
        "as_of": "2026-08-01",
        "fund_size_minor_units": 200000000,
        "members": [
          {
            "member_id": "member-alpha",
            "exposure_minor_units": 200000000
          },
          {
            "member_id": "member-beta",
            "exposure_minor_units": 150000000
          },
          {
            "member_id": "member-gamma",
            "exposure_minor_units": 60000000
          }
        ],
        "stress_scenarios": [
          {
            "scenario_id": "gfc_2008",
            "loss_bps": 4620
          },
          {
            "scenario_id": "covid_2020",
            "loss_bps": 3240
          }
        ]
      },
      "output_payload": {
        "as_of": "2026-08-01",
        "fund_size_minor_units": 200000000,
        "fund_size_display": "2000000.00",
        "member_count": 3,
        "scenario_count": 2,
        "per_scenario": [
          {
            "scenario_id": "gfc_2008",
            "loss_bps": 4620,
            "member_losses": [
              {
                "member_id": "member-alpha",
                "stress_loss_minor_units": 92400000
              },
              {
                "member_id": "member-beta",
                "stress_loss_minor_units": 69300000
              },
              {
                "member_id": "member-gamma",
                "stress_loss_minor_units": 27720000
              }
            ],
            "largest": {
              "member_id": "member-alpha",
              "stress_loss_minor_units": 92400000
            },
            "second_largest": {
              "member_id": "member-beta",
              "stress_loss_minor_units": 69300000
            },
            "cover2_requirement_minor_units": 161700000,
            "cover2_requirement_display": "1617000.00"
          },
          {
            "scenario_id": "covid_2020",
            "loss_bps": 3240,
            "member_losses": [
              {
                "member_id": "member-alpha",
                "stress_loss_minor_units": 64800000
              },
              {
                "member_id": "member-beta",
                "stress_loss_minor_units": 48600000
              },
              {
                "member_id": "member-gamma",
                "stress_loss_minor_units": 19440000
              }
            ],
            "largest": {
              "member_id": "member-alpha",
              "stress_loss_minor_units": 64800000
            },
            "second_largest": {
              "member_id": "member-beta",
              "stress_loss_minor_units": 48600000
            },
            "cover2_requirement_minor_units": 113400000,
            "cover2_requirement_display": "1134000.00"
          }
        ],
        "worst_case_scenario_id": "gfc_2008",
        "worst_case_cover2_requirement_minor_units": 161700000,
        "worst_case_cover2_requirement_display": "1617000.00",
        "fund_adequate": true,
        "shortfall_minor_units": 0,
        "shortfall_display": "0.00",
        "rejected_inputs": [],
        "rationale": [
          "3 declared clearing members evaluated across 2 declared stress scenarios.",
          "Worst-case scenario \"gfc_2008\" at 4620 bps: largest member loss 924000.00 (member-alpha), second-largest 693000.00 (member-beta); Cover-2 requirement 1617000.00.",
          "Declared default fund size 2000000.00 is adequate against the worst-case Cover-2 requirement of 1617000.00.",
          "This is an arithmetic sizing check over declared member exposures, declared stress-scenario loss rates, and a declared fund size. It proves nothing about whether those declarations match any external position or margin system, and it recommends no fund-size change."
        ],
        "note": "Deterministic Cover-2 default fund sizing over caller-declared clearing members, member exposures, stress-scenario loss rates (shaped from a stress-test-engine chain input as basis points), and a declared fund size. Per PFMI Principle 4, the fund must cover the default of the two members creating the largest combined stress loss under the worst declared scenario. No CCP, currency, or jurisdiction is named. It performs no stress-scenario computation of its own -- that shape is a chained input -- and it recommends no fund-size change."
      },
      "compliance_flags": [
        "COVER2_FUND_ADEQUATE"
      ],
      "golden_hash": "0ca6da06f32401f39e6fa2bc40332095c1c4904b0906b9736e5056a72ae04eea"
    },
    {
      "name": "fund-shortfall-single-scenario",
      "description": "2 declared members, 1 declared stress scenario. Cover-2 requirement 4158000.00, declared fund 100000.00 -- well short. COVER2_FUND_SHORTFALL.",
      "policy_parameters": {
        "as_of": "2026-08-01",
        "fund_size_minor_units": 10000000,
        "members": [
          {
            "member_id": "member-alpha",
            "exposure_minor_units": 500000000
          },
          {
            "member_id": "member-beta",
            "exposure_minor_units": 400000000
          }
        ],
        "stress_scenarios": [
          {
            "scenario_id": "gfc_2008",
            "loss_bps": 4620
          }
        ]
      },
      "output_payload": {
        "as_of": "2026-08-01",
        "fund_size_minor_units": 10000000,
        "fund_size_display": "100000.00",
        "member_count": 2,
        "scenario_count": 1,
        "per_scenario": [
          {
            "scenario_id": "gfc_2008",
            "loss_bps": 4620,
            "member_losses": [
              {
                "member_id": "member-alpha",
                "stress_loss_minor_units": 231000000
              },
              {
                "member_id": "member-beta",
                "stress_loss_minor_units": 184800000
              }
            ],
            "largest": {
              "member_id": "member-alpha",
              "stress_loss_minor_units": 231000000
            },
            "second_largest": {
              "member_id": "member-beta",
              "stress_loss_minor_units": 184800000
            },
            "cover2_requirement_minor_units": 415800000,
            "cover2_requirement_display": "4158000.00"
          }
        ],
        "worst_case_scenario_id": "gfc_2008",
        "worst_case_cover2_requirement_minor_units": 415800000,
        "worst_case_cover2_requirement_display": "4158000.00",
        "fund_adequate": false,
        "shortfall_minor_units": 405800000,
        "shortfall_display": "4058000.00",
        "rejected_inputs": [],
        "rationale": [
          "2 declared clearing members evaluated across 1 declared stress scenario.",
          "Worst-case scenario \"gfc_2008\" at 4620 bps: largest member loss 2310000.00 (member-alpha), second-largest 1848000.00 (member-beta); Cover-2 requirement 4158000.00.",
          "Declared default fund size 100000.00 is short of the worst-case Cover-2 requirement of 4158000.00, a shortfall of 4058000.00.",
          "This is an arithmetic sizing check over declared member exposures, declared stress-scenario loss rates, and a declared fund size. It proves nothing about whether those declarations match any external position or margin system, and it recommends no fund-size change."
        ],
        "note": "Deterministic Cover-2 default fund sizing over caller-declared clearing members, member exposures, stress-scenario loss rates (shaped from a stress-test-engine chain input as basis points), and a declared fund size. Per PFMI Principle 4, the fund must cover the default of the two members creating the largest combined stress loss under the worst declared scenario. No CCP, currency, or jurisdiction is named. It performs no stress-scenario computation of its own -- that shape is a chained input -- and it recommends no fund-size change."
      },
      "compliance_flags": [
        "COVER2_FUND_SHORTFALL"
      ],
      "golden_hash": "a1bb41729e312b01bd6703ae168f834bf41e92e6811c5e0310a2904c23a3ebdb"
    },
    {
      "name": "single-member-edge",
      "description": "Only one declared member: second_largest is null and Cover-2 collapses to that one member's stress loss, not an error and not NaN.",
      "policy_parameters": {
        "as_of": "2026-08-01",
        "fund_size_minor_units": 1000000,
        "members": [
          {
            "member_id": "member-solo",
            "exposure_minor_units": 10000000
          }
        ],
        "stress_scenarios": [
          {
            "scenario_id": "rate_shock",
            "loss_bps": 2850
          }
        ]
      },
      "output_payload": {
        "as_of": "2026-08-01",
        "fund_size_minor_units": 1000000,
        "fund_size_display": "10000.00",
        "member_count": 1,
        "scenario_count": 1,
        "per_scenario": [
          {
            "scenario_id": "rate_shock",
            "loss_bps": 2850,
            "member_losses": [
              {
                "member_id": "member-solo",
                "stress_loss_minor_units": 2850000
              }
            ],
            "largest": {
              "member_id": "member-solo",
              "stress_loss_minor_units": 2850000
            },
            "second_largest": null,
            "cover2_requirement_minor_units": 2850000,
            "cover2_requirement_display": "28500.00"
          }
        ],
        "worst_case_scenario_id": "rate_shock",
        "worst_case_cover2_requirement_minor_units": 2850000,
        "worst_case_cover2_requirement_display": "28500.00",
        "fund_adequate": false,
        "shortfall_minor_units": 1850000,
        "shortfall_display": "18500.00",
        "rejected_inputs": [],
        "rationale": [
          "1 declared clearing member evaluated across 1 declared stress scenario.",
          "Worst-case scenario \"rate_shock\" at 2850 bps: largest member loss 28500.00 (member-solo), second-largest 0.00; Cover-2 requirement 28500.00.",
          "Declared default fund size 10000.00 is short of the worst-case Cover-2 requirement of 28500.00, a shortfall of 18500.00.",
          "This is an arithmetic sizing check over declared member exposures, declared stress-scenario loss rates, and a declared fund size. It proves nothing about whether those declarations match any external position or margin system, and it recommends no fund-size change."
        ],
        "note": "Deterministic Cover-2 default fund sizing over caller-declared clearing members, member exposures, stress-scenario loss rates (shaped from a stress-test-engine chain input as basis points), and a declared fund size. Per PFMI Principle 4, the fund must cover the default of the two members creating the largest combined stress loss under the worst declared scenario. No CCP, currency, or jurisdiction is named. It performs no stress-scenario computation of its own -- that shape is a chained input -- and it recommends no fund-size change."
      },
      "compliance_flags": [
        "COVER2_FUND_SHORTFALL"
      ],
      "golden_hash": "69ad8f43f56b305b8d8c1595609122fabb3a352692f80d02953b46fb275ed266"
    },
    {
      "name": "zero-members-zero-scenarios-finite",
      "description": "FINITE GATE: zero declared members and zero declared stress scenarios resolve to a defined verdict, never NaN or a thrown error. COVER2_INPUTS_INSUFFICIENT alongside COVER2_FUND_ADEQUATE (vacuously, 0 >= 0).",
      "policy_parameters": {
        "as_of": "2026-08-01",
        "fund_size_minor_units": 0,
        "members": [],
        "stress_scenarios": []
      },
      "output_payload": {
        "as_of": "2026-08-01",
        "fund_size_minor_units": 0,
        "fund_size_display": "0.00",
        "member_count": 0,
        "scenario_count": 0,
        "per_scenario": [],
        "worst_case_scenario_id": null,
        "worst_case_cover2_requirement_minor_units": 0,
        "worst_case_cover2_requirement_display": "0.00",
        "fund_adequate": true,
        "shortfall_minor_units": 0,
        "shortfall_display": "0.00",
        "rejected_inputs": [],
        "rationale": [
          "0 declared clearing members evaluated across 0 declared stress scenarios.",
          "No stress scenarios declared: Cover-2 requirement is 0.00 by definition of an empty scenario set, not a passing adequacy result.",
          "Declared default fund size 0.00 is adequate against the worst-case Cover-2 requirement of 0.00.",
          "This is an arithmetic sizing check over declared member exposures, declared stress-scenario loss rates, and a declared fund size. It proves nothing about whether those declarations match any external position or margin system, and it recommends no fund-size change."
        ],
        "note": "Deterministic Cover-2 default fund sizing over caller-declared clearing members, member exposures, stress-scenario loss rates (shaped from a stress-test-engine chain input as basis points), and a declared fund size. Per PFMI Principle 4, the fund must cover the default of the two members creating the largest combined stress loss under the worst declared scenario. No CCP, currency, or jurisdiction is named. It performs no stress-scenario computation of its own -- that shape is a chained input -- and it recommends no fund-size change."
      },
      "compliance_flags": [
        "COVER2_INPUTS_INSUFFICIENT",
        "COVER2_FUND_ADEQUATE"
      ],
      "golden_hash": "055df6776d739cb65942d44f3532b83f2e3d685f542d7b5ea18c27f59717b8bc"
    },
    {
      "name": "rejected-inputs-fractional",
      "description": "A fractional member exposure (1.5 minor units) is coerced to 0 and named in rejected_inputs, never silently dropped and never NaN.",
      "policy_parameters": {
        "as_of": "2026-08-01",
        "fund_size_minor_units": 1000000,
        "members": [
          {
            "member_id": "member-alpha",
            "exposure_minor_units": 10000000
          },
          {
            "member_id": "member-beta",
            "exposure_minor_units": 1.5
          }
        ],
        "stress_scenarios": [
          {
            "scenario_id": "gfc_2008",
            "loss_bps": 4620
          }
        ]
      },
      "output_payload": {
        "as_of": "2026-08-01",
        "fund_size_minor_units": 1000000,
        "fund_size_display": "10000.00",
        "member_count": 2,
        "scenario_count": 1,
        "per_scenario": [
          {
            "scenario_id": "gfc_2008",
            "loss_bps": 4620,
            "member_losses": [
              {
                "member_id": "member-alpha",
                "stress_loss_minor_units": 4620000
              },
              {
                "member_id": "member-beta",
                "stress_loss_minor_units": 0
              }
            ],
            "largest": {
              "member_id": "member-alpha",
              "stress_loss_minor_units": 4620000
            },
            "second_largest": {
              "member_id": "member-beta",
              "stress_loss_minor_units": 0
            },
            "cover2_requirement_minor_units": 4620000,
            "cover2_requirement_display": "46200.00"
          }
        ],
        "worst_case_scenario_id": "gfc_2008",
        "worst_case_cover2_requirement_minor_units": 4620000,
        "worst_case_cover2_requirement_display": "46200.00",
        "fund_adequate": false,
        "shortfall_minor_units": 3620000,
        "shortfall_display": "36200.00",
        "rejected_inputs": [
          {
            "where": "members[1].exposure_minor_units",
            "reason": "not a safe integer number of minor units",
            "supplied": 1.5
          }
        ],
        "rationale": [
          "2 declared clearing members evaluated across 1 declared stress scenario.",
          "Worst-case scenario \"gfc_2008\" at 4620 bps: largest member loss 46200.00 (member-alpha), second-largest 0.00 (member-beta); Cover-2 requirement 46200.00.",
          "Declared default fund size 10000.00 is short of the worst-case Cover-2 requirement of 46200.00, a shortfall of 36200.00.",
          "This is an arithmetic sizing check over declared member exposures, declared stress-scenario loss rates, and a declared fund size. It proves nothing about whether those declarations match any external position or margin system, and it recommends no fund-size change."
        ],
        "note": "Deterministic Cover-2 default fund sizing over caller-declared clearing members, member exposures, stress-scenario loss rates (shaped from a stress-test-engine chain input as basis points), and a declared fund size. Per PFMI Principle 4, the fund must cover the default of the two members creating the largest combined stress loss under the worst declared scenario. No CCP, currency, or jurisdiction is named. It performs no stress-scenario computation of its own -- that shape is a chained input -- and it recommends no fund-size change."
      },
      "compliance_flags": [
        "COVER2_FUND_SHORTFALL"
      ],
      "golden_hash": "e2a268bfd37f406acee5482780277cb464de9a823b0d81d603d67df2e1cb9b9c"
    }
  ]
}
