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.
Not investment advice: a backtest measures a rule on past data.
How it works
The engine runs in Claude. The method runs in the connector.
A real run
“Honestly test an EMA 12/48 long/short crossover on an hourly series”, asked in Claude, on the synthetic series.
- 1passInstall the enginemanifoldbt 0.35.2
- 2passFrame the hypothesismechanism, metric, kill criterion
- 3passLoad the data26,280 hourly bars · 0 gaps
- 4passWrite the rule with costsEMA 12/48 long/short · 5 + 2 bps · delay 1
- 5passRun it once679 round trips
- 6failError bar on the Sharpe-0.43 ± 1.18 · t = -0.72
- 7skippedStress the assumptionsnot needed: step 6 settled it
- 8verdictVerdictno edge on this series
Five workflows
Every step ends at a gate checked on the numbers it printed.
Test an idea
test_ideaIs there an edge at all, before any tuning?
- Install
- Frame
- Data
- Rule
- Run
- Error bar
- Stress
- Verdict
Tune parameters
tune_parametersKeep the stable region, not the single best cell.
- Install
- Frame
- Data
- Rule
- Sweep
- Region
- Noise bar
- Verdict
Validate out of sample
validate_out_of_sampleDoes the region hold on data it never saw?
- Install
- Data
- Rule
- Split
- Sweep
- Region
- Pool OOS
- Monte Carlo
- Verdict
Size exposure
size_exposureHow much an estimated edge justifies.
- Install
- Data
- Rule
- Run
- Error bar
- Shrink
- Drawdowns
- Verdict
Diagnose a result
diagnose_resultToo good to be true, or live diverging from backtest.
- Install
- Data
- Rule
- Run
- Error bar
- Stress
- By year
- Verdict
Not sure which one?
start_researchDescribe your question; the connector picks the closest workflow.
start_research(goal="…")Set it up
Settings, then Connectors. No sign-in.
Code execution with network access to package managers on.
CSV or Parquet: timestamp, open, high, low, close. Or none.
A question in your words, or a workflow by name.
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.
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.