{"uid":"cap_0uvwTXQhXGz3XTM37w3co","slug":"saylor-innovations-portfolio-risk-metrics-2e340bf5","name":"Saylor Innovations Portfolio Risk Metrics","description":"Risk metrics from a price or return series - annualised return and volatility, Sharpe, Sortino, Calmar, max drawdown, 95 percent VaR, expected shortfall and skew","url":"https://saylorinnovations.com/api/finance/portfolio-risk?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":["prices"],"properties":{"prices":{"type":"string","description":"Comma-separated prices (5-1000 values)"},"periods_per_year":{"type":"string","description":"optional, default 252 (daily); 12 monthly, 52 weekly"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string","const":"json"},"example":{"type":"object","required":["observations","sharpe_ratio","max_drawdown_percent"],"properties":{"note":{"type":"string","description":"Caveat or context for reading the result"},"source":{"type":"string","description":"Data source the values come from"},"skewness":{"type":["number","null"],"description":"Skewness of returns; negative means a longer left tail"},"input_type":{"type":"string","description":"Input type"},"calmar_ratio":{"type":["number","null"],"description":"Calmar ratio"},"observations":{"type":"number","description":"Observations in time order"},"sharpe_ratio":{"type":["number","null"],"description":"Sharpe ratio"},"sortino_ratio":{"type":["number","null"],"description":"Sortino ratio"},"excess_kurtosis":{"type":["number","null"],"description":"Excess kurtosis"},"periods_per_year":{"type":["number","null"],"description":"Periods per year"},"best_period_percent":{"type":["number","null"],"description":"Best period, as a percentage"},"max_drawdown_percent":{"type":"number","description":"Max drawdown, as a percentage"},"total_return_percent":{"type":"number","description":"Total return percent"},"worst_period_percent":{"type":["number","null"],"description":"Worst period, as a percentage"},"max_drawdown_peak_index":{"type":["number","null"],"description":"Max drawdown peak index"},"positive_periods_percent":{"type":["number","null"],"description":"Positive periods, as a percentage"},"value_at_risk_95_percent":{"type":"number","description":"Value at risk 95, as a percentage"},"annualised_return_percent":{"type":"number","description":"Annualised return, as a percentage"},"max_drawdown_trough_index":{"type":["number","null"],"description":"Max drawdown trough index"},"annualised_volatility_percent":{"type":"number","description":"Annualised volatility, as a percentage"},"currently_in_drawdown_percent":{"type":["number","null"],"description":"Currently in drawdown, as a percentage"},"expected_shortfall_95_percent":{"type":"number","description":"Expected shortfall 95, as a percentage"}}}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","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.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_jUq3zyrNDRLhsngg8Q4U3","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Computes annualised return, volatility, Sharpe, Sortino, Calmar, max drawdown, VaR, expected shortfall, and skewness from a price or return series","exampleAgentPrompt":"Can you run full risk metrics — Sharpe, Sortino, Calmar, max drawdown, 95% VaR, and skewness — on this daily price series: 100,102,101,105,103,108,107,110,109,115? Treat it as daily data so use 252 periods per year.","exampleUseCases":[{"title":"Hedge fund monthly performance review","prompt":"Here are 36 monthly NAV prices for our fund: 1000,1012,1008,1025,1019,1041,1038,1055,1049,1072,1065,1090,1083,1101,1095,1118,1110,1135,1128,1150,1143,1168,1160,1185,1177,1200,1192,1218,1210,1235,1228,1252,1244,1270,1262,1289. Can you calculate annualised return, volatility, Sharpe, Sortino, Calmar, max drawdown, VaR, expected shortfall and skewness using 12 periods per year?"},{"title":"Crypto asset risk assessment","prompt":"I have weekly closing prices for a crypto token over the past year: 0.50,0.55,0.48,0.60,0.58,0.72,0.65,0.80,0.75,0.90,0.85,0.95,0.88,1.02,0.97,1.10,1.05,1.20,1.15,1.30,1.25,1.40,1.35,1.50,1.42,1.60,1.55,1.70,1.65,1.80,1.72,1.90,1.85,2.00,1.92,2.10,2.05,2.20,2.12,2.30,2.22,2.40,2.35,2.50,2.42,2.60,2.52,2.70,2.62,2.80,2.72,2.90. Can you give me all the risk metrics including Sharpe, max drawdown and expected shortfall using 52 weekly periods per year?"},{"title":"Comparing two ETF risk profiles","prompt":"I want to assess the risk of an ETF using its last 60 daily prices: 50,50.5,51,50.8,51.5,52,51.8,52.5,53,52.7,53.5,54,53.7,54.5,55,54.8,55.5,56,55.7,56.5,57,56.8,57.5,58,57.7,58.5,59,58.7,59.5,60,59.7,60.5,61,60.7,61.5,62,61.7,62.5,63,62.7,63.5,64,63.7,64.5,65,64.7,65.5,66,65.7,66.5,67,66.7,67.5,68,67.7,68.5,69,68.7,69.5,70. Please calculate the Sharpe ratio, Sortino ratio, Calmar ratio, max drawdown, VaR, and skewness assuming 252 trading days per year."}],"resultDescription":"Returns a JSON object containing: number of observations, total return percent, annualised return and volatility, Sharpe ratio, Sortino ratio, Calmar ratio, max drawdown (percent and peak/trough indices), 95% Value at Risk, expected shortfall, skewness, excess kurtosis, best and worst single period returns, periods per year used, input type, data source, and an optional explanatory note.","failureModes":["Fewer than 5 price values provided — insufficient data for meaningful statistics","Non-numeric or malformed values in the comma-separated price list","All prices identical — zero variance causes division errors in ratio calculations","Too few observations for reliable VaR/ES estimation — results flagged with null fields","Invalid periods_per_year value — unexpected annualisation results"],"whenToPreferThis":"Choose this endpoint when you need a comprehensive suite of standard portfolio risk metrics computed from a raw price or return series in one call, without needing to build your own analytics pipeline. It is ideal for rapid risk profiling of any asset class (equities, crypto, funds) at daily, weekly, or monthly granularity. Prefer it over general-purpose code execution tools when you want reliable, pre-validated financial statistics without writing custom Python or R.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-28T00:32:57.744Z","isFirstParty":false,"canonicalSlug":"saylor-innovations-portfolio-risk-metrics-2e340bf5"}