Option#
Immutable container representing a single vanilla option contract.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
strike
|
float
|
The strike price of the option. |
required |
maturity
|
float
|
The time to maturity of the option, expressed in years. |
required |
option_type
|
OptionType
|
The type of the option, either CALL or PUT. |
required |
exercise_style
|
ExerciseStyle
|
The exercise style of the option, by default ExerciseStyle.EUROPEAN. |
EUROPEAN
|
Source code in src/quantfin/atoms/option.py
parity_counterpart() -> Option
#
Create the put-call parity equivalent of this option.
A call is converted to a put, and a put is converted to a call, while keeping all other parameters the same.
Returns:
Type | Description |
---|---|
Option
|
A new Option instance with the opposite type. |