Hi there, relatively new and into video 7 of training so sorry if this is a simple question:
I'm trying to add tickers to my universe to review the tickers.
My code should have two simple rules, 1) the equity should be priced > 0.001, 2) the volume should be >1.
Mia (Autobot) suggested to see all added equity tickers I should log the tickers to review in the log.
I would like to see a filtering of tickers is possible. The backtest has the last 3 months Out of Sample" because I am testing this with no seat to see if the platform works; Any thoughts on why no tickers are being stored? Code and backtest attached thanks
Mia Alissi
Based on the provided code, it seems like the issue might be with the way you're trying to add data and then filter it. In your
Initialize
method, you're trying to add data usingself.AddData[Fundamental]("CustomData", Resolution.Daily)
, but this is not the correct way to add universe selection in QuantConnect.Instead, you should use the
AddUniverseSelection
method to add a universe of symbols to your algorithm. You can then filter these symbols based on your conditions in theSelectCoarse
orSelectFine
methods.Here's an example of how you might do this:
In this example,
CoarseSelectionFunction
is a method that takes the coarse universe (a list ofCoarseFundamental
objects) as a parameter. It filters this list based on your conditions and returns a list of symbols that meet these conditions. These symbols are then added to your universe.Please note that this is a simplified example and you might need to adjust it to fit your specific needs. For more information on universe selection in QuantConnect, you can refer to the documentation.
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.
Gavin
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!