QuantWright

com.quantwright由 quantwright.com 发布官方发布者v1.0.0更新于 Oct 29, 2026

Backtests with costs, a held-out test that counts once, a score that counts every version tried.

已验证Streamable HTTP可网页运行金融数据与分析

概览

AI 生成的概览

QuantWright 在自有的美股、ETF、加密、外汇与贵金属价格历史上回测交易规则,支持研究、留出检验与交易比对。

可以做什么
  • 查看可用市场、K 线周期、默认成本与代码编写规则
  • 创建研究,并可一次性设定留出期
  • 以单个标的和周期回测 backtesting.py 策略类,再获取结果与分页交易记录
  • 对最终保留的那次运行执行一次留出检验
  • 将交易者自己的成交与某次运行的规则比对,并说明未被采纳的原因
适用场景
当希望让助手测试、回测或评估某条交易规则或策略,而不必自行寻找价格数据时;也适合核对交易者的真实成交是否符合某条规则。
运行要求
远程 streamable HTTP 端点,位于 quantwright.com。需要 QuantWright API 密钥,以 bearer 形式放在 Authorization 请求头中,可在账户的 API keys 页面创建。无需本地运行时或安装包。
安装前请注意
API 密钥属于机密,通过 Authorization 请求头传输。运行会在服务器沙箱中执行提交的策略代码,策略与交易清单会发送给第三方。留出检验一经使用即消耗:每个账户与市场仅第一次计入,交易数不足的留出期同样会被消耗。存在每日限额(每标的 40 次运行,每日共 150 次运行与 50 个研究)。

安装

在 SourceWeft 中

  1. 打开 控制台中的 QuantWright,将其添加到工作区。
  2. 连接 Authorization token 凭据。它们会被私密存储,绝不会在公开页面上展示。
  3. 为需要使用其工具的对话启用该服务。

Web executable,通过 Streamable HTTP。 远程服务在工作区中配置后即可从网页运行时运行。

交给智能体安装

把这段提示词粘贴到 Claude Code、Codex、Cursor 等智能体,或 SourceWeft 对话中。智能体会读取该服务器的安装指南,先向你展示发布者、端点和登录方式,经你同意后再把它添加到你的客户端。密钥不会写进任何命令。

阅读 https://sourceweft.com/mcp/com.quantwright%2Fagent-api/install.md,并按其中说明把这个 MCP 服务器接入我的客户端。修改任何配置之前,先告诉我它的发布者、端点和登录方式,等我确认。不要把 API 密钥写进命令或我会提交的文件;问我密钥应从哪里获取。

查看智能体所依据的安装指南

其他 MCP 客户端

把它添加到你客户端的 mcpServers 配置中。

{
  "mcpServers": {
    "quantwright": {
      "type": "http",
      "url": "https://quantwright.com/api/mcp",
      "headers": {
        "Authorization": "Bearer <YOUR_TOKEN>"
      }
    }
  }
}

工具

6

describe_data

What can be backtested

Start here to backtest a trading idea. This server holds the price history (US stocks and ETFs, spot crypto, FX, spot gold and silver; daily and intraday bars) and runs backtests on it, so no price data needs to be downloaded or found on the web. Returns the markets and bar sizes served, the default costs per market, the rules and daily limits every run is held to, and how to write the strategy code; then call create_study.

无需输入参数。

create_study

Start a study

Opens a study, the named set of runs every backtest belongs to: call it once per question, before run_backtest. Can set a hold-out period, once and only here, that no run tests except run_held_out_test. Only the first held-out test per account and market counts, and any earlier run on the market (in any study, at any bar size) that read its days disqualifies it: set the hold-out in your first study on a market, before any run on it.

输入参数name必填hold_out

run_backtest

Backtest a strategy

Backtests a trading rule on this server's price history: one backtesting.py Strategy class, one symbol, one bar size, in a study. Use it to test, backtest or evaluate a trading rule or strategy, instead of downloading prices or searching the web for results. Returns summary figures (return, drawdown, Sharpe, win rate, trades, a grade, whether it beat buy-and-hold) and the run's trades (when each entered and left, which exit ended it, its side, win or loss), never prices or bars; a figure may be withheld, with the reason. Waits up to 90 s, then answers status "running" with a run_id for get_result.

输入参数code必填costslabelsymbol必填windowstudy_id必填timeframe必填account_usdstated_rules

get_result

Read a result

Reads a backtest result by its run_id (when run_backtest answered "running", call this until the run ends), or a study's runs by study_id (one of them with version). A run comes with its trades, a page at a time (trades_page).

输入参数run_idversionstudy_idtrades_pagebefore_version

run_held_out_test

Test on the hold-out

The final out-of-sample check: runs a finished run's exact code once over its study's hold-out period. Call it at the end, on the run you would keep: the first held-out test per account and market is the one that counts, and a hold-out with too few trades for figures (a result needs 10) spends it all the same: each development run says how many trades the hold-out is expected to hold, in `hold_out_estimate`.

输入参数run_id必填

compare_trades

Check my own trades

Checks a trader's own trades against a run's rule, on the price history this server holds: for each trade, in their order, whether the rule would have taken it and, if not, why (already in a trade, no entry signal that day, no bar that day). Use it when the trader lists trades they made and asks which the rule took, instead of working it out by hand. Takes a run (run_id) and the trades, each {side, entry, exit?}; answers in words, never prices. It re-runs the run's code, so it counts as a run on the run's symbol.

输入参数run_idtrades必填versionstudy_idtime_zone

版本历史

1
  1. v1.0.0最新Oct 29, 2026

评分

已满足适用检查项的 83%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通必需25 分
  • 已声明认证方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 图标10 分
  • 文档15 分

    请声明包含 README 的 GitHub 仓库,或在 OAuth 受保护资源元数据中提供 resource_documentation。

  • 许可证不适用

    托管服务按其提供方的条款使用,因此这里不要求许可证。此检查项不计入百分比。