IExecutionModel
QuantConnect.Algorithm.Framework.Execution.IExecutionModel
Bases: INotifiedSecurityChanges
Algorithm framework model that executes portfolio targets
execute
execute(
algorithm: QCAlgorithm, targets: List[IPortfolioTarget]
) -> None
Submit orders for the specified portfolio targets. This model is free to delay or spread out these orders as it sees fit
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
algorithm
|
QCAlgorithm
|
The algorithm instance |
required |
targets
|
List[IPortfolioTarget]
|
The portfolio targets just emitted by the portfolio construction model. These are always just the new/updated targets and not a complete set of targets |
required |
on_order_event
on_order_event(
algorithm: QCAlgorithm, order_event: OrderEvent
) -> None
New order event handler
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
algorithm
|
QCAlgorithm
|
The algorithm instance |
required |
order_event
|
OrderEvent
|
Order event to process |
required |
on_securities_changed
on_securities_changed(
algorithm: QCAlgorithm, changes: SecurityChanges
) -> None
Event fired each time the we add/remove securities from the data feed
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
algorithm
|
QCAlgorithm
|
The algorithm instance that experienced the change in securities |
required |
changes
|
SecurityChanges
|
The security additions and removals from the algorithm |
required |