{"uid":"cap_O6GWI22rFER_k188mAVYd","slug":"return-tail-statistics-calculator-d3f3fc02","name":"Return Tail Statistics Calculator","description":"Empirical lower-tail statistics of periodic returns you supply (decimals, 20-250 values): lower quantile and mean of observations at or below it. Numbers only, documented convention. Not advice, not a risk limit.","url":"https://heb-utils-x402.hebutils-api.workers.dev/return-tail-stats?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":["returns"],"properties":{"returns":{"type":"string","description":"comma-separated returns as decimals, 20-250 values"},"confidence":{"type":"string","description":"up to 3 levels, 0.5-0.999"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.05","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.05/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.05","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.05","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_ixIRO2pXpa7ijyqrv201g","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.05","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Computes lower-tail quantile and conditional mean (CVaR-style) from a user-supplied series of periodic returns","exampleAgentPrompt":"I have 60 monthly portfolio returns as decimals — can you compute the lower-tail statistics at the 95% confidence level? Here are the values: 0.02, -0.03, 0.01, ... (comma-separated list)","exampleUseCases":[{"title":"Portfolio downside risk assessment","prompt":"I have 120 monthly returns from my equity portfolio as decimals. Can you compute the lower-tail quantile and mean of the worst 5% of observations using a 0.95 confidence level?"},{"title":"Strategy backtesting tail analysis","prompt":"Here are 80 weekly returns from my trading strategy: 0.01, -0.04, 0.02, -0.07 … Can you calculate the lower quantile and average return below the 0.90 confidence level so I can see how bad the tail looks?"},{"title":"Risk comparison across asset series","prompt":"I want to compare the tail risk on two assets — here are 50 daily returns for asset A. Give me the lower quantile and conditional mean below the 0.975 confidence level."}],"resultDescription":"Returns the lower-tail quantile at the specified confidence level and the mean of all observations at or below that quantile, computed empirically from the supplied return series. Output is numeric — no advice or risk limits included.","failureModes":["Fewer than 20 or more than 250 values supplied — request rejected","Non-numeric or malformed comma-separated string causes parse error","Confidence level outside 0.5–0.999 range causes validation failure","Payment not made (x402 payment required before response is returned)","Too few observations below the quantile threshold to compute a stable mean"],"whenToPreferThis":"Choose this endpoint when you need empirical lower-tail statistics (quantile + conditional tail mean) computed directly from a user-supplied return series of 20–250 observations, without needing a full risk platform or advisory service. It is ideal for lightweight, on-demand quantitative risk summaries in agent workflows where pay-per-call USDC micropayments are acceptable and no server-side data storage is needed.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-11T12:43:08.103Z","isFirstParty":false,"canonicalSlug":"return-tail-statistics-calculator-d3f3fc02"}