Skip to main content
Glama

Backtest VaR and expected shortfall forecasts

assay_var_es
Destructive

Use this when you have VaR or Expected-Shortfall forecasts and need to know whether reality breached them more often or deeper than your claimed tail level allows -- a risk-forecast audit, not buy/sell advice. Does your risk model's VaR/ES forecast survive contact with reality? Exceedance backtest over YOUR forecasts -- a new claim type: risk numbers, not return claims.

Submit realised per-period returns plus the VaR forecasts your model produced ex ante (positive loss thresholds at tail level alpha, e.g. 0.05 for a 95% VaR), optionally the matching expected-shortfall forecasts. The breach count is graded on the EXACT binomial Basel traffic-light zones (Basel Committee 1996: green below cumulative probability 0.95, yellow to 0.9999, red above) -- published boundaries, no house thresholds; red earns the named demote VAR_BREACH_RATE_EXCESS. Kupiec's proportion-of-failures LR (1995) and Christoffersen's independence LR (1998) ride along -- clustered breaches flag the advisory var_breaches_clustered (a model blind to volatility clustering). If ES forecasts are supplied, a joint (VaR, ES) mixture e-process (e-backtesting, Wang & Ziegel) grades breach DEPTH: crossing Ville's anytime-valid 1% line earns ES_TAIL_UNDERSTATED. Supply benchmark_var_forecasts (and optionally benchmark_es_forecasts, e.g. a rolling historical quantile) and the assay also tests EQUAL PREDICTIVE ABILITY: Diebold-Mariano (1995) on a strictly consistent loss (quantile tick, or the joint FZ0 loss of Fissler & Ziegel 2016 when both sides carry ES) -- a naive benchmark that beats your model past the one-sided 5% line earns RISK_FORECAST_DOMINATED_BY_BENCHMARK; the attention zone to 10% is the advisory risk_forecast_lags_benchmark. Demote-only: too many breaches can kill, too few is the mis-calibration advisory var_breach_rate_sparse -- conservative models pass with a flag, never a blessing. Code-computed end to end, fail-closed on malformed or undersized input (a series too short to reach the red zone answers insufficient_evidence instead of a hollow pass). Works for any asset class. NOT financial advice; no order path. Price: per check; see https://api.alphaassay.com/v1/meta/pricing (api_key required -- account setup at https://api.alphaassay.com/account).

Input Schema

NameRequiredDescriptionDefault
alphaNoTail level, e.g. 0.05 for a 95% VaR (0.001-0.25). Sets the Basel traffic-light expectation.
api_keyNoAPI key for a paid MCP check. Hosted Streamable HTTP clients should send it in the Authorization: Bearer transport header so the model never sees the secret; local stdio callers may supply the raw key in this tool argument without a Bearer prefix. Create an account at https://api.alphaassay.com/account; the current free allowance and prices are published at https://api.alphaassay.com/v1/meta/pricing. Paid MCP calls use API-key credits; x402 buys only the separate REST POST /x402/v1/gauntlet and is not MCP billing.
returnsYesRealised per-period returns (the outcomes your risk model was forecasting for).
request_idNoOptional idempotency key for this paid execution. Retry the same request_id with the same payload to replay one stored result without another charge; reuse with a different payload returns idempotency_conflict.
es_forecastsNoOptional matching expected-shortfall forecasts; enables the joint (VaR, ES) e-process tail test.
var_forecastsYesYour model's ex-ante VaR forecasts (positive loss thresholds at level alpha) to backtest for breaches.
benchmark_es_forecastsNoOptional benchmark ES forecasts; switches the EPA test to the joint FZ0 loss.
benchmark_var_forecastsNoOptional naive/benchmark VaR forecasts (e.g. a rolling historical quantile) for the Diebold-Mariano equal-predictive-ability test -- lose to it and the claim is demoted.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed34 schema fields changed
    • addedInput schema / allOf
      Added value: +[
      +  {
      +    "if": {
      +      "properties": {
      +        "benchmark_es_forecasts": {
      +          "not": {
      +            "type": "null"
      +          }
      +        }
      +      },
      +      "required": [
      +        "benchmark_es_forecasts"
      +      ]
      +    },
      +    "then": {
      +      "properties": {
      +        "benchmark_var_forecasts": {
      +          "not": {
      +            "type": "null"
      +          }
      +        },
      +        "es_forecasts": {
      +          "not": {
      +            "type": "null"
      +          }
      +        }
      +      },
      +      "required": [
      +        "es_forecasts",
      +        "benchmark_var_forecasts"
      +      ]
      +    }
      +  }
      +]
    • addedInput schema / properties / alpha / anyOf
      Added value: +[
      +  {
      +    "type": "integer",
      +    "x-strictJsonInteger": true
      +  },
      +  {
      +    "type": "number"
      +  }
      +]
    • addedInput schema / properties / alpha / ge
      Added value: +0.001
    • addedInput schema / properties / alpha / le
      Added value: +0.25
    • removedInput schema / properties / alpha / title
      Removed value: -"Alpha"
    • removedInput schema / properties / alpha / type
      Removed value: -"number"
    • changedInput schema / properties / api_key / description
      Previous value: -"API key for a paid check (Bearer). Free account with 3 free checks at https://api.alphaassay.com/account; agents can also pay per call via x402."New value: +"API key for a paid MCP check. Hosted Streamable HTTP clients should send it in the Authorization: Bearer transport header so the model never sees the secret; local stdio callers may supply the raw key in this tool argument without a Bearer prefix. Create an account at https://api.alphaassay.com/account; the current free allowance and prices are published at https://api.alphaassay.com/v1/meta/pricing. Paid MCP calls use API-key credits; x402 buys only the separate REST POST /x402/v1/gauntlet and is not MCP billing."
    • addedInput schema / properties / api_key / maxLength
      Added value: +512
    • removedInput schema / properties / api_key / title
      Removed value: -"Api Key"
    • addedInput schema / properties / benchmark_es_forecasts / anyOf
      Added value: +[
      +  {
      +    "items": {
      +      "anyOf": [
      +        {
      +          "maximum": 1000000000000000,
      +          "minimum": -1000000000000000,
      +          "type": "integer",
      +          "x-strictJsonInteger": true
      +        },
      +        {
      +          "maximum": 1000000000000000,
      +          "minimum": -1000000000000000,
      +          "type": "number"
      +        }
      +      ]
      +    },
      +    "maxItems": 100000,
      +    "minItems": 1,
      +    "type": "array"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedInput schema / properties / benchmark_es_forecasts / items
      Removed value: -{}
    • removedInput schema / properties / benchmark_es_forecasts / title
      Removed value: -"Benchmark Es Forecasts"
    • removedInput schema / properties / benchmark_es_forecasts / type
      Removed value: -"array"
    • addedInput schema / properties / benchmark_var_forecasts / anyOf
      Added value: +[
      +  {
      +    "items": {
      +      "anyOf": [
      +        {
      +          "exclusiveMinimum": 0,
      +          "maximum": 1000000000000000,
      +          "minimum": -1000000000000000,
      +          "type": "integer",
      +          "x-strictJsonInteger": true
      +        },
      +        {
      +          "exclusiveMinimum": 0,
      +          "maximum": 1000000000000000,
      +          "minimum": -1000000000000000,
      +          "type": "number"
      +        }
      +      ]
      +    },
      +    "maxItems": 100000,
      +    "minItems": 1,
      +    "type": "array"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedInput schema / properties / benchmark_var_forecasts / items
      Removed value: -{}
    • removedInput schema / properties / benchmark_var_forecasts / title
      Removed value: -"Benchmark Var Forecasts"
    • removedInput schema / properties / benchmark_var_forecasts / type
      Removed value: -"array"
    • addedInput schema / properties / es_forecasts / anyOf
      Added value: +[
      +  {
      +    "items": {
      +      "anyOf": [
      +        {
      +          "maximum": 1000000000000000,
      +          "minimum": -1000000000000000,
      +          "type": "integer",
      +          "x-strictJsonInteger": true
      +        },
      +        {
      +          "maximum": 1000000000000000,
      +          "minimum": -1000000000000000,
      +          "type": "number"
      +        }
      +      ]
      +    },
      +    "maxItems": 100000,
      +    "minItems": 1,
      +    "type": "array"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedInput schema / properties / es_forecasts / items
      Removed value: -{}
    • removedInput schema / properties / es_forecasts / title
      Removed value: -"Es Forecasts"
    • removedInput schema / properties / es_forecasts / type
      Removed value: -"array"
    • addedInput schema / properties / request_id
      Added value: +{
      +  "anyOf": [
      +    {
      +      "maxLength": 256,
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Optional idempotency key for this paid execution. Retry the same request_id with the same payload to replay one stored result without another charge; reuse with a different payload returns idempotency_conflict."
      +}
    • addedInput schema / properties / returns / items / anyOf
      Added value: +[
      +  {
      +    "maximum": 1000000000000000,
      +    "minimum": -1000000000000000,
      +    "type": "integer",
      +    "x-strictJsonInteger": true
      +  },
      +  {
      +    "maximum": 1000000000000000,
      +    "minimum": -1000000000000000,
      +    "type": "number"
      +  }
      +]
    • addedInput schema / properties / returns / maxItems
      Added value: +100000
    • addedInput schema / properties / returns / minItems
      Added value: +1
    • removedInput schema / properties / returns / title
      Removed value: -"Returns"
    • addedInput schema / properties / var_forecasts / items / anyOf
      Added value: +[
      +  {
      +    "exclusiveMinimum": 0,
      +    "maximum": 1000000000000000,
      +    "minimum": -1000000000000000,
      +    "type": "integer",
      +    "x-strictJsonInteger": true
      +  },
      +  {
      +    "exclusiveMinimum": 0,
      +    "maximum": 1000000000000000,
      +    "minimum": -1000000000000000,
      +    "type": "number"
      +  }
      +]
    • addedInput schema / properties / var_forecasts / maxItems
      Added value: +100000
    • addedInput schema / properties / var_forecasts / minItems
      Added value: +1
    • removedInput schema / properties / var_forecasts / title
      Removed value: -"Var Forecasts"
    • removedInput schema / title
      Removed value: -"assay_var_esArguments"
    • addedInput schema / x-maxBodyBytes
      Added value: +5242880
    • addedInput schema / x-relations
      Added value: +[
      +  "len(var_forecasts) == len(returns)",
      +  "len(es_forecasts) == len(returns) when present",
      +  "len(benchmark_var_forecasts) == len(returns) when present",
      +  "len(benchmark_es_forecasts) == len(returns) when present",
      +  "es_forecasts[i] > var_forecasts[i] when present",
      +  "benchmark_es_forecasts[i] > benchmark_var_forecasts[i] when present"
      +]
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$defs": {
      +    "BreachCounts": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "expected": {
      +          "anyOf": [
      +            {
      +              "maximum": 1000000000000000,
      +              "minimum": -1000000000000000,
      +              "type": "integer",
      +              "x-strictJsonInteger": true
      +            },
      +            {
      +              "maximum": 1000000000000000,
      +              "minimum": -1000000000000000,
      +              "type": "number"
      +            }
      +          ]
      +        },
      +        "observed": {
      +          "maximum": 9223372036854776000,
      +          "minimum": 0,
      +          "type": "integer",
      +          "x-strictJsonInteger": true
      +        },
      +        "rate_observed": {
      +          "anyOf": [
      +            {
      +              "maximum": 1,
      +              "minimum": 0,
      +              "type": "integer",
      +              "x-strictJsonInteger": true
      +            },
      +            {
      +              "maximum": 1,
      +              "minimum": 0,
      +              "type": "number"
      +            }
      +          ]
      +        }
      +      },
      +      "required": [
      +        "observed",
      +        "expected",
      +        "rate_observed"
      +      ],
      +      "type": "object"
      +    },
      +    "EqualPredictiveAbility": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "advisory_p_threshold": {
      +          "anyOf": [
      +            {
      +              "maximum": 1,
      +              "minimum": 0,
      +              "type": "integer",
      +              "x-strictJsonInteger": true
      +            },
      +            {
      +              "maximum": 1,
      +              "minimum": 0,
      +              "type": "number"
      +            }
      +          ]
      +        },
      +        "dm_stat": {
      +          "anyOf": [
      +            {
      +              "maximum": 1000000000000000,
      +              "minimum": -1000000000000000,
      +              "type": "integer",
      +              "x-strictJsonInteger": true
      +            },
      +            {
      +              "maximum": 1000000000000000,
      +              "minimum": -1000000000000000,
      +              "type": "number"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ]
      +        },
      +        "hac_lags": {
      +          "anyOf": [
      +            {
      +              "maximum": 9223372036854776000,
      +              "minimum": 0,
      +              "type": "integer",
      +              "x-strictJsonInteger": true
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ]
      +        },
      +        "kill_p_threshold": {
      +          "anyOf": [
      +            {
      +              "maximum": 1,
      +              "minimum": 0,
      +              "type": "integer",
      +              "x-strictJsonInteger": true
      +            },
      +            {
      +              "maximum": 1,
      +              "minimum": 0,
      +              "type": "number"
      +            }
      +          ]
      +        },
      +        "loss": {
      +          "anyOf": [
      +            {
      +              "enum": [
      +                "fz0",
      +                "quantile_tick"
      +              ],
      +              "type": "string"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ]
      +        },
      +        "mean_loss_benchmark": {
      +          "anyOf": [
      +            {
      +              "maximum": 1000000000000000,
      +              "minimum": -1000000000000000,
      +              "type": "integer",
      +              "x-strictJsonInteger": true
      +            },
      +            {
      +              "maximum": 1000000000000000,
      +              "minimum": -1000000000000000,
      +              "type": "number"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ]
      +        },
      +        "mean_loss_candidate": {
      +          "anyOf": [
      +            {
      +              "maximum": 1000000000000000,
      +              "minimum": -1000000000000000,
      +              "type": "integer",
      +              "x-strictJsonInteger": true
      +            },
      +            {
      +              "maximum": 1000000000000000,
      +              "minimum": -1000000000000000,
      +              "type": "number"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ]
      +        },
      +        "p_dominated": {
      +          "anyOf": [
      +            {
      +              "maximum": 1,
      +              "minimum": 0,
      +              "type": "integer",
      +              "x-strictJsonInteger": true
      +            },
      +            {
      +              "maximum": 1,
      +              "minimum": 0,
      +              "type": "number"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ]
      +        },
      +        "supplied": {
      +          "type": "boolean"
      +        }
      +      },
      +      "required": [
      +        "supplied",
      +        "loss",
      +        "mean_loss_candidate",
      +        "mean_loss_benchmark",
      +        "dm_stat",
      +        "p_dominated",
      +        "hac_lags",
      +        "kill_p_threshold",
      +        "advisory_p_threshold"
      +      ],
      +      "type": "object"
      +    },
      +    "EsBacktestResult": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "e_advisory_threshold": {
      +          "anyOf": [
      +            {
      +              "maximum": 1000000000000000,
      +              "minimum": -1000000000000000,
      +              "type": "integer",
      +              "x-strictJsonInteger": true
      +            },
      +            {
      +              "maximum": 1000000000000000,
      +              "minimum": -1000000000000000,
      +              "type": "number"
      +            }
      +          ]
      +        },
      +        "e_kill_threshold": {
      +          "anyOf": [
      +            {
      +              "maximum": 1000000000000000,
      +              "minimum": -1000000000000000,
      +              "type": "integer",
      +              "x-strictJsonInteger": true
      +            },
      +            {
      +              "maximum": 1000000000000000,
      +              "minimum": -1000000000000000,
      +              "type": "number"
      +            }
      +          ]
      +        },
      +        "e_value": {
      +          "anyOf": [
      +            {
      +              "maximum": 1000000000000000,
      +              "minimum": -1000000000000000,
      +              "type": "integer",
      +              "x-strictJsonInteger": true
      +            },
      +            {
      +              "maximum": 1000000000000000,
      +              "minimum": -1000000000000000,
      +              "type": "number"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ]
      +        },
      +        "lambda_grid": {
      +          "items": {
      +            "anyOf": [
      +              {
      +                "maximum": 1000000000000000,
      +                "minimum": -1000000000000000,
      +                "type": "integer",
      +                "x-strictJsonInteger": true
      +              },
      +              {
      +                "maximum": 1000000000000000,
      +                "minimum": -1000000000000000,
      +                "type": "number"
      +              }
      +            ]
      +          },
      +          "maxItems": 10000,
      +          "type": "array"
      +        },
      +        "log10_e_value": {
      +          "anyOf": [
      +            {
      +              "maximum": 1000000000000000,
      +              "minimum": -1000000000000000,
      +              "type": "integer",
      +              "x-strictJsonInteger": true
      +            },
      +            {
      +              "maximum": 1000000000000000,
      +              "minimum": -1000000000000000,
      +              "type": "number"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ]
      +        },
      +        "supplied": {
      +          "type": "boolean"
      +        }
      +      },
      +      "required": [
      +        "supplied",
      +        "lambda_grid",
      +        "e_value",
      +        "log10_e_value",
      +        "e_kill_threshold",
      +        "e_advisory_threshold"
      +      ],
      +      "type": "object"
      +    },
      +    "IndependenceResult": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "advisory_p_threshold": {
      +          "anyOf": [
      +            {
      +              "maximum": 1,
      +              "minimum": 0,
      +              "type": "integer",
      +              "x-strictJsonInteger": true
      +            },
      +            {
      +              "maximum": 1,
      +              "minimum": 0,
      +              "type": "number"
      +            }
      +          ]
      +        },
      +        "lr": {
      +          "anyOf": [
      +            {
      +              "maximum": 1000000000000000,
      +              "minimum": -1000000000000000,
      +              "type": "integer",
      +              "x-strictJsonInteger": true
      +            },
      +            {
      +              "maximum": 1000000000000000,
      +              "minimum": -1000000000000000,
      +              "type": "number"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ]
      +        },
      +        "max_run": {
      +          "maximum": 9223372036854776000,
      +          "minimum": 0,
      +          "type": "integer",
      +          "x-strictJsonInteger": true
      +        },
      +        "n00": {
      +          "maximum": 9223372036854776000,
      +          "minimum": 0,
      +          "type": "integer",
      +          "x-strictJsonInteger": true
      +        },
      +        "n01": {
      +          "maximum": 9223372036854776000,
      +          "minimum": 0,
      +          "type": "integer",
      +          "x-strictJsonInteger": true
      +        },
      +        "n10": {
      +          "maximum": 9223372036854776000,
      +          "minimum": 0,
      +          "type": "integer",
      +          "x-strictJsonInteger": true
      +        },
      +        "n11": {
      +          "maximum": 9223372036854776000,
      +          "minimum": 0,
      +          "type": "integer",
      +          "x-strictJsonInteger": true
      +        },
      +        "p": {
      +          "anyOf": [
      +            {
      +              "maximum": 1,
      +              "minimum": 0,
      +              "type": "integer",
      +              "x-strictJsonInteger": true
      +            },
      +            {
      +              "maximum": 1,
      +              "minimum": 0,
      +              "type": "number"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ]
      +        }
      +      },
      +      "required": [
      +        "n00",
      +        "n01",
      +        "n10",
      +        "n11",
      +        "lr",
      +        "p",
      +        "max_run",
      +        "advisory_p_threshold"
      +      ],
      +      "type": "object"
      +    },
      +    "KupiecResult": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "lr": {
      +          "anyOf": [
      +            {
      +              "maximum": 1000000000000000,
      +              "minimum": -1000000000000000,
      +              "type": "integer",
      +              "x-strictJsonInteger": true
      +            },
      +            {
      +              "maximum": 1000000000000000,
      +              "minimum": -1000000000000000,
      +              "type": "number"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ]
      +        },
      +        "p": {
      +          "anyOf": [
      +            {
      +              "maximum": 1,
      +              "minimum": 0,
      +              "type": "integer",
      +              "x-strictJsonInteger": true
      +            },
      +            {
      +              "maximum": 1,
      +              "minimum": 0,
      +              "type": "number"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ]
      +        }
      +      },
      +      "required": [
      +        "lr",
      +        "p"
      +      ],
      +      "type": "object"
      +    },
      +    "PublicMeta": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "api_version": {
      +          "maxLength": 256,
      +          "minLength": 1,
      +          "pattern": "^\\S+$",
      +          "type": "string"
      +        },
      +        "as_of": {
      +          "format": "date-time",
      +          "maxLength": 20,
      +          "minLength": 20,
      +          "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$",
      +          "type": "string"
      +        },
      +        "disclaimer": {
      +          "maxLength": 2000,
      +          "type": "string"
      +        },
      +        "engine_version": {
      +          "maxLength": 256,
      +          "minLength": 1,
      +          "pattern": "^\\S+$",
      +          "type": "string"
      +        },
      +        "input_digest": {
      +          "pattern": "^sha256:[0-9a-f]{64}$",
      +          "type": "string"
      +        },
      +        "not_financial_advice": {
      +          "const": true,
      +          "type": "boolean"
      +        },
      +        "operation": {
      +          "maxLength": 256,
      +          "minLength": 1,
      +          "pattern": "^\\S+$",
      +          "type": "string"
      +        },
      +        "request_digest": {
      +          "pattern": "^sha256:[0-9a-f]{64}$",
      +          "type": "string"
      +        },
      +        "request_id": {
      +          "anyOf": [
      +            {
      +              "maxLength": 256,
      +              "type": "string"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ]
      +        },
      +        "source_identity_digest": {
      +          "pattern": "^sha256:[0-9a-f]{64}$",
      +          "type": "string"
      +        },
      +        "statefulness": {
      +          "enum": [
      +            "pure",
      +            "public_read",
      +            "tenant_read",
      +            "tenant_write"
      +          ],
      +          "type": "string"
      +        },
      +        "tenant_scope": {
      +          "maxLength": 256,
      +          "minLength": 1,
      +          "pattern": "^\\S+$",
      +          "type": "string"
      +        },
      +        "tenant_scope_version": {
      +          "maxLength": 256,
      +          "minLength": 1,
      +          "pattern": "^\\S+$",
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "engine_version",
      +        "api_version",
      +        "as_of",
      +        "input_digest",
      +        "request_digest",
      +        "tenant_scope",
      +        "tenant_scope_version",
      +        "request_id",
      +        "source_identity_digest",
      +        "operation",
      +        "statefulness",
      +        "not_financial_advice",
      +        "disclaimer"
      +      ],
      +      "type": "object",
      +      "x-relations": [
      +        "as_of is a real UTC RFC3339 second"
      +      ]
      +    },
      +    "TrafficLightZone": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "cumulative_prob": {
      +          "anyOf": [
      +            {
      +              "maximum": 1,
      +              "minimum": 0,
      +              "type": "integer",
      +              "x-strictJsonInteger": true
      +            },
      +            {
      +              "maximum": 1,
      +              "minimum": 0,
      +              "type": "number"
      +            }
      +          ]
      +        },
      +        "zone": {
      +          "enum": [
      +            "green",
      +            "yellow",
      +            "red"
      +          ],
      +          "type": "string"
      +        },
      +        "zone_thresholds": {
      +          "$ref": "#/$defs/ZoneThresholds"
      +        }
      +      },
      +      "required": [
      +        "zone",
      +        "cumulative_prob",
      +        "zone_thresholds"
      +      ],
      +      "type": "object"
      +    },
      +    "ZoneThresholds": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "red_at_cumulative_prob": {
      +          "anyOf": [
      +            {
      +              "maximum": 1,
      +              "minimum": 0,
      +              "type": "integer",
      +              "x-strictJsonInteger": true
      +            },
      +            {
      +              "maximum": 1,
      +              "minimum": 0,
      +              "type": "number"
      +            }
      +          ]
      +        },
      +        "yellow_at_cumulative_prob": {
      +          "anyOf": [
      +            {
      +              "maximum": 1,
      +              "minimum": 0,
      +              "type": "integer",
      +              "x-strictJsonInteger": true
      +            },
      +            {
      +              "maximum": 1,
      +              "minimum": 0,
      +              "type": "number"
      +            }
      +          ]
      +        }
      +      },
      +      "required": [
      +        "yellow_at_cumulative_prob",
      +        "red_at_cumulative_prob"
      +      ],
      +      "type": "object"
      +    }
      +  },
      +  "additionalProperties": false,
      +  "properties": {
      +    "result": {
      +      "additionalProperties": false,
      +      "allOf": [
      +        {
      +          "if": {
      +            "properties": {
      +              "status": {
      +                "const": "computed"
      +              }
      +            },
      +            "required": [
      +              "status"
      +            ]
      +          },
      +          "then": {
      +            "properties": {
      +              "basel": {
      +                "not": {
      +                  "type": "null"
      +                }
      +              },
      +              "breaches": {
      +                "not": {
      +                  "type": "null"
      +                }
      +              },
      +              "epa": {
      +                "not": {
      +                  "type": "null"
      +                }
      +              },
      +              "es": {
      +                "not": {
      +                  "type": "null"
      +                }
      +              },
      +              "independence": {
      +                "not": {
      +                  "type": "null"
      +                }
      +              },
      +              "interpretation": {
      +                "not": {
      +                  "type": "null"
      +                }
      +              },
      +              "kupiec": {
      +                "not": {
      +                  "type": "null"
      +                }
      +              },
      +              "n": {
      +                "not": {
      +                  "type": "null"
      +                }
      +              },
      +              "reason": {
      +                "type": "null"
      +              }
      +            },
      +            "required": [
      +              "n",
      +              "breaches",
      +              "kupiec",
      +              "independence",
      +              "es",
      +              "basel",
      +              "epa",
      +              "interpretation"
      +            ]
      +          }
      +        },
      +        {
      +          "if": {
      +            "properties": {
      +              "status": {
      +                "const": "blocked"
      +              }
      +            },
      +            "required": [
      +              "status"
      +            ]
      +          },
      +          "then": {
      +            "properties": {
      +              "basel": {
      +                "type": "null"
      +              },
      +              "breaches": {
      +                "type": "null"
      +              },
      +              "epa": {
      +                "type": "null"
      +              },
      +              "es": {
      +                "type": "null"
      +              },
      +              "independence": {
      +                "type": "null"
      +              },
      +              "interpretation": {
      +                "type": "null"
      +              },
      +              "kupiec": {
      +                "type": "null"
      +              },
      +              "reason": {
      +                "not": {
      +                  "type": "null"
      +                }
      +              }
      +            },
      +            "required": [
      +              "reason"
      +            ]
      +          }
      +        },
      +        {
      +          "if": {
      +            "properties": {
      +              "status": {
      +                "const": "computed"
      +              }
      +            },
      +            "required": [
      +              "status"
      +            ]
      +          },
      +          "then": {
      +            "properties": {
      +              "n": {
      +                "minimum": 1
      +              }
      +            }
      +          }
      +        }
      +      ],
      +      "properties": {
      +        "_meta": {
      +          "$ref": "#/$defs/PublicMeta"
      +        },
      +        "advisories": {
      +          "items": {
      +            "maxLength": 2000,
      +            "type": "string"
      +          },
      +          "maxItems": 10000,
      +          "type": "array"
      +        },
      +        "alpha": {
      +          "anyOf": [
      +            {
      +              "maximum": 1,
      +              "minimum": 0,
      +              "type": "integer",
      +              "x-strictJsonInteger": true
      +            },
      +            {
      +              "maximum": 1,
      +              "minimum": 0,
      +              "type": "number"
      +            }
      +          ]
      +        },
      +        "basel": {
      +          "anyOf": [
      +            {
      +              "$ref": "#/$defs/TrafficLightZone"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ],
      +          "default": null
      +        },
      +        "breaches": {
      +          "anyOf": [
      +            {
      +              "$ref": "#/$defs/BreachCounts"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ],
      +          "default": null
      +        },
      +        "died_at": {
      +          "anyOf": [
      +            {
      +              "maxLength": 2000,
      +              "type": "string"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ]
      +        },
      +        "died_at_plain": {
      +          "anyOf": [
      +            {
      +              "maxLength": 2000,
      +              "type": "string"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ]
      +        },
      +        "epa": {
      +          "anyOf": [
      +            {
      +              "$ref": "#/$defs/EqualPredictiveAbility"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ],
      +          "default": null
      +        },
      +        "es": {
      +          "anyOf": [
      +            {
      +              "$ref": "#/$defs/EsBacktestResult"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ],
      +          "default": null
      +        },
      +        "failure_codes": {
      +          "items": {
      +            "maxLength": 2000,
      +            "type": "string"
      +          },
      +          "maxItems": 10000,
      +          "type": "array"
      +        },
      +        "independence": {
      +          "anyOf": [
      +            {
      +              "$ref": "#/$defs/IndependenceResult"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ],
      +          "default": null
      +        },
      +        "interpretation": {
      +          "anyOf": [
      +            {
      +              "maxLength": 2000,
      +              "type": "string"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ],
      +          "default": null
      +        },
      +        "kupiec": {
      +          "anyOf": [
      +            {
      +              "$ref": "#/$defs/KupiecResult"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ],
      +          "default": null
      +        },
      +        "method": {
      +          "const": "var_es_exceedance_backtest",
      +          "type": "string"
      +        },
      +        "n": {
      +          "anyOf": [
      +            {
      +              "maximum": 9223372036854776000,
      +              "minimum": 0,
      +              "type": "integer",
      +              "x-strictJsonInteger": true
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ]
      +        },
      +        "reason": {
      +          "anyOf": [
      +            {
      +              "maxLength": 2000,
      +              "type": "string"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ],
      +          "default": null
      +        },
      +        "schema": {
      +          "const": "var_es.v1",
      +          "type": "string"
      +        },
      +        "status": {
      +          "enum": [
      +            "blocked",
      +            "computed"
      +          ],
      +          "type": "string"
      +        },
      +        "verdict": {
      +          "enum": [
      +            "pass",
      +            "fail",
      +            "insufficient_evidence"
      +          ],
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "_meta",
      +        "schema",
      +        "method",
      +        "status",
      +        "verdict",
      +        "n",
      +        "alpha",
      +        "died_at",
      +        "died_at_plain",
      +        "failure_codes",
      +        "advisories"
      +      ],
      +      "type": "object",
      +      "x-relations": [
      +        "breaches.observed <= n when status == computed",
      +        "breaches.rate_observed ~= breaches.observed / n when status == computed",
      +        "independence.n00 + independence.n01 + independence.n10 + independence.n11 == n - 1 when status == computed"
      +      ]
      +    }
      +  },
      +  "required": [
      +    "result"
      +  ],
      +  "type": "object"
      +}
  2. Changed7 schema fields changed
    • addedInput schema / properties / alpha / description
      Added value: +"Tail level, e.g. 0.05 for a 95% VaR (0.001-0.25). Sets the Basel traffic-light expectation."
    • addedInput schema / properties / api_key / description
      Added value: +"API key for a paid check (Bearer). Free account with 3 free checks at https://api.alphaassay.com/account; agents can also pay per call via x402."
    • addedInput schema / properties / benchmark_es_forecasts / description
      Added value: +"Optional benchmark ES forecasts; switches the EPA test to the joint FZ0 loss."
    • addedInput schema / properties / benchmark_var_forecasts / description
      Added value: +"Optional naive/benchmark VaR forecasts (e.g. a rolling historical quantile) for the Diebold-Mariano equal-predictive-ability test -- lose to it and the claim is demoted."
    • addedInput schema / properties / es_forecasts / description
      Added value: +"Optional matching expected-shortfall forecasts; enables the joint (VaR, ES) e-process tail test."
    • addedInput schema / properties / returns / description
      Added value: +"Realised per-period returns (the outcomes your risk model was forecasting for)."
    • addedInput schema / properties / var_forecasts / description
      Added value: +"Your model's ex-ante VaR forecasts (positive loss thresholds at level alpha) to backtest for breaches."
  3. Changed2 schema fields changed
    • addedInput schema / properties / benchmark_es_forecasts
      Added value: +{
      +  "default": null,
      +  "items": {},
      +  "title": "Benchmark Es Forecasts",
      +  "type": "array"
      +}
    • addedInput schema / properties / benchmark_var_forecasts
      Added value: +{
      +  "default": null,
      +  "items": {},
      +  "title": "Benchmark Var Forecasts",
      +  "type": "array"
      +}
  4. Changed1 schema field changed
    • addedInput schema / additionalProperties
      Added value: +false
  5. Added

TDQS

A4.8/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Beyond annotations (destructiveHint=true), the description details that the tool is paid, charges per check, requires an API key, and fails closed on malformed input. It also explains the demote-only philosophy and what outputs to expect (traffic-light zones, flags, advisories). This provides rich behavioral context beyond what annotations convey.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

While the description is front-loaded with the main purpose, it is quite lengthy (multiple paragraphs) and includes detailed explanations of statistical tests and pricing. Some redundancy (e.g., repeating 'not financial advice') could be trimmed. It would benefit from a more structured or abbreviated form focusing on key points.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (8 parameters, conditional requirements, output schema present), the description covers purpose, input semantics, validation rules, pricing, error handling, and output flags. It even explains the Basel zones and specific flags (VAR_BREACH_RATE_EXCESS, ES_TAIL_UNDERSTATED, etc.). The presence of an output schema relieves the need to describe return values, and the description provides all necessary context for correct invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, and the description adds substantial meaning by explaining the roles of each parameter (e.g., returns as outcomes, var_forecasts as ex-ante thresholds, benchmark forecasts for comparison). It also clarifies conditional requirements (e.g., if benchmark_es_forecasts supplied, then es_forecasts and benchmark_var_forecasts required) and provides examples of tail levels (0.05 for 95% VaR).

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states the specific verb 'backtest' and resource 'VaR and expected shortfall forecasts'. It clearly distinguishes from siblings by emphasizing it is a risk-forecast audit, not buy/sell advice, and mentions the types of claims produced (risk numbers vs. return claims).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly opens with 'Use this when you have VaR or Expected-Shortfall forecasts and need to know whether reality breached them...' and clarifies it is not buy/sell advice. It also explains when to supply benchmark forecasts for equal predictive ability testing and warns about insufficient data. Though it does not name specific sibling tools, the context is sufficient for appropriate selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources