I noticed the old backtest starts giving different results over the weekend. I suspect this may be due to incorrect price and volume data. Particularly in the attached simplified backtest, on 27th May 2016, ew_price is 99.43 and ew_volume is 1505852 making its dollar volume 149726864, which is less than cut_off_dol_vol of 153094813 and hence not selected. While according to yahoo data on that day, ew_price should be 36.28 and ew_vol should be 5424900, making its dollar volume 196815372 and should be selected.
rrc_sym has string format to be LOM R735QTJ8XC9X. This is probably due to ticker change but cannot find such records on google.
Also the price seems to differ by a small amount for a number of symbols (probably due to rounding) on certain days which make a visible difference when compounded over a long period.
Louis Szeto
Hi Nguyen
The default pricing in LEAN is using adjusted prices by dividends and splits. This might cause discrepancies with other sources. To use raw prices like in Yahoo Finance, please implement the following line in the .initialize method:
However, Yahoo includes the volume of the OTC market while QuantConnect does not, resulting in systematically smaller volumes. Please also note that the prices in Yahoo or some other sources are adjusted by split already for easy comparison historical data. So, the price is 1/3 and the volume is tripled in their data.
Best
Louis Szeto
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.
Nguyen Huu Quan
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!