Portfolio Analytics API logo Portfolio Analytics API
Get started free →

Portfolio risk metrics,
as a simple API.

Send your price series, get back Sharpe, Sortino, Calmar, beta, alpha, max drawdown, information ratio, correlation matrices, diversification scores and rebalancing deltas. You bring the data — we do the math.

Free tier · 1,000 requests/month · no credit card

Why it exists

Recomputing portfolio analytics correctly is fiddly and easy to get wrong. This API does it for you — as a pure, deterministic compute service.

Bring your own data

You send the price series. We never fetch or redistribute third-party market data — so there are no data-license constraints and no PII involved.

11 risk/return metrics

Total & annualized return, volatility, Sharpe, Sortino, Calmar, max drawdown, beta, alpha and information ratio — in one call.

Correlation & diversification

Pearson correlation matrices with insights, plus asset-class / geography / sector diversification scoring and an HHI concentration index.

Deterministic & fast

Pure computation, low latency, no side effects. Same input, same output — every time.

Endpoints

Four POST endpoints. JSON in, JSON out.

POST /v1/metrics

11 risk/return metrics for a portfolio vs a benchmark.

POST /v1/correlation

Pearson correlation matrix for 2–50 instruments, plus significant insights.

POST /v1/diversification

Asset-class / geography / sector spread and HHI concentration — a 0–100 score.

POST /v1/rebalancing

Buy / sell / hold deltas versus a target allocation, with position-level notes.

Example — Sharpe, beta & drawdown in one call

curl -X POST \
  https://portfolio-analytics.p.rapidapi.com/v1/metrics \
  -H "Content-Type: application/json" \
  -H "X-RapidAPI-Host: portfolio-analytics.p.rapidapi.com" \
  -H "X-RapidAPI-Key: YOUR_RAPIDAPI_KEY" \
  -d '{
    "history":   [{"date":"2024-01-01","close":100},{"date":"2024-01-02","close":101},{"date":"2024-01-03","close":103}],
    "benchmark": [{"date":"2024-01-01","close":100},{"date":"2024-01-02","close":100.5},{"date":"2024-01-03","close":101}]
  }'

What you get back

Every metric a portfolio dashboard needs — computed for you.

Total returnAnnualized returnVolatility Sharpe ratioSortino ratioCalmar ratio Max drawdownBetaAlpha Information ratioPearson correlationDiversification (HHI) Rebalancing deltas

Pricing

Start free. Usage-based paid tiers come later.

Free

$0/ month

1,000 requests / month · all endpoints · no credit card.

Subscribe on RapidAPI