Skip to main content
POST
/
quantlib
/
risk
/
xva
/
cva
Credit Valuation Adjustment (CVA)
curl --request POST \
  --url https://finceptbackend.share.zrok.io/quantlib/risk/xva/cva \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "exposure_paths": [
    [
      100000,
      120000,
      135000,
      128000,
      140000
    ],
    [
      100000,
      95000,
      110000,
      125000,
      130000
    ],
    [
      100000,
      105000,
      98000,
      115000,
      122000
    ]
  ],
  "counterparty_spread": 300,
  "recovery_rate": 0.35,
  "time_points": [
    0,
    0.25,
    0.5,
    0.75,
    1
  ]
}
'
{
  "success": true,
  "data": {
    "cva": 3250.75,
    "epe_profile": [
      100000,
      106667,
      114333,
      122667,
      130667
    ]
  }
}

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

Simulated exposure paths (each path is array of exposures over time)

Example:
[
[100000, 105000, 98000],
[100000, 102000, 107000]
]
counterparty_spread
number
required

Counterparty credit spread in basis points

Required range: x >= 0
Example:

250

recovery_rate
number
default:0.4

Recovery rate on counterparty default (0 to 1)

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

0.4

own_spread
number | null

Own credit spread in basis points (for DVA calculation)

Example:

150

own_recovery
number
default:0.4

Own recovery rate

Example:

0.4

funding_spread
number | null

Funding spread in basis points (for FVA)

Example:

80

time_points
number[] | null

Time points in years corresponding to exposure paths

Example:
[0, 0.5, 1, 1.5, 2]

Response

CVA calculation results

success
boolean
Example:

true

data
object