Skip to main content
Glama

risk_portfolio

Read-onlyIdempotent

Calculate 22 portfolio risk metrics from return series: Sharpe, Sortino, Calmar, Omega, VaR, CVaR, drawdown, skew, kurtosis, and more. Optionally include benchmark returns for relative measures.

Instructions

22 risk metrics: Sharpe, Sortino, Calmar, Omega, VaR, CVaR, drawdown, skew, kurtosis.

Use when you have a series of portfolio returns and need comprehensive risk analytics. Provide an array of periodic returns (e.g. daily). Returns: 22 metrics including Sharpe, Sortino, Calmar, Omega, VaR (95/99), CVaR, max drawdown, skewness, kurtosis, win rate, profit factor. Optionally provide benchmark returns for alpha, beta, tracking error, and information ratio.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
returnsYesArray of periodic portfolio returns (e.g. daily)
risk_free_rateNoAnnual risk-free rate for Sharpe/Sortino calculation
benchmark_returnsNoOptional benchmark return series for relative metrics
Behavior3/5

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

Annotations already convey readOnlyHint=true and idempotentHint=true, indicating safe computation. The description adds the list of 22 metrics and optional benchmark, but no unexpected behaviors or side effects beyond what annotations suggest.

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?

The description is succinct, with two clear sentences and a compact list of metrics. It front-loads the key output (22 risk metrics) and uses minimal yet informative language.

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

Completeness4/5

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

Given the tool has 3 parameters with high schema coverage, no output schema, and clear annotations, the description adequately explains inputs and outputs. It could be slightly more specific about return format, but overall it's complete.

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 100%, so baseline is 3. The description adds value by explaining that benchmark_returns is optional for relative metrics, which is not fully detailed in the schema. This enhances understanding beyond the schema.

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 explicitly states it computes 22 risk metrics from a portfolio returns series, listing specific metrics like Sharpe, Sortino, VaR. This is specific to the tool and distinguishes it from siblings such as risk_drawdown or risk_correlation.

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

Usage Guidelines4/5

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

The description clearly advises use when you have a series of portfolio returns and need comprehensive risk analytics, and notes when benchmark returns are needed. While it doesn't explicitly exclude other contexts, the guidance is clear given the sibling list.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/QuantOracledev/quantoracle'

If you have feedback or need assistance with the MCP directory API, please join our Discord server