Skip to main content
POST
/
quantlib
/
risk
/
stress
/
scenario
Create Custom Stress Scenario
curl --request POST \
  --url https://finceptbackend.share.zrok.io/quantlib/risk/stress/scenario \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "name": "COVID-19 Pandemic Shock",
  "description": "March 2020 market shock with equity selloff and flight to quality",
  "factor_shocks": {
    "SP500": -0.34,
    "VIX": 3.5,
    "USD_Index": 0.08,
    "Oil_Price": -0.55,
    "IG_Spreads": 0.85,
    "HY_Spreads": 2.1
  }
}
'
{
  "success": true,
  "data": {
    "name": "COVID-19 Pandemic Shock",
    "factor_shocks": {
      "SP500": -0.34,
      "VIX": 3.5,
      "Oil_Price": -0.55
    },
    "severity": 4.82
  }
}

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
name
string
required

Descriptive name for the stress scenario

Example:

"2008 Financial Crisis"

factor_shocks
object
required

Dictionary mapping factor names to percentage shocks (e.g., -0.30 for -30%)

Example:
{
"equities": -0.4,
"credit_spreads": 0.5,
"volatility": 1
}
description
string
default:""

Detailed description of the scenario

Example:

"Severe market downturn with equity crash and credit spread widening"

Response

Stress scenario created successfully

success
boolean
Example:

true

data
object