Options strategies combine calls/puts to hedge or speculate. Straddle = call + put (volatility). Iron condor = sell strangle, buy wider strangle (range-bound).
Straddle: Call(K) + Put(K) — volatile
Strangle: Call(K₁) + Put(K₂) — very volatile
Bull Spread: Buy Call(K₁) + Sell Call(K₂)
Iron Condor: Put(K₁)+Call(K₂)+Put(K₃)+Call(K₄)
// Calculate option strategy payoff at expiration
function strategyPayoff(strategy, spotPrices, K) {
switch(strategy) {
case 'straddle':
return spotPrices.map(s =>
Math.max(s-K,0) + Math.max(K-s,0) - 10);
case 'strangle':
return spotPrices.map(s =>
Math.max(s-(K+5),0) + Math.max(K+5-s,0) - 6);
case 'bullSpread':
return spotPrices.map(s =>
Math.max(s-K,0) - Math.max(s-(K+10),0) - 3);
case 'ironCondor':
// Sell strangle + buy wider protection
return spotPrices.map(s =>
Math.max(90-s,0) + Math.max(s-110,0) -
Math.max(80-s,0) - Math.max(s-120,0) + 2);
}
}