Skip to main content
Glama

backtest_strategy

Read-onlyIdempotent

Backtest trading strategies on historical price data — SMA crossover, RSI mean reversion, momentum, or Bollinger breakout. Get return, Sharpe, Calmar, drawdown, win rate, equity curve, and buy-and-hold comparison.

Instructions

Deterministic backtest of SMA crossover, RSI mean reversion, momentum, or Bollinger breakout. Replaces 10+ individual calls.

Use when backtesting a trading strategy on price history. Strategies: sma_crossover (params: fast, slow), rsi_mean_reversion (params: period, oversold, overbought), momentum (params: lookback), bollinger_breakout (params: period, std). Provide prices, strategy name, params, initial_capital, commission_bps. Returns: total return, Sharpe, Calmar, max drawdown, number of trades, win rate, equity curve, vs buy-and-hold. PAID ONLY — no free tier.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsNoStrategy params. SMA: {fast,slow}. RSI: {period,oversold,overbought}. Momentum: {lookback}. Bollinger: {period,std}.
pricesYesPrice history (daily closes, oldest first)
strategyNosma_crossover | rsi_mean_reversion | momentum | bollinger_breakoutsma_crossover
slippage_bpsNoOne-way slippage in basis points
commission_bpsNoRound-trip commission in basis points
initial_capitalNoStarting capital
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false. The description adds 'Deterministic' (consistent with idempotency) and enumerates return fields (total return, Sharpe, etc.). Also mentions 'PAID ONLY' as a behavioral constraint. No contradictions; adds useful context.

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 concise at 4 sentences, front-loaded with purpose, then strategies, usage, and returns. Every sentence adds value with no redundancy. It efficiently packs all essential 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?

Given the complexity (6 params, 1 nested, no output schema), the description fully covers the tool: explains strategies, parameter shapes, and return fields including equity curve and vs buy-and-hold. Also notes it's paid. No gaps for agent to select and invoke correctly.

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% (all 6 parameters described). The description reinforces the params object structure per strategy, but the schema already includes example structures. Since schema covers the parameter meanings, the description adds minimal new semantics beyond usage context.

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 clearly states the tool performs deterministic backtests of four specific strategies (SMA crossover, RSI mean reversion, momentum, Bollinger breakout). It distinguishes itself by noting it replaces 10+ individual calls, making the purpose precise even among many financial siblings.

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 says 'Use when backtesting a trading strategy on price history' and lists the supported strategies, providing clear context. It lacks explicit exclusions or alternatives, but the paid restriction is noted. Given rich sibling list, some guidance on when not to use would improve, but it's still clear.

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