Skip to content

IPortfolioConstructionModel

QuantConnect.Algorithm.Framework.Portfolio.IPortfolioConstructionModel

Bases: INotifiedSecurityChanges

Algorithm framework model that

create_targets

create_targets(
    algorithm: QCAlgorithm, insights: List[Insight]
) -> Iterable[IPortfolioTarget]

Create portfolio targets from the specified insights

Parameters:

Name Type Description Default
algorithm QCAlgorithm

The algorithm instance

required
insights List[Insight]

The insights to create portfolio targets from

required

Returns:

Type Description
Iterable[IPortfolioTarget]

An enumerable of portfolio targets to be sent to the execution model.

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