GEX
Public feedInitializing terminal
Stress test scenarios
Runs stress tests on a portfolio under various market scenarios. Simulates spot shocks, volatility spikes, and time decay to estimate how portfolio-level gamma exposure changes under adverse conditions.
| Name | Type | Required | Description |
|---|---|---|---|
| symbols | string[] | Required | Array of underlying symbols to stress test. |
| weights | number[] | Optional | Portfolio weights for each symbol. Defaults to equal weight. |
| scenarios | object[] | Optional | Custom stress scenarios. Each object specifies spot_shock_pct and/or vol_shock_pct. Defaults to standard scenarios (-5%, -2%, +2%, +5% spot shocks). |
The response data object contains stress test results for each scenario, including the resulting net GEX, regime classification, and estimated P&L impact under each shock.
curl -X POST "https://api.gexengine.com/v1/portfolio/stress" \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"symbols": ["SPX", "QQQ"],
"weights": [0.6, 0.4],
"scenarios": [
{"spot_shock_pct": -5, "vol_shock_pct": 20},
{"spot_shock_pct": 5, "vol_shock_pct": -10}
]
}'