# market2000.xyz Backtest — Historical Analog Forward-Return Distribution

> market2000.xyz Backtest — Historical Analog Forward-Return Distribution is a paid API for AI agents from market2000.xyz, paid per call via x402, $0.1/call, status unknown (last checked 2026-09-16).

Finds historical price-pattern analogs for a ticker's recent shape and returns the forward-return distribution (win rate, median, tails, sample size) over a specified horizon.

## Facts

- Endpoint: GET https://market2000.xyz/api/backtest
- Price: $0.1/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-16
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/market2000-xyz-backtest-historical-analog-forward-return-distribution-7b04b700
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_i_ULLxndz0SJq6J3PkjR1

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 market2000-xyz-backtest-historical-analog-forward-return-distribution-7b04b700
```

Example prompt: Run a historical analog backtest on BTC using the last 20 days of price action and tell me the win rate, median return, and tail outcomes for the next 30 days.

## When to prefer this

Use this endpoint when you need a data-driven, historically grounded probability distribution for a ticker's near-term returns based on pattern similarity — not a point forecast or a sentiment signal. It is especially useful for quantifying conviction before a trade, sizing a position, or filtering for historically favorable setups. Prefer it over generic forecast APIs when the user wants win rates, tail risks, and sample-size transparency from real historical analogs.

## Known failure modes

- Invalid or unrecognized ticker symbol returns an error or empty analog set
- lookback_days or forward_days outside allowed ranges (5–60 and 7–90 respectively) may return a validation error
- min_return/max_return filters too restrictive may result in a very small or zero sample size
- Insufficient historical data for a recently listed asset yields low or zero sample count
- Payment failure (x402) returns 402 status before any data is returned

## How this service works

Backtest — historical-analog forward-return distribution for a ticker's recent shape.

HOW TO CALL:
  GET /api/backtest?ticker=BTC&lookback_days=20&forward_days=30

PARAMETERS:
  ticker        — asset symbol (required)
  lookback_days — pattern window, 5–60 (default 20)
  forward_days  — forward horizon, 7–90 (default 30)
  min_return / max_return — optional analog filters (fraction)

RESPONSE: win rate, median, tails, sample size over the forward horizon.

PRICING: $0.10 per call.

## Output

Returns a statistical summary of historical forward-return analogs: win rate (fraction of positive outcomes), median return, tail percentiles (e.g. 10th/90th), and the number of matching historical analog periods over the specified forward horizon.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "queryParams"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "ticker"
     ],
     "properties": {
      "ticker": {
       "type": "string",
       "description": "Asset symbol (BTC, xyz:NVDA, AAPL, SPY)"
      },
      "max_return": {
       "type": "number",
       "description": "Optional analog filter, upper bound (fraction)"
      },
      "min_return": {
       "type": "number",
       "description": "Optional analog filter, lower bound (fraction)"
      },
      "forward_days": {
       "type": "integer",
       "default": 30,
       "description": "Forward horizon (7–90)"
      },
      "lookback_days": {
       "type": "integer",
       "default": 20,
       "description": "Pattern window (5–60)"
      }
     }
    }
   }
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/market2000-xyz-backtest-historical-analog-forward-return-distribution-7b04b700/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from market2000.xyz](https://www.zero.xyz/host/market2000.xyz/llms.txt)
