I'm trying to implement my first algorithm, so please bear with me :)

I've been trying to use QCAlgorithmFramework for writing my first algorithm in python. I'd like to be able to re-select the universe periodically, and ScheduledUniverseSelectionModel seems to fit the bill. However, some of the details of the universe selection process don't seem well documented. Specifically, ScheduledUniverseSelectionModel takes a symbol selection function as its third argument. This algorithm takes only two arguments: self and the simulation datetime. You cannot get access to the whole data universe from which to select symbols. Can someone please explain why this design choice has been made?

In the Lean engine, ScheduledUniverseSelectionModel.CreateUniverses creates a ScheduledUniverse with the provided selector. The selector is called here: 

https://github.com/QuantConnect/Lean/blob/master/Common/Data/UniverseSelection/ScheduledUniverse.cs#L81

This selector is called without the data argument.

Is there an alternate mechanism for accessing the data object in a ScheduledUniverseSelectionModel? How else might one implement the equivalent of this algorithm using QCAlgorithmFramework? 

https://www.quantconnect.com/tutorials/strategy-library/fundamental-factor-long-short-strategy

Thanks,

Sunil

Author