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。

  • 授權條款不適用

    託管服務按其提供方的條款使用,因此這裡不要求授權條款。此檢查項不計入百分比。