Hello. Does anyone know of an easy way for me to prevent my algo from issuing multiple simultaneous orders for a company's stock when that company has multiple share classes? For example, Google has both Class A and Class C shares. Since each share class has it's own QC symbol, but both symbols have VERY similar charts, my algo always buys twice as many Google shares as I want it to.
Fred Painchaud
Hi Garrett,
Both classes have different tickers, of course. GOOG and GOOGL. I believe your algo uses universes, right? That's what I conclude from your post.
The easiest and more effective way I can see would be to always make sure that the one you do not want to buy is removed. In your coarse selection method, just before returning your list of symbols, make sure that the one you do not want is removed if present. For instance:
The code above assumes you do not want to buy GOOGL but GOOG is ok.
Fred
Garrett Grow
But, the question is how to do that in a systematic way. I would rather to avoid manually combing through all of the hundreds or thousands of symbols in my universe looking companies with multiple share classes.
AK M
You might be able to pass coarse selection through to fundamental selection. Fundamental objects have a company name property you can use to filter out, i.e. both $GOOG and $GOOGL are for Alphabet.Â
Cole S
Hi Garrett,
Check out the CompanyReference object in FineFundamental. I'm not sure it's what you need, but it looks like the PrimaryShareClassId and PrimarySymbol properties may help you.
-Cole
Â
Garrett Grow
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!