# Rafid Trading Strategy Performance Analysis

> Rafid Trading Strategy Performance Analysis is a paid API for AI agents from api.rafidsystem.com, paid per call via x402, $0.35/call, status unknown (last checked 2026-10-10).

Analyzes a set of historical trades to compute comprehensive performance metrics, risk flags, strengths, weaknesses, and data quality signals for a trading strategy.

## Facts

- Endpoint: POST https://api.rafidsystem.com/api/v1/x402/trading/strategy-performance-analysis?utm_source=zero.xyz
- Price: $0.35/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-10
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/rafid-trading-strategy-performance-analysis-84e2c469
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_yHQ8Gs70LvgQBhHqDXoLp

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 rafid-trading-strategy-performance-analysis-84e2c469 -d '<json body>'
```

Example prompt: Analyze the performance of my trading strategy called 'MomentumScalp' using these 50 closed trades from 2024-01-01 to 2024-06-30 — give me the win rate, profit factor, Sharpe ratio, max drawdown, and any risk flags you find.

## When to prefer this

Choose this endpoint when you have a collection of historical trade records and need structured, quantitative performance metrics (Sharpe, drawdown, expectancy, profit factor) plus qualitative risk flags and strengths/weaknesses — particularly within an agentic workflow that needs to programmatically consume trading analytics without building the math internally. It is especially well-suited when trades span multiple symbols, directions, or sessions and you want a unified summary with data quality validation.

## Known failure modes

- Missing required 'symbol' field on any trade object causes validation error
- Invalid date-time format for entry/exit times or period boundaries returns schema error
- Empty trades array returns metrics with zero values and no meaningful analysis
- Fees or margin set to negative values are rejected by minimum constraints
- Leverage at zero or below is rejected by exclusiveMinimum constraint
- Truncated or malformed JSON body returns 400 bad request
- Payment not included or insufficient USDC results in 402 payment required

## How this service works

Rafid Agent API provides structured intelligence and paid APIs for AI agents across property, company and risk, supplier, finance, document, website, automotive, logistics, recruitment, trading, voice, video and business-planning workflows.

## Output

Returns a metrics object with win rate, loss rate, gross profit/loss, net PnL, profit factor, Sharpe ratio, Sortino ratio, maximum and current drawdown, cumulative return, expectancy per trade, largest winner/loser, consecutive win/loss streaks, average holding period, and recovery factor. Also includes arrays of risk flags, strengths, weaknesses, a plain-English performance summary, calculation assumptions, and a data quality report showing complete vs. incomplete trade counts and any warnings.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "period": {
   "type": "object",
   "properties": {
    "to": {
     "anyOf": [
      {
       "type": "string",
       "format": "date-time",
       "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])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
      },
      {
       "type": "number"
      }
     ]
    },
    "from": {
     "anyOf": [
      {
       "type": "string",
       "format": "date-time",
       "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])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
      },
      {
       "type": "number"
      }
     ]
    }
   },
   "additionalProperties": false
  },
  "trades": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "symbol"
    ],
    "properties": {
     "fees": {
      "type": "number",
      "minimum": 0
     },
     "margin": {
      "type": "number",
      "minimum": 0
     },
     "source": {
      "type": "string",
      "maxLength": 80,
      "minLength": 1
     },
     "status": {
      "enum": [
       "open",
       "closed",
       "cancelled",
       "rejected"
      ],
      "type": "string"
     },
     "symbol": {
      "type": "string",
      "maxLength": 100,
      "minLength": 1
     },
     "session": {
      "type": "string",
      "maxLength": 40,
      "minLength": 1
     },
     "tradeId": {
      "type": "string",
      "maxLength": 200,
      "minLength": 1
     },
     "exitTime": {
      "anyOf": [
       {
        "type": "string",
        "format": "date-time",
        "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])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
       },
       {
        "type": "number"
       }
      ]
     },
     "leverage": {
      "type": "number",
      "exclusiveMinimum": 0
     },
     "quantity": {
      "type": "number",
 
… (truncated)
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "metrics": {
   "netPnl": 3,
   "winRate": 0.5,
   "lossRate": 0.5,
   "grossLoss": 5,
   "volatility": null,
   "grossProfit": 10,
   "sharpeRatio": null,
   "totalTrades": 2,
   "largestLoser": -6,
   "losingTrades": 1,
   "profitFactor": 2,
   "sortinoRatio": null,
   "largestWinner": 9,
   "winningTrades": 1,
   "bestTradingDay": null,
   "recoveryFactor": 0.5,
   "breakevenTrades": 0,
   "currentDrawdown": 6,
   "maximumDrawdown": 6,
   "worstTradingDay": null,
   "averageRMultiple": null,
   "cumulativeReturn": 0.003,
   "averageLosingTrade": -6,
   "expectancyPerTrade": 1.5,
   "maxConsecutiveWins": 1,
   "averageWinningTrade": 9,
   "maxConsecutiveLosses": 1,
   "averageHoldingPeriodSeconds": null
  },
  "riskFlags": [],
  "strengths": [],
  "weaknesses": [],
  "dataQuality": {
   "warnings": [],
   "completeTradeCount": 2,
   "incompleteTradeCount": 0
  },
  "performanceSummary": "Historical example.",
  "calculationAssumptions": []
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/rafid-trading-strategy-performance-analysis-84e2c469/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.rafidsystem.com](https://www.zero.xyz/host/api.rafidsystem.com/llms.txt)
