{
  "tool_id": "art-396-compute-15c3-3-reserve",
  "note": "golden_hash filled by golden-parity.test.mjs --update. Vector 1: seeded default, credits exceed debits, deposit sufficient. Vector 2: single credit line vs a small debit, deposit balance held well below the reserve requirement (deficient). Vector 3: aging-rule edge -- one FTD debit aged 45 days (excluded per Exhibit A >30-day rule) alongside one aged 20 days (included), plus PAB variant flag. Vector 4: zero-input edge (finite gate, no NaN/Infinity, all totals resolve to 0).",
  "vectors": [
    {
      "name": "seeded_default_sufficient",
      "description": "Free credit balances + margin credit balances + securities-loaned payable as credits; a margin-account debit (1% haircut applied) and a 10-day-aged FTD debit (within the 30-day inclusion window) as debits. Reserve account balance of $35M covers the $34.2M requirement.",
      "policy_parameters": {
        "credit_items": [
          {
            "label": "Free credit balances",
            "category": "free_credit_balances",
            "amount_musd": 40
          },
          {
            "label": "Margin credit balances",
            "category": "margin_credit_balances",
            "amount_musd": 12
          },
          {
            "label": "Payable from securities loaned using customer securities",
            "category": "payable_from_securities_loaned_using_customer_securities",
            "amount_musd": 5
          }
        ],
        "debit_items": [
          {
            "label": "Margin account debits",
            "category": "margin_account_debit",
            "amount_musd": 20,
            "aging_days": 5
          },
          {
            "label": "Securities failed to deliver (10d)",
            "category": "securities_failed_to_deliver",
            "amount_musd": 3,
            "aging_days": 10
          }
        ],
        "reserve_account_balance_musd": 35,
        "pab_variant": false
      },
      "output_payload": {
        "credit_items": [
          {
            "label": "Free credit balances",
            "category": "free_credit_balances",
            "amount_musd": 40,
            "included_musd": 40
          },
          {
            "label": "Margin credit balances",
            "category": "margin_credit_balances",
            "amount_musd": 12,
            "included_musd": 12
          },
          {
            "label": "Payable from securities loaned using customer securities",
            "category": "payable_from_securities_loaned_using_customer_securities",
            "amount_musd": 5,
            "included_musd": 5
          }
        ],
        "debit_items": [
          {
            "label": "Margin account debits",
            "category": "margin_account_debit",
            "amount_musd": 20,
            "aging_days": 5,
            "included_musd": 19.8,
            "exclusion_reason": null
          },
          {
            "label": "Securities failed to deliver (10d)",
            "category": "securities_failed_to_deliver",
            "amount_musd": 3,
            "aging_days": 10,
            "included_musd": 3,
            "exclusion_reason": null
          }
        ],
        "total_credits_musd": 57,
        "total_debits_musd": 22.8,
        "reserve_requirement_musd": 34.2,
        "reserve_account_balance_musd": 35,
        "surplus_shortfall_musd": 0.8,
        "deposit_sufficient": true,
        "pab_variant": false,
        "rules_version": "15c3-3-exhibit-a-2026.1",
        "regulatory_basis": "SEC Rule 15c3-3 Exhibit A customer reserve formula (17 CFR 240.15c3-3).",
        "note": "Simplified computation over a representative subset of Exhibit A credit/debit line items with their prescribed aging and haircut treatments, from caller-supplied line items for one computation date (weekly computation framing). Does not audit the source of the supplied figures and is not a determination of regulatory compliance."
      },
      "compliance_flags": [
        "RESERVE_DEPOSIT_SUFFICIENT"
      ],
      "golden_hash": "f79310000aaf8bfa91bc2d0b57107e6d4deb842f30a4b9665b9f182fad46fe0b"
    },
    {
      "name": "deficient_shortfall",
      "description": "A single $100M credit line against a $10M debit yields a $90M requirement; the firm's reserve account holds only $40M -- a $50M shortfall.",
      "policy_parameters": {
        "credit_items": [
          {
            "label": "Free credit balances",
            "category": "free_credit_balances",
            "amount_musd": 100
          }
        ],
        "debit_items": [
          {
            "label": "Other allowable debit",
            "category": "other_allowable_debit",
            "amount_musd": 10,
            "aging_days": null
          }
        ],
        "reserve_account_balance_musd": 40,
        "pab_variant": false
      },
      "output_payload": {
        "credit_items": [
          {
            "label": "Free credit balances",
            "category": "free_credit_balances",
            "amount_musd": 100,
            "included_musd": 100
          }
        ],
        "debit_items": [
          {
            "label": "Other allowable debit",
            "category": "other_allowable_debit",
            "amount_musd": 10,
            "aging_days": 0,
            "included_musd": 10,
            "exclusion_reason": null
          }
        ],
        "total_credits_musd": 100,
        "total_debits_musd": 10,
        "reserve_requirement_musd": 90,
        "reserve_account_balance_musd": 40,
        "surplus_shortfall_musd": -50,
        "deposit_sufficient": false,
        "pab_variant": false,
        "rules_version": "15c3-3-exhibit-a-2026.1",
        "regulatory_basis": "SEC Rule 15c3-3 Exhibit A customer reserve formula (17 CFR 240.15c3-3).",
        "note": "Simplified computation over a representative subset of Exhibit A credit/debit line items with their prescribed aging and haircut treatments, from caller-supplied line items for one computation date (weekly computation framing). Does not audit the source of the supplied figures and is not a determination of regulatory compliance."
      },
      "compliance_flags": [
        "RESERVE_DEPOSIT_DEFICIENT"
      ],
      "golden_hash": "b1ea753a162f72387cfdfb9ed475a95b042c2e0c5ba3bd151ef6a74db6f67ee7"
    },
    {
      "name": "aging_rule_edge_ftd_excluded",
      "description": "Two failed-to-deliver debits: one aged 45 days (excluded, past the 30-day Exhibit A cutoff) and one aged 20 days (included). PAB (proprietary account of a broker-dealer) variant flag set.",
      "policy_parameters": {
        "credit_items": [
          {
            "label": "Free credit balances",
            "category": "free_credit_balances",
            "amount_musd": 50
          }
        ],
        "debit_items": [
          {
            "label": "FTD aged 45 days (excluded)",
            "category": "securities_failed_to_deliver",
            "amount_musd": 8,
            "aging_days": 45
          },
          {
            "label": "FTD aged 20 days (included)",
            "category": "securities_failed_to_deliver",
            "amount_musd": 4,
            "aging_days": 20
          }
        ],
        "reserve_account_balance_musd": 50,
        "pab_variant": true
      },
      "output_payload": {
        "credit_items": [
          {
            "label": "Free credit balances",
            "category": "free_credit_balances",
            "amount_musd": 50,
            "included_musd": 50
          }
        ],
        "debit_items": [
          {
            "label": "FTD aged 45 days (excluded)",
            "category": "securities_failed_to_deliver",
            "amount_musd": 8,
            "aging_days": 45,
            "included_musd": 0,
            "exclusion_reason": "AGED_FTD_EXCLUDED_OVER_30_DAYS"
          },
          {
            "label": "FTD aged 20 days (included)",
            "category": "securities_failed_to_deliver",
            "amount_musd": 4,
            "aging_days": 20,
            "included_musd": 4,
            "exclusion_reason": null
          }
        ],
        "total_credits_musd": 50,
        "total_debits_musd": 4,
        "reserve_requirement_musd": 46,
        "reserve_account_balance_musd": 50,
        "surplus_shortfall_musd": 4,
        "deposit_sufficient": true,
        "pab_variant": true,
        "rules_version": "15c3-3-exhibit-a-2026.1",
        "regulatory_basis": "SEC Rule 15c3-3 Exhibit A customer reserve formula (17 CFR 240.15c3-3).",
        "note": "Simplified computation over a representative subset of Exhibit A credit/debit line items with their prescribed aging and haircut treatments, from caller-supplied line items for one computation date (weekly computation framing). Does not audit the source of the supplied figures and is not a determination of regulatory compliance."
      },
      "compliance_flags": [
        "RESERVE_DEPOSIT_SUFFICIENT",
        "PAB_PROPRIETARY_ACCOUNT_OF_BD_VARIANT",
        "AGED_FTD_DEBITS_EXCLUDED"
      ],
      "golden_hash": "23e61a37ab2b940cb23471a62103b75f220917e3a6419883efadcbe94e5f35a8"
    },
    {
      "name": "zero_input_edge",
      "description": "No credit or debit items supplied at all. Finite gate: every total resolves to 0, not NaN/Infinity, and a zero requirement is vacuously sufficient.",
      "policy_parameters": {
        "credit_items": [],
        "debit_items": [],
        "reserve_account_balance_musd": 0,
        "pab_variant": false
      },
      "output_payload": {
        "credit_items": [],
        "debit_items": [],
        "total_credits_musd": 0,
        "total_debits_musd": 0,
        "reserve_requirement_musd": 0,
        "reserve_account_balance_musd": 0,
        "surplus_shortfall_musd": 0,
        "deposit_sufficient": true,
        "pab_variant": false,
        "rules_version": "15c3-3-exhibit-a-2026.1",
        "regulatory_basis": "SEC Rule 15c3-3 Exhibit A customer reserve formula (17 CFR 240.15c3-3).",
        "note": "Simplified computation over a representative subset of Exhibit A credit/debit line items with their prescribed aging and haircut treatments, from caller-supplied line items for one computation date (weekly computation framing). Does not audit the source of the supplied figures and is not a determination of regulatory compliance."
      },
      "compliance_flags": [
        "NO_DEPOSIT_REQUIRED_DEBITS_EXCEED_CREDITS",
        "RESERVE_DEPOSIT_SUFFICIENT"
      ],
      "golden_hash": "e7e9d94d657ad570631b52d1bed9b3d4ed497045c899b915d1318cc550b12b44"
    }
  ]
}
