Calculators
Credit spread return on collateral API
Compute collateral / max loss ((width - credit) x 100), max profit (net credit), return on collateral (credit/(width-credit)), annualized to 365 days, and credit-to-width ratio for a defined-risk credit spread. Deterministic ROC math. Answers 'what's my return on a credit spread','what's the annualized yield','how much collateral does this spread tie up'.
Price$0.03per request
MethodPOST
Route/v1/calc/opt-credit-spread-return
StatusLive
MIME typeapplication/json
Rate limit120/minute
CacheNo cache
optionscredit-spreadcalcreturn-on-capitalincomeannualizedderivativestrading
API URL
Integration docshttps://x402.hexl.dev/v1/calc/opt-credit-spread-returnExample request
{
"netCredit": 1.5,
"spreadWidth": 5,
"daysToExpiry": 30
}Example response
{
"netCredit": 1.5,
"spreadWidth": 5,
"daysToExpiry": 30,
"multiplier": 100,
"collateral": 350,
"maxProfit": 150,
"maxLoss": 350,
"returnOnCollateralPercent": 42.8571,
"annualizedPercent": 7567.2657,
"creditToWidthRatio": 0.3
}Input schema
{
"type": "object",
"required": [
"netCredit",
"spreadWidth",
"daysToExpiry"
],
"properties": {
"netCredit": {
"type": "number",
"examples": [
1.5
]
},
"spreadWidth": {
"type": "number",
"description": "distance between strikes",
"examples": [
5
]
},
"daysToExpiry": {
"type": "number",
"examples": [
30
]
},
"multiplier": {
"type": "number",
"default": 100
}
}
}Output schema
{
"type": "object",
"additionalProperties": true
}