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.
Risk Management Examples
Calculate VaR, run stress tests, compute CVA.
Parametric VaR
import requests
returns = [-0.02, 0.01, -0.015, 0.03, -0.01, 0.02, -0.005, 0.015]
response = requests.post(
"https://api.fincept.in/quantlib/risk/var-parametric",
headers={"X-API-Key": API_KEY},
json={
"returns": returns,
"confidence_level": 0.95,
"method": "normal"
}
)
var_95 = response.json()['data']['var']
print(f"95% VaR: {var_95}")
Cost: 5 credits
Stress Testing
response = requests.post(
"https://api.fincept.in/quantlib/risk/stress-test",
headers={"X-API-Key": API_KEY},
json={
"portfolio_value": 1000000,
"positions": [...],
"scenarios": [
{"name": "2008_crisis", "shocks": {...}},
{"name": "covid_2020", "shocks": {...}}
]
}
)
Cost: 5 credits
More examples →