Skip to main content
POST
/
quantlib
/
portfolio
/
risk
/
portfolio-comprehensive
Comprehensive Portfolio Risk Assessment
curl --request POST \
  --url https://api.fincept.in/quantlib/portfolio/risk/portfolio-comprehensive \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "returns": [
    [
      0.015,
      -0.008,
      0.023,
      0.012,
      -0.005
    ],
    [
      0.012,
      -0.006,
      0.019,
      0.01,
      -0.004
    ],
    [
      0.018,
      -0.009,
      0.021,
      0.014,
      -0.006
    ],
    [
      0.02,
      -0.012,
      0.025,
      0.016,
      -0.008
    ]
  ],
  "weights": [
    0.3,
    0.25,
    0.25,
    0.2
  ],
  "confidence": 0.95,
  "risk_free_rate": 0.0012
}
'
{
  "success": true,
  "data": {
    "volatility": 0.2145,
    "var_95": 0.0345,
    "cvar_95": 0.0482,
    "sharpe_ratio": 0.8234,
    "sortino_ratio": 1.1456,
    "max_drawdown": 0.1834,
    "skewness": -0.2341,
    "kurtosis": 3.4567
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.fincept.in/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

X-API-Key
string
header
required

API key for authentication. Get your key at https://api.fincept.in/auth/register

Body

application/json
returns
number[][]
required

Historical returns matrix (each inner array is the return time series for one asset)

Example:
[
  [0.015, -0.008, 0.023, 0.012, -0.005],
  [0.012, -0.006, 0.019, 0.01, -0.004],
  [0.018, -0.009, 0.021, 0.014, -0.006],
  [0.02, -0.012, 0.025, 0.016, -0.008]
]
weights
number[]
required

Portfolio weights (should sum to 1.0)

Example:
[0.3, 0.25, 0.25, 0.2]
confidence
number
default:0.95

Confidence level for VaR/CVaR calculations

Required range: 0.5 <= x <= 0.999
Example:

0.95

risk_free_rate
number
default:0

Risk-free rate (per period, matching returns frequency)

Example:

0.0012

Response

Comprehensive portfolio risk assessment completed successfully

success
boolean
Example:

true

data
object

Comprehensive risk metrics object containing multiple portfolio statistics

Example:
{
  "volatility": 0.2145,
  "var_95": 0.0345,
  "cvar_95": 0.0482,
  "sharpe_ratio": 0.8234,
  "sortino_ratio": 1.1456,
  "max_drawdown": 0.1834,
  "skewness": -0.2341,
  "kurtosis": 3.4567
}