Skip to main content
Glama
bitbankinc

bitbank-lab-mcp

Official
by bitbankinc

run_backtest

Execute backtests for crypto trading strategies (SMA cross, RSI, MACD, BB breakout), automatically fetching data and computing profit/loss, win rate, drawdown, and Sharpe ratio with an SVG chart. Specify pair, period, and timeframe.

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. Must be under an allowed root: /mnt/user-data/outputs, the server working directory, or a directory listed in the BACKTEST_OUTPUT_DIR_ALLOWLIST environment variable./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
Behavior4/5

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

With no annotations, the description discloses that it returns a chart and metrics, and that the content text includes equity/drawdown JSON, with chartDetail controlling sampling. It also notes it handles data acquisition and calculation automatically ('unique implementation unnecessary'). However, it doesn't explicitly state it performs a read-only simulation with no real orders, which is a minor gap given the backtest 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 front-loaded with the tool's purpose and uses bullet-like lines for strategy, period, timeframe, and output details. Each sentence provides distinct information (strategy list, period options, timeframe, output metrics, JSON details, chartDetail sampling), with no fluff. The structure makes it easy to scan.

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?

For a tool with 12 parameters and a nested strategy object, the description covers the core options and return details (metrics, chart, JSON). It explains chartDetail's sampling and mentions output format. It doesn't explain all parameters (e.g., fee_bp, outputDir constraints) but the schema covers those, so the description complements the structured data well.

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 baseline is 3. The description reiterates the strategy enums, period options, and timeframe, and adds nuance about chartDetail sampling, but it largely overlaps with the schema's already-detailed parameter descriptions (e.g., precedence of start_date/end_date over period is in both). It adds little beyond what the schema already states.

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 opens by calling it a 'general-purpose backtest' with strategy names, and states it 'executes data acquisition through calculation to chart drawing in one go' – a specific verb and resource. It clearly distinguishes itself from sibling analysis tools by being the only backtesting tool, listing strategies (sma_cross, rsi, etc.) and output metrics (P&L, win rate, max DD, Sharpe).

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?

The description implies when to use this tool by calling it 'general-purpose' and noting 'no need for custom implementation,' but it never explicitly contrasts it with sibling tools or states when not to use it. There are no exclusions or alternative routing. It could be clearer that this is the go-to backtest tool and that other analysis tools are for separate snapshots.

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