Hello,
Could someone please explain to me why the sum of the minute volume data from 9:30 to 9:45 and 9:45 to 10 as coded:
fifteen_min_v = round(history_min_v[-361:-347].sum(), 0)
fifteen_to_thirty_v =round(history_min_v[-346:-332].sum(), 0)
does not equal the sum of the minute volume data for the same time frame 9:30 to 10 but in a single line of code as coded:
thirty_min_v = round(history_min_v[-361:-332].sum(), 0)?
If you look at the logs for DWAC the 9:30 to 9:45 minute volume sum is 5287716, and the 9:45 to 10 minute volume sum is 4098751, but the 9:30 to 10 minute volume sum is 10201721. However 5287716 + 4098751 =/= 10201721.
Any explanation for this would be appreciated.
Louis Szeto
Hi Ryan
The slice [-347] is missed. Note that slicing like [1:10] is only calling slice index 1 - slice index 9 of a size 9 array.
Best
Louis
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.
Ryan Riordon
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!