{"uid":"cap_-oXcLjoXphjBZ46MUGsox","slug":"trade-expectancy-calculator-9532c831","name":"Trade Expectancy Calculator","description":"Expectancy per trade from win rate, avg win, and avg loss. Call when deciding if a system has positive edge before scaling size. Returns expectancy per trade 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/expectancy","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"pnls":{"type":"array","description":"Input field: pnls."}}},"responseSchema":{"type":"json","example":{"n":5,"schema":"delx/util-expectancy/v1","expectancy":2.6}},"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_5zMluwO3ugHJ8tQWDj9lW","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":"Calculates expected profit or loss per trade given a list of PnL values, helping traders assess whether a system has a positive edge before scaling position size.","exampleAgentPrompt":"Can you calculate the trade expectancy for my system using these PnL values: [120, -45, 200, -60, 85, -30, 175, -90]? I want to know if I have a positive edge before I start trading bigger size.","exampleUseCases":[{"title":"Pre-scaling edge validation","prompt":"I have these trade PnLs from my last 20 trades: [200, -80, 150, -60, 300, -100, 180, -70, 250, -90, 140, -55, 220, -75, 190, -65, 310, -110, 160, -50] — can you compute my expectancy per trade so I can decide if it's safe to double my position size?"},{"title":"Strategy backtest evaluation","prompt":"I just backtested a new mean-reversion strategy and got these trade results: [50, -30, 70, -25, 45, -35, 60, -20, 80, -40]. What's the expectancy per trade? I need to know if this strategy has a real edge or if it's just noise."},{"title":"Comparing two trading systems","prompt":"I'm running two systems and want to compare their edges. System A PnLs: [100, -50, 120, -40, 90, -60] and System B PnLs: [30, -10, 25, -15, 40, -12, 35, -8]. Can you calculate the expectancy for each so I know which one to allocate more capital to?"}],"resultDescription":"Returns a deterministic JSON object containing expectancy per trade computed from the provided PnL array, including derived metrics such as win rate, average win, and average loss. No external data sources are used — all math is performed locally.","failureModes":["Empty or missing PnL array returns an error or zero expectancy","Non-numeric values in the PnL array may cause computation failure","Single-element arrays may yield degenerate or misleading expectancy values","All wins or all losses produces valid but extreme expectancy with no loss or win average respectively"],"whenToPreferThis":"Use this endpoint when you need a fast, deterministic, no-dependency calculation of trade expectancy from raw PnL data. Prefer this over general-purpose calculators when you want a pay-per-use model at $0.001 USDC with no API key setup, and when you need advisory-only output that is reproducible and auditable. Best suited for pre-scaling checks, backtest evaluation, and comparing multiple strategies by edge.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T00:42:57.477Z","isFirstParty":false}