Skip to content

Covered call max_profit/max_loss mix per-share premium with 100-share quantities #32

@bradsmithmba

Description

@bradsmithmba

Summary

In src/api/enhanced_strategy_recommender.py, _create_covered_call() computes max profit and max loss by adding a per-share option premium to 100-share dollar quantities. The premium is not scaled by the 100-share contract multiplier, so both figures are wrong by roughly the premium times 99.

Location

premium = self._get_option_price(call_option, 'bid')   # per share, e.g. $2.50
max_profit = premium + (strike - current_price) * 100  # premium should be * 100
max_loss = (current_price * 100) - premium             # premium should be * 100

premium is a per-share option price. (strike - current_price) * 100 and current_price * 100 are total dollar amounts for the 100 shares a covered call is written against. Adding an unscaled per-share premium to those totals is a unit mismatch.

Impact

Fix direction

Scale the premium to the contract (100 shares) so all terms are in total dollars:

max_profit = (premium + strike - current_price) * 100
max_loss = (current_price - premium) * 100

(Equivalently, keep everything per share and divide the other terms by 100. Either is fine as long as the units are consistent.)

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