Skip to main content
POST
/
quantlib
/
risk
/
var
/
marginal
Calculate Marginal VaR
curl --request POST \
  --url https://finceptbackend.share.zrok.io/quantlib/risk/var/marginal \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "portfolio_returns": [
    0.01,
    -0.018,
    0.012,
    -0.006,
    0.014
  ],
  "new_position_returns": [
    0.015,
    -0.028,
    0.02,
    -0.01,
    0.018
  ],
  "position_weight": 0.2,
  "confidence": 0.95
}
'
{
  "success": true,
  "data": {
    "marginal_var": 102350.5
  }
}

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
portfolio_returns
number[]
required

Historical returns of the existing portfolio

Example:
[0.01, -0.015, 0.008]
new_position_returns
number[]
required

Historical returns of the position being analyzed

Example:
[0.02, -0.025, 0.012]
position_weight
number
required

Current weight of the position in the portfolio

Example:

0.1

confidence
number
default:0.99
Example:

0.99

Response

Successful marginal VaR calculation

success
boolean
Example:

true

data
object