{
  "allowCustomDataForDataTypeAny": false,
  "functions": [
    {
      "id": "VALUE",
      "name": "VALUE",
      "description": "Live Latavis engine value (e.g. =LATAVIS.VALUE(\"PC\",\"PD\",\"techco_dl\")); L0/synthetic results return a labeled string, never a bare number",
      "result": {
        "type": "any"
      },
      "parameters": [
        {
          "name": "vertical",
          "description": "Vertical code (PC, CRE, EQ, ...)",
          "type": "string"
        },
        {
          "name": "fn",
          "description": "Catalog function (PD, CAP_RATE, ...)",
          "type": "string"
        },
        {
          "name": "arg1",
          "description": "First argument",
          "type": "string",
          "optional": true
        },
        {
          "name": "arg2",
          "description": "Second argument",
          "type": "string",
          "optional": true
        },
        {
          "name": "arg3",
          "description": "Third argument",
          "type": "string",
          "optional": true
        },
        {
          "name": "arg4",
          "description": "Fourth argument",
          "type": "string",
          "optional": true
        }
      ]
    },
    {
      "id": "PROVENANCE",
      "name": "PROVENANCE",
      "description": "Audit string for a Latavis value: source | as-of | verification | confidence",
      "result": {
        "type": "string"
      },
      "parameters": [
        {
          "name": "vertical",
          "description": "Vertical code",
          "type": "string"
        },
        {
          "name": "fn",
          "description": "Catalog function",
          "type": "string"
        },
        {
          "name": "arg1",
          "description": "First argument",
          "type": "string",
          "optional": true
        },
        {
          "name": "arg2",
          "description": "Second argument",
          "type": "string",
          "optional": true
        },
        {
          "name": "arg3",
          "description": "Third argument",
          "type": "string",
          "optional": true
        },
        {
          "name": "arg4",
          "description": "Fourth argument",
          "type": "string",
          "optional": true
        }
      ]
    },
    {
      "id": "LEVEL",
      "name": "LEVEL",
      "description": "Verification level + confidence cap of a Latavis value (L0 synthetic .. L3 OOS-validated)",
      "result": {
        "type": "string"
      },
      "parameters": [
        {
          "name": "vertical",
          "description": "Vertical code",
          "type": "string"
        },
        {
          "name": "fn",
          "description": "Catalog function",
          "type": "string"
        },
        {
          "name": "arg1",
          "description": "First argument",
          "type": "string",
          "optional": true
        },
        {
          "name": "arg2",
          "description": "Second argument",
          "type": "string",
          "optional": true
        },
        {
          "name": "arg3",
          "description": "Third argument",
          "type": "string",
          "optional": true
        },
        {
          "name": "arg4",
          "description": "Fourth argument",
          "type": "string",
          "optional": true
        }
      ]
    },
    {
      "id": "ASOF",
      "name": "ASOF",
      "description": "As-of date of the underlying Latavis data",
      "result": {
        "type": "string"
      },
      "parameters": [
        {
          "name": "vertical",
          "description": "Vertical code",
          "type": "string"
        },
        {
          "name": "fn",
          "description": "Catalog function",
          "type": "string"
        },
        {
          "name": "arg1",
          "description": "First argument",
          "type": "string",
          "optional": true
        },
        {
          "name": "arg2",
          "description": "Second argument",
          "type": "string",
          "optional": true
        },
        {
          "name": "arg3",
          "description": "Third argument",
          "type": "string",
          "optional": true
        },
        {
          "name": "arg4",
          "description": "Fourth argument",
          "type": "string",
          "optional": true
        }
      ]
    },
    {
      "id": "EVAL",
      "name": "EVAL",
      "description": "Evaluate a raw =LATAVIS.X.Y(...) formula string (same L0/synthetic labeling as VALUE)",
      "result": {
        "type": "any"
      },
      "parameters": [
        {
          "name": "formula",
          "description": "Full formula string",
          "type": "string"
        }
      ]
    },
    {
      "id": "PC.UW_PD",
      "name": "PC.UW_PD",
      "description": "1-year PD for a deal you are underwriting now \u2014 scores the FEATURES you pass, not a deal id in the fitted panel. Returns a labeled string, never a bare number, if the payload is synthetic. Confidence is capped at 0.50: the model is fitted but not validated out-of-sample.",
      "result": {
        "type": "any"
      },
      "parameters": [
        {
          "name": "spread_bps",
          "description": "Weighted-average spread, bps",
          "type": "number"
        },
        {
          "name": "facility_type",
          "description": "senior_secured / unitranche / first_lien / abl / revolver / second_lien / mezzanine",
          "type": "string",
          "optional": true
        },
        {
          "name": "principal_mm",
          "description": "Total principal, $MM",
          "type": "number",
          "optional": true
        }
      ]
    },
    {
      "id": "PC.UW_LGD",
      "name": "PC.UW_LGD",
      "description": "Loss given default implied by a facility type's lien seniority (realized-recovery lien table).",
      "result": {
        "type": "any"
      },
      "parameters": [
        {
          "name": "facility_type",
          "description": "Facility type",
          "type": "string",
          "optional": true
        }
      ]
    },
    {
      "id": "PC.UW_EXPECTED_LOSS",
      "name": "PC.UW_EXPECTED_LOSS",
      "description": "Expected loss ($MM) on a deal you are underwriting now: model PD x model LGD x YOUR facility size.",
      "result": {
        "type": "any"
      },
      "parameters": [
        {
          "name": "spread_bps",
          "description": "Weighted-average spread, bps",
          "type": "number"
        },
        {
          "name": "facility_type",
          "description": "Facility type",
          "type": "string",
          "optional": true
        },
        {
          "name": "principal_mm",
          "description": "Total principal, $MM",
          "type": "number",
          "optional": true
        },
        {
          "name": "facility_size_mm",
          "description": "Facility size, $MM",
          "type": "number",
          "optional": true
        }
      ]
    }
  ]
}
