DefaultOptionAssignmentModel
QuantConnect.Securities.Option.DefaultOptionAssignmentModel
DefaultOptionAssignmentModel(
required_in_the_money_percent: float = 0.05,
prior_expiration: Optional[timedelta] = None,
)
Bases: Object, IOptionAssignmentModel
The option assignment model emulates exercising of short option positions in the portfolio. Simulator implements basic no-arb argument: when time value of the option contract is close to zero it assigns short legs getting profit close to expiration dates in deep ITM positions. User algorithm then receives assignment event from LEAN. Simulator randomly scans for arbitrage opportunities every two hours or so.
Creates a new instance
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
required_in_the_money_percent
|
float
|
The percent in the money the option has to be to trigger the option assignment |
0.05
|
prior_expiration
|
Optional[timedelta]
|
For OptionStyle.AMERICAN, the time span prior to expiration were we will try to evaluate option assignment |
None
|
get_assignment
get_assignment(
parameters: OptionAssignmentParameters,
) -> OptionAssignmentResult
Get's the option assignments to generate if any
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
parameters
|
OptionAssignmentParameters
|
The option assignment parameters data transfer class |
required |
Returns:
| Type | Description |
|---|---|
OptionAssignmentResult
|
The option assignment result. |