Skip to main content
Glama
bkuri
by bkuri

backtesting_run

Execute a single trading strategy backtest to evaluate performance metrics like total return, Sharpe ratio, and win rate for comparison and analysis.

Instructions

Run a single backtest on a strategy with specified parameters.

Returns metrics: total_return, sharpe_ratio, max_drawdown, win_rate, total_trades, etc.

Use this to:

  • Test a single strategy version

  • Get baseline metrics for comparison

  • As first step before analyze_results, monte_carlo, or risk_report

  • For A/B testing: run backtest twice with different parameters/strategies

Example flow for A/B testing:

  1. backtest(strategy="EMA_original", ...)

  2. backtest(strategy="EMA_with_filter", ...)

  3. analyze_results() on both to compare

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
strategyYes
symbolYes
timeframeYes
start_dateYes
end_dateYes
exchangeNoBinance
starting_balanceNo
feeNo
leverageNo
exchange_typeNofutures
hyperparametersNo
include_tradesNo
include_equity_curveNo
include_logsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior3/5

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

With no annotations provided, the description carries the full burden. It discloses that this returns performance metrics (total_return, sharpe_ratio, etc.) and is for single execution vs batch. However, it omits operational details: computational cost, idempotency, caching behavior, or side effects (e.g., whether results are persisted to storage).

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?

Well-structured with clear sections: purpose, returns, use cases, and example workflow. Front-loaded with the core action. Slightly redundant in listing return metrics since output schema exists, but the example flow adds concrete value without excessive length.

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

Completeness3/5

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

Given 14 undocumented parameters, the description is insufficient for parameter usage despite strong workflow context. However, for an output-schema-backed tool, listing key metrics and providing the A/B testing workflow example provides adequate (though not comprehensive) contextual coverage for the tool's ecosystem role.

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

Parameters2/5

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

Schema has 0% description coverage across 14 parameters, requiring the description to compensate. It fails to do so, only referencing 'specified parameters' generically. While the A/B example shows 'strategy' parameter syntax, no semantic explanation is provided for required params (symbol, timeframe, dates) or optional flags like 'include_trades'.

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?

Opens with specific verb 'Run' and resource 'backtest on a strategy'. The qualifier 'single' effectively distinguishes it from siblings like 'backtest_comprehensive', 'backtest_optimize_parameters', and 'backtest_monte_carlo'. The purpose is immediately clear and scoped.

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?

Excellent 'Use this to:' section with four specific scenarios including A/B testing. Explicitly names successor tools ('analyze_results', 'monte_carlo', 'risk_report') to establish workflow sequence. Provides concrete 3-step example flow. Clear when-to-use vs alternatives.

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/bkuri/jesse-mcp'

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