Skip to main content
Glama
openstockdata

stock-data-mcp

A股策略回测

backtest_strategy

Backtest trading strategies on stocks using indicators like moving average crossover, MACD, and KDJ. Returns performance metrics including return, max drawdown, and win rate.

Instructions

对股票进行简单策略回测,支持均线交叉、MACD、KDJ等策略,返回收益率、最大回撤、胜率等指标。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
symbolYes股票代码(纯数字或字母组合,如600519、AAPL、HK00700)
ma_longNo长期均线周期(ma_cross策略)
end_dateNo结束日期,格式: 20241231,默认今天
ma_shortNo短期均线周期(ma_cross策略)
strategyNo策略类型: 'ma_cross'(均线交叉), 'macd'(MACD金叉死叉), 'kdj'(KDJ超买超卖), 'rsi'(RSI超买超卖), 'boll'(布林带突破)ma_cross
start_dateNo开始日期,格式: 20240101,默认一年前
initial_capitalNo初始资金(元)
Behavior2/5

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

No annotations are provided, so the description carries the burden. It does not mention whether the tool is read-only, any side effects, data sources, or limitations. The only behavioral hint is that it returns metrics, but mutation or permission requirements are undisclosed.

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?

A single sentence efficiently conveys the tool's purpose, supported strategies, and output metrics. It is concise with no wasted words, though it could be structured into separate sentences for clarity.

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?

No output schema is provided, and the description only vaguely lists return metrics. With 7 parameters and multiple strategies, more detail on strategy behavior, output format, or data constraints would improve completeness.

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 coverage is 100%, so the schema already documents all parameters. The description does not add meaning beyond listing strategies and outputs; it does not elaborate on parameter usage, valid ranges, or parameter interactions. Baseline 3 is appropriate.

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?

Description clearly states it performs simple strategy backtesting for stocks, lists supported strategies (均线交叉, MACD, KDJ, etc.), and mentions key output metrics (收益率, 最大回撤, 胜率). This distinguishes it from sibling tools, which are about data retrieval or analysis, not backtesting.

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?

No explicit guidance on when to use vs. alternatives or when not to use. Usage is implied for backtesting strategies, but no exclusions or context are provided.

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/openstockdata/stock-data-mcp'

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