Skip to content

IAlphaModel

QuantConnect.Algorithm.Framework.Alphas.IAlphaModel

Bases: INotifiedSecurityChanges

Algorithm framework model that produces insights

update

update(
    algorithm: QCAlgorithm, data: Slice
) -> Iterable[Insight]

Updates this alpha model with the latest data from the algorithm. This is called each time the algorithm receives data for subscribed securities

Parameters:

Name Type Description Default
algorithm QCAlgorithm

The algorithm instance

required
data Slice

The new data available

required

Returns:

Type Description
Iterable[Insight]

The new insights generated.

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