Documentation icon indicating copy to clipboard operation
Documentation copied to clipboard

Outdated Example for Multi-Alpha Algorithms

Open efJerryYang opened this issue 1 year ago • 0 comments

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

  • [x] I have completely filled out this template
  • [x] I have confirmed that this issue exists on the current master branch
  • [x] I have confirmed that this is not a duplicate issue by searching issues

efJerryYang avatar Sep 29 '24 19:09 efJerryYang