Claude connector

Backtesting research in Claude, one checked step at a time

Claude installs the engine and runs each step. The connector checks every result before handing over the next one.

MCPhttps://mcp.manifoldbt.com/backtest/mcp

Not investment advice: a backtest measures a rule on past data.

5
research workflows, each also a prompt
0
accounts or sign-ins needed: your data stays in Claude
~2 min
from question to verdict on 3 years of hourly bars

How it works

The engine runs in Claude. The method runs in the connector.

start_research → run in Claude → check_step → …
IN CLAUDE'S CODE ENVIRONMENTIN THE CONNECTORRun the step's codemanifoldbt computes on your bars or a synthetic seriespython research.pyAppend the next stepthe file keeps every earlier step, re-run wholestep 1 installs manifoldbtApply the step's gatea written criterion on the numbers sent backcheck_step(workflow, step, result)passnext step's coderetrywhy, and what to fixsettledgo to the verdictRESULT {…}code
The engine runs in Claude's code environment, on your data. The connector only sees the line of numbers each step prints, applies that step's gate, and decides what comes next.

A real run

“Honestly test an EMA 12/48 long/short crossover on an hourly series”, asked in Claude, on the synthetic series.

test_idea · EMA 12/48 long/short · claude.ai
  1. 1passInstall the enginemanifoldbt 0.35.2
  2. 2passFrame the hypothesismechanism, metric, kill criterion
  3. 3passLoad the data26,280 hourly bars · 0 gaps
  4. 4passWrite the rule with costsEMA 12/48 long/short · 5 + 2 bps · delay 1
  5. 5passRun it once679 round trips
  6. 6failError bar on the Sharpe-0.43 ± 1.18 · t = -0.72
  7. 7skippedStress the assumptionsnot needed: step 6 settled it
  8. 8verdictVerdictno edge on this series
Each line is one round trip between Claude and the connector: Claude ran the code, sent the printed numbers, and the connector answered. About two minutes from the first message to the verdict.
step 6 · Sharpe ± 1.96 × standard error
-2-10+1+2zero = no edgeEMA 20/100, long only205 tripscontains zero+0.13EMA 12/48, long/short679 tripscontains zero-0.43
Both intervals contain zero, so the gate fails and the workflow goes straight to the verdict: no edge. On a random walk that is the right answer; on your own bars it is the one worth having before anything is tuned.

Five workflows

Every step ends at a gate checked on the numbers it printed.

Test an idea

test_idea

Is there an edge at all, before any tuning?

  1. Install
  2. Frame
  3. Data
  4. Rule
  5. Run
  6. Error bar
  7. Stress
  8. Verdict

Tune parameters

tune_parameters

Keep the stable region, not the single best cell.

  1. Install
  2. Frame
  3. Data
  4. Rule
  5. Sweep
  6. Region
  7. Noise bar
  8. Verdict

Validate out of sample

validate_out_of_sample

Does the region hold on data it never saw?

  1. Install
  2. Data
  3. Rule
  4. Split
  5. Sweep
  6. Region
  7. Pool OOS
  8. Monte Carlo
  9. Verdict

Size exposure

size_exposure

How much an estimated edge justifies.

  1. Install
  2. Data
  3. Rule
  4. Run
  5. Error bar
  6. Shrink
  7. Drawdowns
  8. Verdict

Diagnose a result

diagnose_result

Too good to be true, or live diverging from backtest.

  1. Install
  2. Data
  3. Rule
  4. Run
  5. Error bar
  6. Stress
  7. By year
  8. Verdict

Not sure which one?

start_research

Describe your question; the connector picks the closest workflow.

start_research(goal="…")

Set it up

step 1
Add the connector

Settings, then Connectors. No sign-in.

step 2
Allow code

Code execution with network access to package managers on.

step 3
Bring bars

CSV or Parquet: timestamp, open, high, low, close. Or none.

step 4
Ask

A question in your words, or a workflow by name.

Try asking
Does an EMA 12/48 long/short crossover have an edge on my hourly BTC bars?Tune my moving-average lengths without overfitting.My backtest shows a Sharpe of 3. What is wrong with it?

Engine on your own machine, in Claude Code? Backtest a trading strategy with Claude Code.

Five read-only tools

They compute nothing, change nothing, and store none of what they are sent.

start_research
Picks the workflow, returns step 1
check_step
Applies the gate, returns what follows
search_docs
Engine reference and research method
explain_error
Cause and fix of an engine error
get_capabilities
Version, tiers, limits in Claude

When something goes wrong

Step 1 cannot install manifoldbt

Claude's code environment needs network access to package managers: on by default on Free, Pro, Max and Ultra (Settings, Capabilities); on Team and Enterprise an owner enables it.

A later step says a name is not defined

Each command in Claude's environment is a new Python process. The connector keeps every step in one file, research.py, re-run whole; ask Claude to do that if it ran a step on its own.

Too few round trips

The run gate needs at least 30 before a statistic means anything: more history, a finer bar, or a rule that trades more.

A sweep is refused with a licence error

Without a licence: 256 sweep or batch combinations per Python process, 1000 Monte Carlo paths, daily equity. The workflows stay within them.

Privacy and support

The connector receives the arguments of its tools and nothing else: no conversation, no file, no account. The engine Claude installs sends Manifold-BT's anonymous daily install report unless it is turned off. Both are in the connector's privacy policy.

Questions, bugs, a workflow that misreads your data: support@manifoldbt.com.