Skip to main content
Glama
bitbankinc

bitbank-lab-mcp

Official
by bitbankinc

run_backtest

Test cryptocurrency trading strategies (SMA cross, RSI, MACD, Bollinger breakout) on historical data with customizable periods and timeframes, returning performance metrics and equity curves.

Instructions

[Backtest / Strategy Test / SMA Cross / RSI / MACD] 汎用バックテスト(backtest / strategy test / simulation / performance)。データ取得〜計算〜チャート描画を一括実行。

戦略: sma_cross / rsi / macd_cross / bb_breakout。 期間: 1M / 3M / 6M / 1Y / 2Y / 3Y、または start_date+end_date (YYYY-MM-DD) で任意レンジ指定可。 時間軸: 1D / 4H / 1H。 SVG チャート付きで損益・勝率・最大DD・Sharpe Ratio 等を返却。 content テキスト末尾に equity_curve / drawdown_curve の JSON を含む (chartDetail=default は最大 200 点の均等サンプル、full は全点)。独自実装不要。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pairNoTrading pair (e.g., btc_jpy)btc_jpy
fee_bpNoOne-way fee in basis points. When omitted, resolved dynamically from the current /spot/pairs taker rate (falls back to nominal 12 bp if unavailable). Explicit values are always respected.
periodNoBacktest period: 1M, 3M, 6M, 1Y, 2Y, or 3Y. Ignored when start_date and end_date are both provided.3M
savePngNoSave chart as PNG file to outputDir (default: false). For inline display in chat UI, leave false and use includeSvg or prepare_chart_data instead.
end_dateNoBacktest end date (ISO 8601: YYYY-MM-DD). Takes precedence over period when both start_date and end_date are provided.
strategyYesStrategy configuration
executionNoExecution timing (fixed: t+1_open)t+1_open
outputDirNoOutput directory for chart files/mnt/user-data/outputs
timeframeNoCandle timeframe: 1D (daily), 4H (4-hour), 1H (hourly)1D
includeSvgNoInclude SVG string in response (default: false, for token saving)
start_dateNoBacktest start date (ISO 8601: YYYY-MM-DD). Takes precedence over period when both start_date and end_date are provided.
chartDetailNoChart detail level: default (equity+DD only) or full (price+indicator+equity+DD+position). Use full ONLY when user explicitly requests price chart or indicator visualization.default
Behavior3/5

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

No annotations are provided, so the description must cover behavioral aspects. It describes the output (SVG chart, equity/drawdown curves) and chartDetail options. It does not explicitly state that the tool is read-only (no side effects) or discuss authentication or rate limits, which would be helpful.

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

Conciseness3/5

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

The description is verbose and contains repetition (strategies listed twice in first paragraph). While the key information is front-loaded, it could be more concise. Every sentence adds value but could be trimmed.

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's complexity (12 parameters, nested strategy object, no output schema), the description is fairly complete. It explains strategies, periods, chartDetail levels, and output format. Missing: an example of the JSON equity curve structure and error handling, but overall adequate.

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%. The description adds meaningful context beyond the schema, such as how fee_bp resolves dynamically, that chartDetail=default samples 200 points, and how start_date/end_date override period. This helps the agent understand parameter behavior.

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 it is a general-purpose backtest tool that fetches data, calculates strategy performance, and draws charts. It lists supported strategies (sma_cross, rsi, etc.), timeframes, and periods, distinguishing it from sibling analysis tools that do not perform backtesting.

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 provides clear guidance on when to use chartDetail=default vs full, and notes that start_date+end_date overrides period. It also mentions that custom implementation is not needed. However, it does not explicitly compare to alternatives; siblings are sufficiently distinct.

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/bitbankinc/bitbank-lab-mcp'

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