Backends.OptionId¶
Classes
OptionId(strike: float, ...) |
Container class representing the parameters of an option. |
OptionType |
Enum to represent the different types of an option. |
-
class
Backends.OptionId.OptionId(strike: float, option_type: Products.OptionType.OptionType)[source]¶ Container class representing the parameters of an option.
Parameters: strike : float
Strike of the option.
option_type :
OptionTypeType of the option, can be
CALLorPUT.Examples
>>> from Backends.OptionId import OptionId >>> from Products.OptionType import OptionType >>> option_id = OptionId(95.0, OptionType.CALL) >>> print(option_id) Option Id: 95.0-OptionType.CALL
Attributes
option_typestrike