Hello,

 

Currently trying to build an algorithm that uses a custom Universe Selection Model. I'm getting a strange error when I try to backtest the algorithm:

  1. System.Exception: Value cannot be null. (Parameter 'source') in UniverseSelection.cs:line 145
  2. ---> System.ArgumentNullException: Value cannot be null. (Parameter 'source')
  3. at System.Linq.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument)
  4. at System.Linq.Enumerable.Where[TSource](IEnumerable`1 source, Func`2 predicate)
  5. at QuantConnect.Lean.Engine.DataFeeds.UniverseSelection.ApplyUniverseSelection(Universe universe, DateTime
  6. dateTimeUtc, BaseDataCollection universeData) in
  7. /LeanCloud/CI.Builder/bin/Debug/src/QuantConnect/Lean/Engine/DataFeeds/UniverseSelection.cs:line 145
  8. at QuantConnect.Lean.Engine.DataFeeds.SubscriptionSynchronizer.Sync(IEnumerable`1 subscriptions, CancellationToken
  9. cancellationToken)+MoveNext() in
  10. /LeanCloud/CI.Builder/bin/Debug/src/QuantConnect/Lean/Engine/DataFeeds/SubscriptionSynchronizer.cs:line 237
  11. at QuantConnect.Lean.Engine.DataFeeds.Synchronizer.StreamData(CancellationToken cancellationToken)+MoveNext() in
  12. /LeanCloud/CI.Builder/bin/Debug/src/QuantConnect/Lean/Engine/DataFeeds/Synchronizer.cs:line 101

 

This appears to me to be an internal error in the QuantConnect Framework. Has anyone else encountered this error while backtesting with a custom Universe Selection Model?

Author

Art Richardson

August 2021