Skip to main content
Glama

EasyQuant Research

择时回测(单个标的买卖规则)

backtest_timing

对单个 A 股股票、场内基金(ETF / LOF)、美股、港股或期货品种(主力连续,可做空)按入场、出场规则回测(日线),可加止盈止损,同时给出同区间买入持有的对比。规则用 EasyQuant DSL 写:indicators 定义指标,entry / exit 是规则树(类型与参数见 catalog)。回答用户时只能引用返回的数字;不对任何个股给买卖建议。

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "code": "<code>",
      "indicators": "<indicators>"
    },
    "name": "backtest_timing"
  }
}

Input Schema

NameRequiredDescriptionDefault
endNo回测结束日 YYYY-MM-DD,默认最近一个交易日
codeYes标的代码:A 股 / ETF 带交易所后缀,例如 600519.SH、510300.SH;期货写品种代码(按主力连续),例如 RB、IF、AU;美股、港股要同时传 market,code 写 AAPL、00700.HK
exitNo出场规则树,写法同 entry
entryNo入场规则树,例如 {"type": "CROSS_UP", "left": {"ind": "fast"}, "right": {"ind": "slow"}}
exitsNo止盈止损(可选)
startNo回测起始日 YYYY-MM-DD,默认 3 年前;最长 5 年
marketNo只在美股、港股时填(us_equity / hk_stock);A 股、ETF、期货按代码自动识别
indicatorsYes指标定义:名字 → {type, 参数...},例如 {"fast": {"type": "SMA", "period": 20}}
short_exitNo平空规则树(仅期货),写法同 entry
short_entryNo开空规则树(仅期货),写法同 entry;与 entry 同时写即多空双向
capital_budget_pctNo仅期货:资金预算 %,默认 100(合约名义价值约等于资金,不加杠杆);最多 300 即 3 倍杠杆

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: daily-bar frequency, max 5-year window, default start (3 years ago) and end (latest trading day), futures shorting, up to 3x leverage via capital_budget_pct, and a buy-and-hold comparison in the output. It omits runtime/synchronicity behavior — notably nothing says whether this runs synchronously or returns a job for the `get_job` sibling to poll.

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?

Purpose and asset scope are front-loaded, followed by the DSL requirement and then the answering-policy constraint — a logical order with little fat. The closing policy sentence is somewhat orthogonal to tool selection but is legitimately part of how the agent must use results.

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 an 11-parameter tool with nested rule trees and no output schema, the definition covers asset handling, defaults, leverage, shorting and the comparative benchmark, which is most of what an agent needs. The remaining gap is operational: no indication of execution latency or whether results arrive directly or through the job-status sibling.

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 coverage is 100%, so the baseline is 3; the description adds value by explaining the DSL model (indicators define named indicators, entry/exit are rule trees) and by pointing to catalog for the rule-type vocabulary the schema does not enumerate. This goes modestly beyond restating the fields.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description gives a specific verb (回测) and resource (单个标的的入场/出场规则), and enumerates the covered asset classes (A 股、ETF/LOF、美股、港股、期货主力连续). The emphasis on 单个标的 implicitly separates it from the portfolio-backtest sibling, though it never names that alternative explicitly.

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?

It states the required rule format (EasyQuant DSL with indicators/entry/exit rule trees) and routes the agent to the `catalog` sibling for valid rule types and parameters, which is genuine routing guidance. It does not say when to prefer this over backtest_portfolio or when a backtest is inappropriate, so it stops short of explicit exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.