Quant
Portfolio risk metrics (VaR, Sharpe, drawdown) API
Compute risk metrics from a return or price series: Value-at-Risk and CVaR (historical + parametric), volatility, Sharpe/Sortino/Calmar ratios, max drawdown, skew/kurtosis, hit rate. Answers 'value at risk of these returns', 'sharpe ratio', 'max drawdown', 'how risky is this portfolio'.
Price$0.03per request
MethodPOST
Route/v1/quant/risk-metrics
StatusLive
MIME typeapplication/json
Rate limit60/minute
CacheNo cache
quantriskvarcvarsharpedrawdownvolatilityportfolio
API URL
Integration docshttps://x402.hexl.dev/v1/quant/risk-metricsExample request
{
"returns": [
0.01,
-0.02,
0.015,
-0.005,
0.02,
-0.01
],
"confidence": 0.95
}Example response
{
"observations": 6,
"annualizedVolatility": 0.24,
"sharpeRatio": 0.8,
"valueAtRisk": {
"historical": 0.02
},
"maxDrawdown": -0.025
}Input schema
{
"type": "object",
"properties": {
"returns": {
"type": "array",
"items": {
"type": "number"
},
"description": "periodic simple returns"
},
"prices": {
"type": "array",
"items": {
"type": "number"
},
"description": "alternative: a price series"
},
"confidence": {
"type": "number",
"default": 0.95
},
"periodsPerYear": {
"type": "number",
"default": 252
},
"riskFreeRate": {
"type": "number",
"default": 0
}
}
}Output schema
{
"type": "object",
"additionalProperties": true
}