Hi there,
I'm doing work with a lot of symbols going back a long time, and a problem I keep running into is my algorithm keeps picking up stocks before they are the stocks they are today. For example, it's buying CRM in 2001, but they didn't IPO until 2004. I want to leave the stock in my list because I want it to be in the pool today, however it's making my backtests inaccurate.
How can I deal with this issue?
Thanks!
SLPAdvisory
I think I have found a fix, since I'm using a mix of custom data (Mutual Funds) and regular equity data I had written just one foreach loop for all symbols and was using portfolio[symbol].Price, instead I separated it into a mutual fund group and an equity group and use data.ContainsKey with the equities and I believe that has fixed it!
SLPAdvisory
It looks like what I thought was a fix was not the fix that I needed..
It addressed some of the problems I was facing but I'm still getting incorrect companies. The problem is that it's tracking and trading companies that had the ticker prior to the company I intend. Like stocks that have since been delisted but had the same ticker as one that I want to track today.
I noticed in the data section a Permatick and I was wondering if it's possible to set my list of symbols by their Permatick?
Any help would be appreciated, thank you!
Jared Broad
The only "right" way to do this with a fixed list of stocks like you're doing is to use the LEAN Symbol object in your list. Then when you create the universe you would do `Symbol.Create` to create the unique identifier for the asset.
Selecting an older asset isn't a bug in LEAN; if you're only identifying the asset by its ticker (and not using universe provided symbols) then its correctly identifying a company which used to exist in the past.
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.
SLPAdvisory
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!