{"uid":"cap_wMp5Gtx3ytBTSbTwjxRhY","slug":"24k-labs-return-risk-metrics-calculator-ae5f0c2d","name":"24K Labs Return & Risk Metrics Calculator","description":"From a value series (or start/end/years): CAGR, total return, annualized volatility, Sharpe ratio (given risk-free) and maximum drawdown.","url":"https://api.24klabs.ai/api/v1/return-cagr-drawdown","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"series":{"type":"array"},"risk_free":{"type":"number"},"periods_per_year":{"type":"number"}}},"responseSchema":{"type":"json","example":{"cagr_pct":94.6,"max_drawdown_pct":-5.56,"total_return_pct":35}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.003","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.003/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_Dqe9sQweynsDaUgJiIVCK","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.003","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Computes CAGR, total return, annualized volatility, Sharpe ratio, and maximum drawdown from a value series or start/end/years inputs","exampleAgentPrompt":"Calculate the CAGR, annualized volatility, Sharpe ratio (using a 4.5% risk-free rate), and maximum drawdown for this series of monthly portfolio values: [100, 108, 115, 104, 120, 135, 128, 142, 155, 149, 162, 170].","exampleUseCases":[{"title":"Portfolio performance review for advisor","prompt":"Here are the quarterly NAV values for my client's portfolio over 3 years: [10000, 10450, 10800, 10300, 11200, 11900, 11400, 12600, 13100, 12700, 13800, 14500]. Can you compute the CAGR, total return, annualized volatility, and max drawdown?"},{"title":"Sharpe ratio check for ETF comparison","prompt":"I want to compare two ETFs on risk-adjusted return. For the first one, here's the monthly price series: [50, 52, 51, 54, 57, 55, 59, 61, 60, 63, 66, 68]. Calculate the Sharpe ratio using a 5% risk-free rate and also give me the CAGR and max drawdown."},{"title":"Quick CAGR from start and end values","prompt":"My investment grew from $25,000 to $41,500 over 6 years — what's the CAGR and total return on that?"}],"resultDescription":"Returns a JSON object containing: CAGR (compound annual growth rate as a percentage), total return (percentage), annualized volatility (standard deviation of returns annualized), Sharpe ratio (excess return per unit of risk given the risk-free rate), and maximum drawdown (largest peak-to-trough decline in the series).","failureModes":["Insufficient data points in series for meaningful volatility or drawdown computation","Missing required inputs (no series provided and no start/end/years combination)","Risk-free rate not provided when Sharpe ratio is requested","Non-numeric values in the series causing parsing errors","Zero or negative start value causing division errors in return calculations","Series with fewer than 2 data points returning an error"],"whenToPreferThis":"Choose this endpoint when you need a comprehensive set of quantitative investment performance and risk metrics — especially CAGR, Sharpe ratio, and maximum drawdown — computed in a single call from a price or value series. Prefer it over building calculations manually or calling separate analytics APIs when you need a fast, cheap ($0.003), self-contained computation that covers both return and risk dimensions simultaneously.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-13T19:02:21.565Z","isFirstParty":false}