Bourse
ENPL
Menu
Radar
Pricing
Developers / API
Bourse API

Portfolio Stress Testing API: VaR, CVaR and 2008, 2020, 2022 Scenarios in One Call

Send portfolio weights, get value at risk, expected shortfall, Monte Carlo bands, historical crisis scenarios, market and rate shocks and hedge simulations as JSON.

· 1 min read

Risk teams want the numbers without another dashboard. The Bourse stress-test endpoint takes weights and returns a full risk report as JSON.

Key takeaways

Example

`` curl -H "Authorization: Bearer $BOURSE_KEY" \ "https://api.bourse.pl/v1/stress-test?portfolio=NVDA:25,AAPL:25,MSFT:25,TLT:25" ``

In Python:

`` import bourse r = bourse.stress_test({"NVDA": 25, "AAPL": 25, "MSFT": 25, "TLT": 25}) r["risk"]["cvar99_1d"], r["historical_scenarios_df"] ``

Method

Historical simulation on daily adjusted closes with fixed weights and no costs. Monte Carlo uses a stationary block bootstrap that keeps volatility clusters. Results describe how these weights behaved in the past; they are not a forecast. Full parameters are in the API reference.

See these filings as they land

Bourse collects Congress trades, SEC Form 4 insider filings and 13F fund holdings in one live feed, and flags insider buying clusters automatically. Free to start.

Bourse provides financial data and editorial information, parts of which are generated by AI. This page is for general education only. It is not personalised investment advice or a recommendation to buy or sell any financial instrument. Make your own decisions.