Summary
Iron condor max_loss is computed using only the call wing width. The put wing width is calculated but never used in the max loss formula. For equal wings this is coincidentally correct, but when _find_closest_strike snaps to unequal available strikes, max loss is understated and profit_risk_ratio is inflated.
Evidence
src/api/enhanced_strategy_recommender.py line 432:
max_loss = (short_call_strike - long_call_strike) - net_credit
Put wing: long_put_strike = 0.85 * price, short_put_strike = 0.90 * price — computed but not used in max_loss.
Fix
call_wing = short_call_strike - long_call_strike
put_wing = short_put_strike - long_put_strike
max_loss = max(call_wing, put_wing) - net_credit
Summary
Iron condor
max_lossis computed using only the call wing width. The put wing width is calculated but never used in the max loss formula. For equal wings this is coincidentally correct, but when_find_closest_strikesnaps to unequal available strikes, max loss is understated andprofit_risk_ratiois inflated.Evidence
src/api/enhanced_strategy_recommender.pyline 432:Put wing:
long_put_strike = 0.85 * price,short_put_strike = 0.90 * price— computed but not used in max_loss.Fix