{"uid":"cap_REn-JWlaq0sSf98mCt2uz","slug":"24k-labs-return-risk-metrics-calculator-bc3fa2f5","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/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_mBgRvwrtqjMxPjEWBC9Dv","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, and maximum drawdown for this price series [100, 112, 108, 125, 140, 132, 155] using a risk-free rate of 2%.","exampleUseCases":[{"title":"Portfolio performance review","prompt":"I have monthly NAV values for my portfolio over the last 3 years: [100, 103, 99, 107, 115, 111, 120, 118, 130, 125, 138, 142, 135, 148, 155, 152, 160, 165, 158, 170, 168, 175, 180, 178, 185, 190, 188, 195, 200, 205, 210, 208, 215, 220, 225, 230]. Can you compute the CAGR, total return, Sharpe ratio with a 4% risk-free rate, and max drawdown?"},{"title":"Comparing two fund metrics","prompt":"I'm evaluating a fund that started at $50,000 and is now worth $87,000 after 5 years. What are the CAGR and total return? Also use a 3% risk-free rate for the Sharpe ratio."},{"title":"Volatility and drawdown for risk assessment","prompt":"Here are 12 monthly values for an ETF I'm analyzing: [200, 195, 210, 220, 215, 230, 225, 240, 235, 245, 250, 248]. Give me the annualized volatility, max drawdown, and Sharpe ratio assuming a 1.5% risk-free rate."}],"resultDescription":"Returns a structured JSON object containing: CAGR (compound annual growth rate as a percentage), total return (absolute percentage gain/loss), annualized volatility (standard deviation of returns scaled to annual), Sharpe ratio (risk-adjusted return given the supplied risk-free rate), and maximum drawdown (largest peak-to-trough decline in the series).","failureModes":["Insufficient data points in the value series for meaningful volatility calculation","Missing required inputs (no series and no start/end/years combination provided)","Risk-free rate not provided when Sharpe ratio is requested","Non-numeric or malformed values in the series causing computation errors","Zero or negative values causing logarithmic return calculation failures","Years value of zero causing division-by-zero in CAGR computation"],"whenToPreferThis":"Choose this endpoint when you need a complete set of standard investment return and risk metrics in a single call — especially CAGR, Sharpe ratio, and maximum drawdown together. It is ideal for portfolio analytics pipelines, fund evaluation workflows, or any agent task where the user wants a rigorous quantitative summary of an asset's historical performance. It accepts either a raw value series or simple start/end/years inputs, making it flexible for both detailed and summarized data sources.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-13T19:02:16.548Z","isFirstParty":false}