GEX
Public feedInitializing terminal
Portfolio optimization
Computes optimal portfolio weights to minimize gamma risk across a set of symbols. Uses the engine's exposure data to find allocations that reduce aggregate dealer positioning risk while respecting user-defined constraints.
| Name | Type | Required | Description |
|---|---|---|---|
| symbols | string[] | Required | Array of underlying symbols to optimize across. |
| constraints | object | Optional | Optimization constraints. Supports min_weight, max_weight (per symbol), and target_regime. |
The response data object contains optimal weights for each symbol, the resulting aggregate gamma exposure, and the objective function value (minimized gamma risk).
curl -X POST "https://api.gexengine.com/v1/portfolio/optimize" \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"symbols": ["SPX", "QQQ", "IWM", "SPY"],
"constraints": {
"min_weight": 0.05,
"max_weight": 0.60
}
}'