Back

Importing Modules

I'm new to QuantConnect and am having trouble really getting going.  I have dissected some examples but the import structures seem pretty obscure.  I'm specificlly trying to figure out a way to inspect the VolatilityETFUniverse() object but there seems to be no terminal output from the algorithm development environment and the object doesn't import in the research environment.  I'm sure I'm missing something here.  I have seen references to logging capabilities from the algorithm environment but can't for the life of me figure how to access the logs.

Any help or general direction to help me get going would be very appreciated.

Update Backtest







0

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.


Hi Joseph,

Sorry to hear you're struggling to get going. There are two ways that our Universe modules work. One is that some are built into Lean, which you can view details of here -- this will show you the source code, tickers, dates, etc. Another way is through the drag-and-drop feature in the IDE, which will automatically import a file containing a Universe that we've created focusing on specific features -- sectors, growth, value, etc. These files will be included in the project you create, so you can view the code or symbols directly.

You can view a couple of examples of using the VolatilityETFUniverse() in the forum discussion here.

These modules aren't available in the research environment as this is a more static environment for testing, inspecting data, etc. However, by examining to code of the modules you can manually add the securities you want.

I've attached a backtest below that imports a Universe module and logs the symbols. If you clone the algorithm and run a backtest, you can view the logs in the backtest results by either clicking on the Log tab or by clicking the link to the .txt file that appears in the output terminal at the bottom of the page.

0

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.


Thank you for the quick response.  I have tried your method for writing the tickers.  I copyied your onChange into an algorithm I have then ran it.  The console keeps saying that output has been rate limited.  I'm guessing this is from the debug method and the Log method doesn't seem to write a file anywere that I can find.

 

0

2018-01-01 00:00:00 Launching analysis for 186b4820ac45bc073350547c63c74b02 with LEAN Engine v2.4.0.0.6422

2019-10-03 00:00:00 Algorithm Id:(186b4820ac45bc073350547c63c74b02) completed in 1338.80 seconds at 4k data points per second. Processing total of 5,433,096 data points.

 

this was all the information that was in the log file at the link.  I finally found it but the ticker data wasn't avaialble.

0

Joseph Brewer what do you mean inspect the object? You can see the full object here in Github with all the tickers.

https://github.com/QuantConnect/Lean/blob/master/Algorithm.Framework/Selection/VolatilityETFUniverse.cs

 

0

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.


Thanks for the link. I'm coming from python so have been mostly sticking to that documentation which is why I guess I couldn't find what you linked there.  I actually was thinking of being able to do things like object.__dir__() to print out object structures and see how things are organized.  I'm just trying get my head round the Lean framework mostly. 

Specifically looking for a way to pump in a static/manual universe to a selection model so that the selection model is picking from the predetermined static universe.  I'm sure I'm probably overcomplicating things.  Thanks for insites they are helpful.

0

Update Backtest





0

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.


Loading...

This discussion is closed