As I am going through my fine filter, I notice that both GOOG and GOOGL make it through. Later on this could mess with my rankings if I'm using a small universe, or maybe even unnecessarily double my exposure to google.
Is there a way to get rid of this, and all other similar problems? I'm coming from Quantopian where there was a function to do this, but it's name is escaping me (maybe filters.default_us_equity_universe_mask).
Attached is a backtest with the issue. In the logs, you can see the tickers (which come from fine -> sortedbymarketcap -> testingvar -> tickers) show goog and google. Not sure if this is a bug or not, any help appreciated.
Mislav Sagovac
GOOG and GOOGL are different stocks. They have different voting rights (class A and class C). So I don't think it is an error if you get both symbols in coarse. Same company but different stocks.
Big mak
I understand what you are saying, but the following scenario is the one I am concerned about:
If you were investing in the top 10 stocks by market cap through QuantConnect, you would have 20% holdings in Google instead of the intended 10%. This same problem could arise in a more complex algorithm's backtest without even realizing.
It's not a big deal and I can manually just delete one of them but I am wondering if there is a QC native way to absolve myself of all share class issues to avoid problems similar to the one I outlined above.
Mislav Sagovac
Probably you would like to identify company by symbol and than delete one of the symbols if two or more symbols matches one company? I am not aware of built in feature for that in QC but I suppose it should be possible to do that inside coarse filter. Maybe you can use custom dats with symbol company links. Or use morningstar data in fine filter. There is for example companyId and ShortName objects.
Big mak
Thanks, this will be worth a try in the future when I can get some time.Â
In the meantime, if any QC staff are browsing a simple yes/no confirmation would help a lot.
Jared Broad
Sorry, we don't have this shortcut feature Big Mak. As Mislav said it's probably something you can do with Fine Fundamental data.Â
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.
Derek Melchin
Hi Big mak,
To ensure we don't invest in Google twice, we can filter by the `SecurityReference.IsPrimaryShare` property during fine universe selection. See the attached backtest for reference.
Best,
Derek Melchin
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.
Big mak
Derek,
Your attached backtest is giving a bad gateway error, but I was able to use IsPrimaryShare to get what I wanted, thank you! For reference to those that may use this in the future, it decreased my universe size by about 10% - removed GOOG vs GOOGL issues and also removed international stocks (alibaba, tsm, etc).Â
Big mak
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!