investfly.models.portfolio.OptionStrategyTemplate

class OptionStrategyTemplate(builtins.str, enum.Enum):

Templated option structures supported by the Phase-1 MVP automated options engine.

Naked short calls/puts and any undefined-risk structure outside this list are rejected by validation. Each template prescribes a fixed leg count and action shape.

LONG_CALL = <OptionStrategyTemplate.LONG_CALL: 'LONG_CALL'>
LONG_PUT = <OptionStrategyTemplate.LONG_PUT: 'LONG_PUT'>
COVERED_CALL = <OptionStrategyTemplate.COVERED_CALL: 'COVERED_CALL'>
CASH_SECURED_PUT = <OptionStrategyTemplate.CASH_SECURED_PUT: 'CASH_SECURED_PUT'>
BULL_PUT_CREDIT_SPREAD = <OptionStrategyTemplate.BULL_PUT_CREDIT_SPREAD: 'BULL_PUT_CREDIT_SPREAD'>
BEAR_CALL_CREDIT_SPREAD = <OptionStrategyTemplate.BEAR_CALL_CREDIT_SPREAD: 'BEAR_CALL_CREDIT_SPREAD'>
BULL_CALL_DEBIT_SPREAD = <OptionStrategyTemplate.BULL_CALL_DEBIT_SPREAD: 'BULL_CALL_DEBIT_SPREAD'>
BEAR_PUT_DEBIT_SPREAD = <OptionStrategyTemplate.BEAR_PUT_DEBIT_SPREAD: 'BEAR_PUT_DEBIT_SPREAD'>
IRON_CONDOR = <OptionStrategyTemplate.IRON_CONDOR: 'IRON_CONDOR'>
CALL_BUTTERFLY = <OptionStrategyTemplate.CALL_BUTTERFLY: 'CALL_BUTTERFLY'>
PUT_BUTTERFLY = <OptionStrategyTemplate.PUT_BUTTERFLY: 'PUT_BUTTERFLY'>
CUSTOM_COMBO = <OptionStrategyTemplate.CUSTOM_COMBO: 'CUSTOM_COMBO'>
def isMultiLeg(self) -> bool:
def legCount(self) -> int:
def requiresStockUnderlyingPosition(self) -> bool:
def requiresCashCollateral(self) -> bool:
class OptionLegAction(builtins.str, enum.Enum):

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.

BUY_TO_OPEN = <OptionLegAction.BUY_TO_OPEN: 'BUY_TO_OPEN'>
SELL_TO_OPEN = <OptionLegAction.SELL_TO_OPEN: 'SELL_TO_OPEN'>
BUY_TO_CLOSE = <OptionLegAction.BUY_TO_CLOSE: 'BUY_TO_CLOSE'>
SELL_TO_CLOSE = <OptionLegAction.SELL_TO_CLOSE: 'SELL_TO_CLOSE'>
def isOpen(self) -> bool:
def isBuy(self) -> bool:
class OptionLegRole(builtins.str, enum.Enum):

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.

PRIMARY = <OptionLegRole.PRIMARY: 'PRIMARY'>
UNDERLYING = <OptionLegRole.UNDERLYING: 'UNDERLYING'>
PROTECTIVE_PUT = <OptionLegRole.PROTECTIVE_PUT: 'PROTECTIVE_PUT'>
PROTECTIVE_CALL = <OptionLegRole.PROTECTIVE_CALL: 'PROTECTIVE_CALL'>
SHORT_PUT = <OptionLegRole.SHORT_PUT: 'SHORT_PUT'>
LONG_PUT = <OptionLegRole.LONG_PUT: 'LONG_PUT'>
SHORT_CALL = <OptionLegRole.SHORT_CALL: 'SHORT_CALL'>
LONG_CALL = <OptionLegRole.LONG_CALL: 'LONG_CALL'>