Hi, in order to allocate to every symbol in a liquid universe, what I used to do was:

for security in self.changes.AddedSecurities: if not security.Invested: self.SetHoldings(security.Symbol, 0.10)

But if my algorithm was making use of and switching between 2 or more universes(e.g. a liquid one and a manual one), I can no longer use AddedSecurities because that only contains the symbols most recently added, and will not include other symbols that have been added a long time ago but are still contained in the liquid universe. I need to be able to do this because if the algorithm liquidates positions that are still within the liquid universe due to switching to the manual universe, it would not be able to re-allocate back into symbols still inside the liquid universe because AddedSecurities will no longer contain them.

I tried:

for security in self.ActiveSecurities: if not security.Invested: self.SetHoldings(security.Symbol, 0.10)

But that didn't seem to work

Author