{"uid":"cap_hLD5AG7O_6TccfIzujalT","slug":"neuroterminal-portfolio-risk-calculator-0586406a","name":"Neuroterminal Portfolio Risk Calculator","description":"Paid HTTP endpoints for AI agents, settled in USDC on Base via the x402 protocol. No account, no API key — pay per call.","url":"https://api.neuroterminal.xyz/v1/portfolio-risk","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 decimal returns"},"confidence":{"type":"number"},"riskFreeRate":{"type":"number"},"periodsPerYear":{"type":"integer"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"var":-0.02,"cagr":3.352706,"cvar":-0.02,"calmar":167.6353,"sharpe":4.9685,"periods":5,"sortino":6.5339,"winRate":0.6,"maxDrawdown":-0.02}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.02","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.02/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_TPJJ5UuDJyMrcpeU0Mchb","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.02","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Computes portfolio risk metrics (Sharpe, Sortino, VaR, CVaR, CAGR, Calmar, max drawdown, win rate) from a series of periodic returns","exampleAgentPrompt":"Calculate the portfolio risk metrics for these monthly returns: 0.02, -0.01, 0.03, 0.015, -0.005 — use a risk-free rate of 0.04 and 12 periods per year, and give me the Sharpe ratio, Sortino ratio, VaR, CVaR, and max drawdown.","exampleUseCases":[{"title":"Hedge fund strategy risk review","prompt":"I have these quarterly returns for my long-short equity strategy: 0.04, -0.02, 0.06, 0.01, -0.03, 0.05, 0.02, -0.01. Can you compute the full risk profile — Sharpe, Sortino, Calmar, VaR at 95% confidence, max drawdown, and CAGR — using a risk-free rate of 0.05 and 4 periods per year?"},{"title":"Crypto trading bot performance check","prompt":"My trading bot had these daily returns over the past week: 0.01, -0.005, 0.02, -0.015, 0.008, 0.003, -0.01. What's the Sharpe ratio, win rate, and max drawdown if I use 365 periods per year and a 0% risk-free rate?"},{"title":"Retirement portfolio annual risk report","prompt":"Here are the yearly returns for my retirement portfolio over 10 years: 0.08, -0.12, 0.15, 0.07, 0.03, -0.05, 0.11, 0.09, -0.02, 0.13. Give me a full risk breakdown including VaR, CVaR at 95% confidence, Sortino ratio, CAGR, and Calmar ratio with a 4% risk-free rate and 1 period per year."}],"resultDescription":"Returns a JSON object containing: VaR (value at risk), CVaR (conditional VaR), Sharpe ratio, Sortino ratio, Calmar ratio, CAGR (compound annual growth rate), max drawdown, win rate, and number of periods analyzed — all derived from the provided return series.","failureModes":["Missing required 'returns' query parameter returns an error","Malformed or non-numeric return values cause computation failure","Too few data points (e.g. only 1-2 returns) may produce unreliable or undefined ratios","Invalid confidence level outside (0,1) range may error","Payment failure via x402 protocol results in 402 response before computation"],"whenToPreferThis":"Choose this endpoint when you need a comprehensive suite of risk-adjusted performance metrics computed in a single call from raw return data, without managing API keys or subscriptions. It is ideal for agents processing investment strategies, backtests, or portfolio analytics where you need Sharpe, Sortino, Calmar, VaR, CVaR, CAGR, max drawdown, and win rate together. Prefer it over building these calculations locally when you want a reliable, pay-per-use computation with no infrastructure overhead.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T06:35:49.798Z","isFirstParty":false}