{"uid":"cap_yHQ8Gs70LvgQBhHqDXoLp","slug":"rafid-trading-strategy-performance-analysis-84e2c469","name":"Rafid Trading Strategy Performance Analysis","description":"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.","url":"https://api.rafidsystem.com/api/v1/x402/trading/strategy-performance-analysis?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"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","exclusiveMinimum":0},"stopLoss":{"type":"number","exclusiveMinimum":0},"strategy":{"type":"string","maxLength":100,"minLength":1},"direction":{"enum":["long","short"],"type":"string"},"entryTime":{"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"}]},"exitPrice":{"type":"number","exclusiveMinimum":0},"rMultiple":{"type":"number"},"timeframe":{"type":"string","maxLength":30,"minLength":1},"assetClass":{"type":"string","maxLength":100,"minLength":1},"confidence":{"type":"number","maximum":100,"minimum":0},"entryPrice":{"type":"number","exclusiveMinimum":0},"exitReason":{"type":"string","maxLength":80,"minLength":1},"takeProfit":{"type":"number","exclusiveMinimum":0},"realizedPnl":{"type":"number"},"takeProfits":{"type":"array","items":{"type":"number","exclusiveMinimum":0},"maxItems":20},"marketRegime":{"type":"string","maxLength":40,"minLength":1},"executionStatus":{"type":"string","maxLength":40,"minLength":1},"maxAdverseExcursion":{"type":"number"},"maxFavorableExcursion":{"type":"number"}},"additionalProperties":false},"maxItems":100000},"riskPerTrade":{"type":"number","exclusiveMinimum":0},"accountEquity":{"type":"number","minimum":0},"initialEquity":{"type":"number","minimum":0}}},"responseSchema":{"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":[]}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.35","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.35/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.35","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.35","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_TISmP0etmn2fDkoB0hJ_0","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.35","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Analyzes a set of historical trades to compute comprehensive performance metrics, risk flags, strengths, weaknesses, and data quality signals for a trading strategy.","exampleAgentPrompt":"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.","exampleUseCases":[{"title":"Post-quarter strategy review","prompt":"I just finished Q1 trading. Here are all my closed EUR/USD trades from January 1 to March 31 2024 — run a full performance analysis and tell me my win rate, net PnL, max drawdown, and whether there are any risk flags I should worry about."},{"title":"Comparing long vs short trade legs","prompt":"I want to understand how my long and short positions performed differently over the past six months. Here's my full trade list with entries, exits, quantities, and fees — calculate expectancy per trade, profit factor, and largest winners and losers for each direction."},{"title":"Strategy health check before live deployment","prompt":"Before I go live with my 'BreakoutV2' strategy, can you analyze these 30 paper trades from the last 90 days, including leverage and stop-loss levels, and highlight any weaknesses or data quality issues I should fix?"}],"resultDescription":"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.","failureModes":["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"],"whenToPreferThis":"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.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-10T18:41:28.838Z","isFirstParty":false,"canonicalSlug":"rafid-trading-strategy-performance-analysis-84e2c469"}