Skip to main content
POST
/
quantlib
/
portfolio
/
risk
/
incremental-var
Incremental Value at Risk
curl --request POST \
  --url https://finceptbackend.share.zrok.io/quantlib/portfolio/risk/incremental-var \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "weights": [
    0.3,
    0.25,
    0.25,
    0.2
  ],
  "covariance_matrix": [
    [
      0.04,
      0.006,
      0.008,
      0.01
    ],
    [
      0.006,
      0.09,
      0.012,
      0.015
    ],
    [
      0.008,
      0.012,
      0.0625,
      0.018
    ],
    [
      0.01,
      0.015,
      0.018,
      0.16
    ]
  ],
  "new_weight": 0.05,
  "asset_index": 0,
  "confidence": 0.95
}
'
{
  "success": true,
  "data": {
    "incremental_var": 0.0023
  }
}

Authorizations

X-API-Key
string
header
required

API key for authentication. Get your key at https://finceptbackend.share.zrok.io/auth/register

Body

application/json
weights
number[]
required

Current portfolio weights (should sum to 1.0)

Example:
[0.3, 0.25, 0.25, 0.2]
covariance_matrix
number[][]
required

Asset covariance matrix (annualized)

Example:
[
[0.04, 0.006, 0.008, 0.01],
[0.006, 0.09, 0.012, 0.015],
[0.008, 0.012, 0.0625, 0.018],
[0.01, 0.015, 0.018, 0.16]
]
new_weight
number
default:0.05

Additional weight to allocate to the asset (e.g., 0.05 for 5% increase)

Required range: -1 <= x <= 1
Example:

0.05

asset_index
integer
default:0

Index of the asset to add/increase (0-based)

Required range: x >= 0
Example:

0

confidence
number
default:0.95

Confidence level for VaR calculation

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

0.95

Response

Incremental VaR successfully calculated

success
boolean
Example:

true

data
object