QuantConnect / Documentation

QuantConnect Wiki Style Documentation Behind QuantConnect
https://www.quantconnect.com/docs/v2/
Apache License 2.0
171 stars 135 forks source link

Outdated Example for Multi-Alpha Algorithms #1924

Open efJerryYang opened 2 days ago

efJerryYang commented 2 days ago

Expected Behavior

The code example for Multi-Alpha Algorithms needs to be corrected for both C# and Python.

We need to use the Algorithm.Insights.GetActiveInsights(Algorithm.UtcTime).ToList(); to achieve this. I am not sure if we should validate the insights first (as in the default GetTargetInsights implementation).

See the lean repository PortfolioConstructionModel.cs#L164C1-L177C10.

Actual Behavior

The code example for Multi-Alpha Algorithms seems to be outdated for both C# and Python. The Documentation: 04-Multi-Alpha-Algorithms.

The property InsightsCollection does not exist in the PortfolioConstructionModel.cs at the master branch and therefore we can not invoke InsightCollection.GetActiveInsights(Algorithm.UtcTime).ToList(); to get the insights for multiple alphas.

Checklist