# Trading Strategy Backtest Comparator

> Trading Strategy Backtest Comparator is a paid API for AI agents from strategysignals.duckdns.org, paid per call via x402, $0.2/call, status unknown (last checked 2026-09-14).

Runs and compares two parameterized SMA/trailing-stop trading strategies head-to-head on BTC, ETH, or SOL, returning full performance metrics and equity curves for both.

## Facts

- Endpoint: POST https://strategysignals.duckdns.org/tools/strategy-backtest/compare
- Price: $0.2/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/trading-strategy-backtest-comparator-2b988ece
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_ruX3Z9sTp4_Zf-K5Pq9T6

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 trading-strategy-backtest-comparator-2b988ece -d '<json body>'
```

Example prompt: Compare two ETH trading strategies for me: strategy A uses a 150-day SMA, 14-day cooldown, and 20% trailing stop, and strategy B uses a 100-day SMA, 7-day cooldown, and 15% trailing stop — both starting with $1,000 from January 2021 to July 2026. Which one wins?

## When to prefer this

Choose this endpoint when you need to directly compare two parameterized systematic trading strategies (SMA + trailing stop + cooldown) against each other on BTC, ETH, or SOL with full performance metrics and equity curves. Prefer this over single-backtest endpoints when the goal is parameter optimization or A/B testing of strategy configurations. Best for quantitative research, strategy validation, or choosing between two trading setups with transparent, verifiable methodology.

## Known failure modes

- Missing required fields (asset, strategy a/b params) returns validation error
- Unsupported asset symbol (only BTC, ETH, SOL accepted)
- Invalid or out-of-range date strings cause parsing errors
- Insufficient historical data for the requested date range may truncate results
- Network/server unavailability on duckdns.org dynamic DNS host
- Payment failure via x402 prevents execution

## How this service works

Does a 150-day or 200-day SMA actually perform better on this asset? Test two parameter sets head-to-head against the same asset and date range in one call, with both real results and a declared winner -- cheaper than paying for two separate backtests and comparing them yourself.

## Output

Returns a JSON object with full results for both strategy A and B including: asset traded, parameter config, performance metrics (win rate, final equity, Sharpe ratio, total trades, max drawdown %, total return %), the actual data period covered, a timestamped equity curve, and a 'winner' field indicating which strategy outperformed.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "a": {
   "type": "object",
   "properties": {
    "cooldown_days": {
     "type": "integer"
    },
    "sma_period_days": {
     "type": "integer"
    },
    "trailing_stop_pct": {
     "type": "number"
    }
   }
  },
  "b": {
   "type": "object",
   "properties": {
    "cooldown_days": {
     "type": "integer"
    },
    "sma_period_days": {
     "type": "integer"
    },
    "trailing_stop_pct": {
     "type": "number"
    }
   }
  },
  "end": {
   "type": "string",
   "description": "optional ISO date"
  },
  "asset": {
   "enum": [
    "BTC",
    "ETH",
    "SOL",
    "XRP",
    "ADA"
   ],
   "type": "string"
  },
  "start": {
   "type": "string",
   "description": "optional ISO date"
  },
  "starting_capital": {
   "type": "number"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "a": {
   "asset": "ETH",
   "params": {
    "cooldown_days": 14,
    "sma_period_days": 150,
    "starting_capital": 1000,
    "trailing_stop_pct": 0.2
   },
   "metrics": {
    "win_rate": 0.643,
    "final_equity": 2842,
    "sharpe_ratio": 0.91,
    "total_trades": 14,
    "max_drawdown_pct": 0.384,
    "starting_capital": 1000,
    "total_return_pct": 1.842
   },
   "data_period": {
    "years": 5.5,
    "actual_end": "2026-07-01",
    "actual_start": "2021-01-01",
    "requested_end": "2026-07-01",
    "requested_start": "2021-01-01"
   },
   "equity_curve": [
    {
     "equity": 1000,
     "timestamp": "2021-01-01T00:00:00+00:00"
    }
   ]
  },
  "b": {
   "asset": "ETH",
   "params": {
    "cooldown_days": 14,
    "sma_period_days": 150,
    "starting_capital": 1000,
    "trailing_stop_pct": 0.2
   },
   "metrics": {
    "win_rate": 0.643,
    "final_equity": 2842,
    "sharpe_ratio": 0.91,
    "total_trades": 14,
    "max_drawdown_pct": 0.384,
    "starting_capital": 1000,
    "total_return_pct": 1.842
   },
   "data_period": {
    "years": 5.5,
    "actual_end": "2026-07-01",
    "actual_start": "2021-01-01",
    "requested_end": "2026-07-01",
    "requested_start": "2021-01-01"
   },
   "equity_curve": [
    {
     "equity": 1000,
     "timestamp": "2021-01-01T00:00:00+00:00"
    }
   ]
  },
  "asset": "ETH",
  "winner": "b"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/trading-strategy-backtest-comparator-2b988ece/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from strategysignals.duckdns.org](https://www.zero.xyz/host/strategysignals.duckdns.org/llms.txt)
