In my coarse universe I'm looking at all stocks within a certain price range, but when I buy them they are sometimes way outside the range. I understand this is because the data in the universe is not split adjusted. Is there any way to do what I need or do I have to put my price range way wider and then manually filter the stocks out later?
Alexandre Catarino
If I understood you correctly, you want to filter stocks based on adjusted price.
In that case, at the moment, you will use a wider filter at selection.
We choose to create that dataset with raw price, because it makes more sense since it is a snapshot of the market at a given day.
LukeI
Thanks, I will just have to be careful with memory since it will be more stocks. Any tips on conserving memory usage with universes?
Alexandre Catarino
Once you select the securities that have passed the second filter, you can remove them from the universe:
self.RemoveSecurity(symbol)
However, if the universe does not change often and it is well below 500 securities, memory should not be an issue.
LukeI
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!