OptionPortfolioModel
QuantConnect.Securities.Option.OptionPortfolioModel
Bases: SecurityPortfolioModel
Provides an implementation of ISecurityPortfolioModel for options that supports default fills as well as option exercising.
process_close_trade_profit
process_close_trade_profit(
portfolio: SecurityPortfolioManager,
security: Security,
fill: OrderEvent,
) -> ConvertibleCashAmount
Helper method to determine the close trade profit
This codeEntityType is protected.
process_fill
process_fill(
portfolio: SecurityPortfolioManager,
security: Security,
fill: OrderEvent,
) -> None
Performs application of an OrderEvent to the portfolio
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
portfolio
|
SecurityPortfolioManager
|
The algorithm's portfolio |
required |
security
|
Security
|
Option security |
required |
fill
|
OrderEvent
|
The order event fill object to be applied |
required |