Skip to main content
Glama

backtest_portfolio

Analyze historical performance for a portfolio of symbols and quantities, returning total return, CAGR, volatility, drawdown, Sharpe ratio, asset contributions, and FX impact.

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}]

Input Schema

TableJSON 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.5/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full behavioral burden. It does disclose a genuinely useful trait — TRY assets are converted to USD before entering the portfolio and FX impact is reported separately — but it is silent on read-only nature, permission/auth needs, rate limits, or failure behavior (e.g., unknown symbols).

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?

Two compact sentences plus a well-placed example; the computed-metrics list is front-loaded and the currency-conversion caveat follows logically. No padding or repetition.

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, listing the returned metrics in the description is the right move and largely compensates. The remaining gap is routing against the sibling analyze_portfolio and any statement about error handling or runtime expectations.

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 the schema already documents period, interval, riskFreeRate and the nested symbol/quantity (including the exclusiveMinimum>0 and maxItems=15 constraints). The description adds a concrete positions example, which is mildly helpful, but contributes little beyond the schema. Baseline 3.

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 verb+resource ('Verilen portföy için geçmiş performans analizi yapar') and enumerates the computed outputs (getiri, CAGR, volatilite, max drawdown, Sharpe, varlık katkıları). It clearly describes a historical backtest, but never names or distinguishes itself from the sibling analyze_portfolio, so an agent must infer the split.

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?

Historical performance analysis is implied by the description, so an agent can guess the use case, but there is no explicit when-to-use guidance and no mention of the closely related sibling analyze_portfolio, which is the most likely confusion point. No exclusions or prerequisites are stated.

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