Skip to content

Bug: Iron condor max_loss ignores put wing width — understates risk on unequal wings #61

Description

@bradsmithmba

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions