investfly.models.strategy.InstrumentSelectionSpec

Runtime instrument-selection contracts for strategy entries.

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

Available runtime instrument-selection modes.

class InstrumentSelectionSpec:

Base contract for selecting the instrument opened by a strategy.

@dataclass
class DirectInstrumentSelection(InstrumentSelectionSpec):

Open the selected security without a derivative transformation.

@dataclass
class FutureContractSelection(InstrumentSelectionSpec):

Select a futures contract from the target product at execution time.

@dataclass
class OptionStructureSelection(InstrumentSelectionSpec):

Select the contracts needed for an option structure at execution time.