{
  "tool_id": "art-336-compute-ltv-ratios",
  "note": "golden_hash filled by golden-parity.test.mjs --update. Vector 1: purchase, lesser-of-value-or-price, no subordinate financing. Vector 2: refinance with closed-end second + HELOC, CLTV/HCLTV diverge. Vector 3: zero appraised-value edge (finite gate).",
  "vectors": [
    {
      "name": "purchase_lesser_of_value_or_price",
      "description": "$500,000 appraised, $490,000 sales price, $392,000 first lien, no subordinate financing. Value used is the lesser (sales price). LTV = CLTV = HCLTV = 80%.",
      "policy_parameters": {
        "appraised_value": 500000,
        "sales_price": 490000,
        "first_lien_amount": 392000,
        "subordinate_lien_amount": 0,
        "heloc_credit_limit": 0,
        "transaction_type": "purchase"
      },
      "output_payload": {
        "ltv_pct": 80,
        "cltv_pct": 80,
        "hcltv_pct": 80,
        "value_used": 490000,
        "appraised_value": 500000,
        "sales_price": 490000,
        "first_lien_amount": 392000,
        "subordinate_lien_amount": 0,
        "heloc_credit_limit": 0,
        "transaction_type": "purchase",
        "regulatory_basis": "Fannie Mae Selling Guide B2-1.1-03 (LTV, CLTV, HCLTV Ratios); Freddie Mac Single-Family Seller/Servicer Guide 5401.1 (LTV/TLTV/HTLTV ratios)",
        "note": "CLTV includes closed-end subordinate financing at the drawn balance. HCLTV includes the full HELOC credit limit whether or not fully drawn, per B2-1.1-03. Value used is the lesser of appraised value and sales price for purchases; appraised value only for refinances. Not check_agency_eligibility_matrix (art-222), which consumes these ratios as inputs to its own LTV/CLTV/HCLTV eligibility checks."
      },
      "compliance_flags": [],
      "golden_hash": "436572c7cc2d7676e2186d6dcb9f1a4eed25b20e9c5dbef4932e5073c0a40115"
    },
    {
      "name": "refinance_second_and_heloc",
      "description": "$400,000 appraised (refinance, sales price N/A), $280,000 first lien, $20,000 closed-end second, $30,000 HELOC line. LTV 70%, CLTV 75%, HCLTV 82.5% (HELOC line counted in full).",
      "policy_parameters": {
        "appraised_value": 400000,
        "sales_price": 0,
        "first_lien_amount": 280000,
        "subordinate_lien_amount": 20000,
        "heloc_credit_limit": 30000,
        "transaction_type": "refinance"
      },
      "output_payload": {
        "ltv_pct": 70,
        "cltv_pct": 75,
        "hcltv_pct": 82.5,
        "value_used": 400000,
        "appraised_value": 400000,
        "sales_price": 0,
        "first_lien_amount": 280000,
        "subordinate_lien_amount": 20000,
        "heloc_credit_limit": 30000,
        "transaction_type": "refinance",
        "regulatory_basis": "Fannie Mae Selling Guide B2-1.1-03 (LTV, CLTV, HCLTV Ratios); Freddie Mac Single-Family Seller/Servicer Guide 5401.1 (LTV/TLTV/HTLTV ratios)",
        "note": "CLTV includes closed-end subordinate financing at the drawn balance. HCLTV includes the full HELOC credit limit whether or not fully drawn, per B2-1.1-03. Value used is the lesser of appraised value and sales price for purchases; appraised value only for refinances. Not check_agency_eligibility_matrix (art-222), which consumes these ratios as inputs to its own LTV/CLTV/HCLTV eligibility checks."
      },
      "compliance_flags": [],
      "golden_hash": "039e415012dfe5a268fa57751d2b768a56f2c55fc9ba9fac06607d6555e2bf36"
    },
    {
      "name": "zero_value_edge",
      "description": "Zero appraised value and zero sales price. Finite gate must zero all three ratios instead of producing Infinity/NaN and flag LTV_ZERO_VALUE.",
      "policy_parameters": {
        "appraised_value": 0,
        "sales_price": 0,
        "first_lien_amount": 100000,
        "subordinate_lien_amount": 0,
        "heloc_credit_limit": 0,
        "transaction_type": "purchase"
      },
      "output_payload": {
        "ltv_pct": 0,
        "cltv_pct": 0,
        "hcltv_pct": 0,
        "value_used": 0,
        "appraised_value": 0,
        "sales_price": 0,
        "first_lien_amount": 100000,
        "subordinate_lien_amount": 0,
        "heloc_credit_limit": 0,
        "transaction_type": "purchase",
        "regulatory_basis": "Fannie Mae Selling Guide B2-1.1-03 (LTV, CLTV, HCLTV Ratios); Freddie Mac Single-Family Seller/Servicer Guide 5401.1 (LTV/TLTV/HTLTV ratios)",
        "note": "CLTV includes closed-end subordinate financing at the drawn balance. HCLTV includes the full HELOC credit limit whether or not fully drawn, per B2-1.1-03. Value used is the lesser of appraised value and sales price for purchases; appraised value only for refinances. Not check_agency_eligibility_matrix (art-222), which consumes these ratios as inputs to its own LTV/CLTV/HCLTV eligibility checks."
      },
      "compliance_flags": [
        "LTV_ZERO_VALUE"
      ],
      "golden_hash": "ce17800db1fbff54c262c3019793ff1733fbbc4703359d56bbab1b0b90cbe294"
    }
  ]
}
