Skip to main content
Glama
stockmcp

Stock Data MCP Server

by stockmcp

A股策略回测

backtest_strategy

Backtest simple stock strategies such as moving average crossover, MACD, and KDJ. Input a stock symbol and strategy type to receive performance metrics like total return, maximum drawdown, and win rate.

Instructions

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

Input Schema

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

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

No annotations are provided, so the description must fully disclose behavior. It mentions output metrics but omits critical details like data frequency, transaction costs, slippage, or performance limits. The description is insufficient for understanding side effects or constraints.

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 a single, concise sentence that front-loads the purpose and key details. No wasted words; every element contributes to understanding.

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 the absence of output schema and annotations, the description covers purpose, supported strategies, and output metrics. However, it lacks completeness on data specifics, assumptions, and output structure, leaving gaps for a backtesting tool.

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?

Input schema covers 100% of parameters with clear descriptions. The tool description adds context for strategy types and default values, but does not significantly enhance parameter meaning beyond schema. Baseline score of 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?

The description clearly states the tool performs backtesting on stocks with specific strategies (MA cross, MACD, KDJ, etc.) and returns key metrics (returns, max drawdown, win rate). It is distinct from sibling tools that focus on data retrieval or analysis.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description lists supported strategies but provides no guidance on when to use this tool versus alternatives, nor does it mention prerequisites, data requirements, or limitations. No explicit when/when-not advice.

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

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