# Strategy Backtest

> Strategy Backtest is a paid API for AI agents from mcp.dropenginehq.com, paid per call via x402, $0.1/call, status unknown (last checked 2026-10-02).

Runs a bounded declarative historical spot trading strategy backtest over a specified date range and market, returning performance metrics.

## Facts

- Endpoint: POST https://mcp.dropenginehq.com/api/backtest-strategy?utm_source=zero.xyz
- Price: $0.1/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/strategy-backtest-b91998ad
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_I5KEIwmksm7rqVPBLNKIN

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability strategy-backtest-b91998ad -d '<json body>'
```

Example prompt: Run a historical backtest of a moving average crossover strategy on BTCUSDT from 2023-01-01 to 2023-12-31 using a 1d timeframe, 10,000 initial capital, 10 bps fees, and 5 bps slippage.

## When to prefer this

Choose this endpoint when you need to evaluate a predefined declarative trading strategy (moving average crossover, RSI mean reversion, momentum, breakout, or buy-and-hold) against historical spot market data with configurable fees and slippage. It is ideal for quick quantitative validation of strategy concepts without writing custom code. Prefer this over generic analytics endpoints when you specifically need backtesting with realistic transaction cost modeling on crypto spot markets.

## Known failure modes

- Invalid date format or out-of-range date returns a validation error
- Market symbol not recognized or unsupported returns an error
- Start date after end date causes a bad request error
- Strategy type not in allowed enum returns a validation error
- fee_bps or slippage_bps outside 0-500 range returns a validation error
- Initial capital below 10 or above 100,000,000 returns a validation error
- Payment failure (x402 protocol) results in 402 response and no backtest executed
- Insufficient historical data for the requested market/timeframe may return partial results

## How this service works

Run a bounded declarative historical spot strategy backtest.

## Output

A JSON object containing backtest results including performance metrics (e.g. total return, Sharpe ratio, drawdown), trade-level data, and metadata about the run such as cache hit status, latency, and timestamp. The 'data' field holds the strategy-specific results.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "end": {
   "type": "string",
   "format": "date",
   "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
  },
  "start": {
   "type": "string",
   "format": "date",
   "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
  },
  "market": {
   "type": "string",
   "pattern": "^[A-Z0-9]{4,20}$"
  },
  "fee_bps": {
   "type": "number",
   "default": 10,
   "maximum": 500,
   "minimum": 0
  },
  "strategy": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "enum": [
      "moving_average_crossover",
      "rsi_mean_reversion",
      "momentum",
      "breakout",
      "buy_and_hold"
     ],
     "type": "string"
    },
    "parameters": {
     "type": "object",
     "default": {},
     "propertyNames": {
      "type": "string"
     },
     "additionalProperties": {
      "type": "number"
     }
    }
   },
   "additionalProperties": false
  },
  "timeframe": {
   "enum": [
    "1h",
    "4h",
    "1d"
   ],
   "type": "string"
  },
  "slippage_bps": {
   "type": "number",
   "default": 5,
   "maximum": 500,
   "minimum": 0
  },
  "initial_capital": {
   "type": "number",
   "maximum": 100000000,
   "minimum": 10
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": {},
  "meta": {
   "cache": {
    "hit": false,
    "age_ms": 0
   },
   "partial": false,
   "sources": [],
   "latency_ms": 1,
   "failed_sources": []
  },
  "tool": "crypto_intelligence_tool",
  "success": true,
  "timestamp": "2026-01-01T00:00:00.000Z"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/strategy-backtest-b91998ad/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from mcp.dropenginehq.com](https://www.zero.xyz/host/mcp.dropenginehq.com/llms.txt)
