{"uid":"cap_EyVXVRETPUxt8GtnYlNHv","slug":"profit-factor-calculator-4ed5ce2d","name":"Profit Factor Calculator","description":"Profit factor = gross wins / gross losses. Call when quality filters on strategy tapes before promotion. Returns profit factor as deterministic JSON for $0.001 USDC via x402 on Base. First-party local math only—no RPC, live market feed, API keys, storage, or mediagen. Advisory only; the caller owns capital, risk, and production controls.","url":"https://api.delx.ai/api/v1/x402/profit-factor","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"pnls":{"type":"array","description":"Input field: pnls."}}},"responseSchema":{"type":"json","example":{"schema":"delx/util-profit-factor/v1","infinite":false,"gross_win":20,"gross_loss":7,"profit_factor":2.857142857142857}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","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.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_8a8TtgfHe11iyps-Ufafj","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Computes profit factor (gross wins divided by gross losses) from a list of PnL values using local deterministic math.","exampleAgentPrompt":"Can you calculate the profit factor for my strategy tape? Here are the PnL values: [120, -45, 85, -30, 200, -60, 95, -20].","exampleUseCases":[{"title":"Strategy promotion quality gate","prompt":"Before I promote this algo to live trading, calculate the profit factor from these PnL readings: [310, -95, 420, -110, 185, -70, 260, -88]. I want to make sure it clears a minimum threshold."},{"title":"Comparing two strategy tapes","prompt":"I have two strategy tapes I want to evaluate. First one has PnLs [100, -40, 80, -25, 150, -55] and the second has [200, -180, 90, -85, 110, -100]. Can you get the profit factor for each so I can compare them?"},{"title":"Backtested trade series review","prompt":"I just finished a backtest and here are all my trade PnLs: [50, -20, 75, -15, 30, -40, 90, -10, 60, -35]. What's the profit factor on this series?"}],"resultDescription":"Returns a deterministic JSON object containing the computed profit factor (gross wins divided by gross losses), calculated purely from the supplied PnL array using local math — no external data sources involved.","failureModes":["Empty or missing pnls array — cannot compute ratio with no data","All losses and no wins (gross wins = 0) — profit factor is undefined or zero, may return null or error","All wins and no losses (gross losses = 0) — profit factor is infinite, may return null or special value","Malformed input (non-numeric values in array) — validation error returned","Payment failure via x402 — request rejected before computation"],"whenToPreferThis":"Use this endpoint when you need a fast, cheap, deterministic profit factor calculation from a list of PnL values with no API keys, no external market data, and no side effects — ideal as a quality gate before promoting a strategy to production. Prefer this over general-purpose computation when you want a single-purpose, auditable ratio with a known $0.001 cost per call.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T01:19:15.842Z","isFirstParty":false}