I am just now getting into QuantConnect and, as a test to see what happens, I decided to clone this project - https://www.quantconnect.com/explore/14284103/Breaking-News-Events
I then attempted to change the universe to Futures using another code sample:
from Selection.futureUniverseSelectionModel import FutureUniverseSelectionModel
self.universe_settings.asynchronous = True
self.add_universe_selection(
FutureUniverseSelectionModel(
timedelta(1),
lambda _: [Symbol.create(Futures.indices.SP500E_MINI, SecurityType.FUTURE, Market.CME)]
)
)None of that worked so I reverted all changes and just tried to run the clone as is - that also fails. Perhaps I am just not getting it here and I am missing the boat on how to run things in the Algorithm lab.
At first I got a bunch of import errors telling me that none of the imports existed so I commented all of them out, outside of the import import * import. Then I got an error telling me that QCAlgorithm at the top of main.py does not exist.
I was attempting to run the main.py file in the interactive editor.
Thank you for your help!
Ashutosh
Hi Ken Tola
To import FutureUniverseSelectionModel use:
You will have to check the implementation of FutureUniverseSelectionModel and make changes in the code.
I was able to clone the original strategy and run a backtest.
Let me know if you are facing issues with imports.
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
Ken Tola
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
To unlock posting to the community forums please complete at least 30% of Boot Camp.
You can continue your Boot Camp training progress from the terminal. We hope to see you in the community soon!