Lean
Lean copied to clipboard
Can't omit an ETF constituents filter function
Expected Behavior
If we don't provide a universeFilterFunc to the Universe.ETF method, the universe selects all of the ETF constituents.
Actual Behavior
If we don't provide a universeFilterFunc to the Universe.ETF method, we get the following error:
In Python
Runtime Error: Object reference not set to an instance of an object. in Extensions.cs:line 2685
In C#
Build Error File: project/Main.cs Line:57 Column:33 - The call is ambiguous between the following methods or properties: 'UniverseDefinitions.ETF(string, string, UniverseSettings, Func, IEnumerable>)' and 'UniverseDefinitions.ETF(string, string, UniverseSettings, PyObject)'
Potential Solution
N/A
Reproducing the Problem
Python
self.AddUniverse(self.Universe.ETF("SPY", Market.USA, self.UniverseSettings))
C#
AddUniverse(Universe.ETF("SPY", Market.USA, UniverseSettings));
System Information
QC Cloud
Checklist
- [x] I have completely filled out this template
- [x] I have confirmed that this issue exists on the current
masterbranch - [x] I have confirmed that this is not a duplicate issue by searching issues
- [x] I have provided detailed steps to reproduce the issue