QuantWright

com.quantwrightPublished by quantwright.comOfficial publisherv1.0.0Updated Oct 29, 2026

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

VerifiedStreamable HTTPWeb executableFinanceData & Analytics

Overview

AI-generated overview

QuantWright backtests trading rules on its own US stock, ETF, crypto, FX and metals price history, with studies, held-out tests and trade comparison.

What you can do
  • Describe available markets, bar sizes, default costs and coding rules
  • Create studies, optionally with a one-time hold-out period
  • Run backtests of a backtesting.py Strategy class on one symbol and bar size, then fetch results and paged trades
  • Run a single final held-out test on the run you would keep
  • Compare a trader's own trades against a run's rule and see why each was or was not taken
When to use it
Use it when you want an assistant to test, backtest or evaluate a trading rule or strategy without sourcing price data yourself, and to check a trader's real trades against a rule.
Requirements
Remote streamable HTTP endpoint at quantwright.com. Requires a QuantWright API key sent as a bearer token in the Authorization header, created in the account's API keys page. No local runtime or packages needed.
Before you install
The API key is a secret sent in the Authorization header. Runs execute submitted strategy code in the server's sandbox and send your strategy and trade lists to a third party. The held-out test is consumed permanently: only the first per account and market counts, and a hold-out with too few trades still spends it. Daily limits apply (40 runs per symbol, 150 runs and 50 studies per day).

Installation

In SourceWeft

  1. Open QuantWright in the dashboard and add it to a workspace.
  2. Connect Authorization token credentials. They are stored privately and never shown on public pages.
  3. Enable the server for the chats that should use its tools.

Web executable via Streamable HTTP. Remote servers run from the web runtime once configured in a workspace.

Use with an agent

Paste this prompt into Claude Code, Codex, Cursor or another agent — or into SourceWeft chat. The agent reads this server's install guide, shows you its publisher, endpoint and sign-in, and adds it to your client once you agree. Keys never go into a command.

Read https://sourceweft.com/mcp/com.quantwright%2Fagent-api/install.md and connect the MCP server it describes to my client. Before changing any config, show me its publisher, endpoint and sign-in method and wait for my OK. Never put an API key in a command or in a file I would commit; ask me where it should come from.

Read the install guide the agent follows

Other MCP clients

Add this to your client's mcpServers config.

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

Tools

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.

Takes no parameters.

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.

Parametersnamerequiredhold_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.

Parameterscoderequiredcostslabelsymbolrequiredwindowstudy_idrequiredtimeframerequiredaccount_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).

Parametersrun_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`.

Parametersrun_idrequired

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.

Parametersrun_idtradesrequiredversionstudy_idtime_zone

Version history

1
  1. v1.0.0LatestOct 29, 2026

Score

83% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 daysRequired25 pts
  • Auth declaredRequired10 pts
  • Tools listedRequired15 pts
  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts

    Declare a GitHub repository with a README, or serve resource_documentation in the OAuth protected-resource metadata.

  • LicenseNot applicable

    A hosted service is used under its provider's terms, so no license is expected here. This check is left out of the percentage.