Merge PythonSlice into Slice (#8707)

- To simplify stub generation, merge PythonSlice into Slice, following
  existing pattern too, see QCAlgorithm.Python.cs
- Minor sintax fixes in example python algorithms
This commit is contained in:
Martin-Molinero
2025-04-21 13:37:33 -03:00
committed by GitHub
parent b81bcf086e
commit 4584feb7da
20 changed files with 106 additions and 209 deletions
@@ -23,7 +23,7 @@ class CustomDataUniverseRegressionAlgorithm(QCAlgorithm):
self.set_end_date(2014, 3, 31)
self.current_underlying_symbols = set()
self.universe_settings.resolution = Resolution.DAILY;
self.universe_settings.resolution = Resolution.DAILY
self.add_universe(CoarseFundamental, "custom-data-universe", self.selection)
self._selection_time = [datetime(2014, 3, 24), datetime(2014, 3, 25), datetime(2014, 3, 26),
@@ -57,7 +57,7 @@ class CustomDataUniverseRegressionAlgorithm(QCAlgorithm):
if len(custom_data) > 0:
for symbol in sorted(self.current_underlying_symbols, key=lambda x: x.id.symbol):
if not self.securities[symbol].has_data:
continue;
continue
self.set_holdings(symbol, 1 / len(self.current_underlying_symbols))
if len([x for x in custom_data.keys() if x.underlying == symbol]) == 0: