Dev.to AI 🤖 Ai 👁 0 📖 1 min read

Let Claude backtest your trading rule in plain words

Most backtesters want code. This one wants a sentence. I gave Claude this rule: buy SPY when its 50 day average crosses above its 200 day average, sell when it crosses back below. Claude ran it through the Backtester MCP

Most backtesters want code. This one wants a sentence. I gave Claude this rule: buy SPY when its 50 day average crosses above its 200 day average, sell when it crosses back below.
Claude ran it through the Backtester MCP server and came back with every trade, the reasons, and the equity curve next to SPY.
Result, 2015-01-02 to 2024-12-31: 5 trades, plus 110.4 percent. Buying and holding SPY over the same dates: plus 185.3 percent. Largest drop from a past high: 34.1 percent.
So the golden cross worked, in the sense that it made money, and it still lost badly to doing nothing. That is the point of showing SPY on every result. A rule only counts as working if it beats holding SPY over the long term.
Try it yourself, free, no signup to try the web version:

  1. Add the MCP server to Claude Code: claude mcp add --transport http backtester https://backtester.daenadigital.com/mcp
  2. Or in Claude or ChatGPT, add a custom connector with the server address https://backtester.daenadigital.com/mcp
  3. Ask: backtest buying SPY when its 50 day average crosses above its 200 day average, and selling on the cross below, 2015 to 2024. You can also try it in the browser first at https://backtester.daenadigital.com/strategies/golden-cross/ and change the rule in the chat there. Past results do not predict future returns. This is a test, not advice.
📰 Read the original article on Dev.to AI

Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.