Skip to main content
Glama

finance.var_historical

Read-onlyIdempotent

Calculate historical VaR and CVaR from period returns using empirical quantiles and linear interpolation, without distributional assumptions.

Instructions

과거 수익률의 경험적 분위수로 VaR 와 CVaR(기대부족액)을 계산한다. returns 는 기간 수익률 문자열 목록(2개 이상), confidence 는 0 초과 1 미만(기본 0.95)이며 분위수는 선형보간한다. 손실을 양수로 나타낸 소수 8자리 값이고 분포 가정은 없다. 표본이 적으면 꼬리 추정이 불안정하다.

Input Schema

NameRequiredDescriptionDefault
returnsYes
confidenceNo0.95

Output Schema

NameRequiredDescriptionDefault
nYes
varYes
cvarYes
_metaNo서버가 붙이는 영수증(integrity), 엔진, 힌트
traceYes계산 근거(tool, formula, inputs, steps, output)
confidenceYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A4.2/5.0
Behavior5/5

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

Annotations cover the read-only/idempotent safety profile, and the description adds substantive behavior beyond them: linear-interpolation quantiles, the sign convention that losses are reported as positive decimals to 8 places, and an explicit warning that small samples make tail estimates unstable. These details materially change how an agent interprets the result.

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

Conciseness5/5

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

Four compact sentences, front-loaded with what is computed, then parameters, then output convention, then the caveat. No filler, and the order matches how an agent would need the information.

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?

With an output schema present, the description need not explain return values, but it still discloses the sign and precision convention that the schema alone would not convey. Combined with the parameter minimums, default, interpolation method, and stability caveat, nothing essential for a correct call is missing.

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

Parameters4/5

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

Schema description coverage is 0%, so the description carries the full burden, and it does document both parameters: returns as a list of period-return strings requiring at least 2 elements, and confidence as strictly between 0 and 1 with default 0.95. It stops short of specifying the string numeric format (e.g. '0.01' vs '1%'), which is the one real ambiguity left for a string-typed return series.

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

Purpose4/5

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

States a specific computation (VaR and CVaR/expected shortfall) on a specific resource (historical returns via empirical quantiles), and the phrase '분포 가정은 없다' implicitly separates it from finance.var_parametric. However, it never names the parametric sibling or any other finance tool, so the differentiation must be inferred rather than read.

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

Usage Guidelines3/5

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

The methodological framing (empirical quantiles, no distributional assumption) plus the caveat about small samples implies when this tool suits a use case, but there is no explicit 'use this when / not when / use X instead' routing. An agent must infer the choice against finance.var_parametric on its own.

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

Deploy Server

Other Tools