Skip to main content
Glama

backtest_portfolio

Read-only

Analyze a portfolio's past performance to calculate total and annualized returns, volatility, maximum drawdown, Sharpe ratio, and per-asset contributions, with currency effects shown for TRY holdings.

Instructions

Verilen portföy (sembol + adet) için geçmiş performans analizi yapar: toplam getiri, yıllıklanmış getiri (CAGR), volatilite, maksimum düşüş (drawdown), Sharpe oranı ve varlık bazlı katkılar. TRY varlıklar portföye girmeden önce USD'ye çevrilir; kur etkisi ayrıca gösterilir. Örn: [{symbol:'THYAO.IS',quantity:100},{symbol:'AAPL',quantity:20}]

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "positions": "<positions>"
    },
    "name": "backtest_portfolio"
  }
}

Input Schema

NameRequiredDescriptionDefault
periodNoAnaliz aralığı1y
intervalNoVeri periyodu (günlük/haftalık)1d
positionsYesPortföy pozisyonları
riskFreeRateNoYıllık risksiz getiri oranı (%, Sharpe için, default 5)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.4.0

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, so the safety profile is covered, and the description adds genuinely new behavior: TRY-denominated assets are converted to USD before entering the portfolio and the FX effect is reported separately. That is important context an agent could not derive from the annotations or schema, though it stops short of stating data-fetch failures, symbol-resolution behavior or latency/caching characteristics of a live-data backtest.

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

Conciseness4/5

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

The output metrics are front-loaded in the first clause, followed by the FX-handling caveat and a compact example — three purposeful elements with no filler. The sentence is long but information-dense and each part earns its place.

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?

With no output schema, the description carries the burden of describing results, and it does so by enumerating the six metrics returned, plus the separate FX-effect output. Remaining gaps — whether dividends are included, what benchmark the Sharpe uses beyond the risk-free rate, and error behavior for invalid symbols — are minor for a read-only analytics tool.

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

Parameters3/5

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

Schema description coverage is 100%, so period, interval, positions and riskFreeRate are already documented, and the description's example array maps directly onto the positions schema whose item descriptions already list THYAO.IS / AAPL / BTC-USD. The description adds implicit linkage between the Sharpe metric and the risk-free rate but supplies no new detail on parameter syntax or defaults, so the baseline 3 applies.

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?

The definition uses a specific verb and resource ('backtest_portfolio' -> historical performance analysis for a given portfolio) and enumerates exactly what is computed: total return, CAGR, volatility, max drawdown, Sharpe ratio and per-asset contributions. It does not explicitly contrast itself with the close sibling 'analyze_portfolio', so an agent must infer the difference, but the word 'backtest' plus the historical framing is reasonably self-distinguishing.

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?

Usage is only implied: it is clear the tool is for evaluating the historical performance of a portfolio of symbol+quantity pairs, and the inline example confirms the expected input shape. There is no explicit when-to-use / when-not-to-use guidance and no mention of alternatives such as 'analyze_portfolio' or 'compare_stocks', so the agent gets context but no routing rules.

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