QuantConnect / lean-cli

CLI for running the LEAN engine locally and in the cloud
https://www.lean.io/cli
Apache License 2.0
189 stars 101 forks source link

New update broke CryptoCoarseFundamentalUniverse #434

Closed GitHubUser97 closed 3 months ago

GitHubUser97 commented 3 months ago

As in the title, lean cli forced an update on itself, then CryptoCoarseFundamentalUniverse stopped working. I get name 'CryptoCoarseFundamentalUniverse' is not defined now.

jaredbroad commented 3 months ago

Addressed here (https://github.com/QuantConnect/Lean.DataSource.CryptoCoarseFundamentalUniverse/pull/13)

ETA 30min - thank you for the report.

GitHubUser97 commented 3 months ago

Thank you Jared. I've got an answer on discord. For anyone else encountering, I attach an example implementation vs old one. Also a working example by quantconnect team: https://github.com/QuantConnect/Lean.DataSource.CryptoCoarseFundamentalUniverse/blob/master/CryptoCoarseFundamentalUniverseSelectionAlgorithm.py

old:

uniSettings = UniverseSettings(Resolution.Hour, 1, True, False, timedelta(days=0))
        self.AddUniverse(CryptoCoarseFundamentalUniverse(Market.Binance, uniSettings, self.CoarseSelectionFunction))

new:


uniSettings = UniverseSettings(Resolution.Hour, 1, True, False, timedelta(days=0))
self.UniverseSettings = uniSettings

 self.AddUniverse(CryptoUniverse.Binance(self.CoarseSelectionFunction) ) ```