hi,
i was looking at the history DataFrame, and found this wired behaveor that i don't understand:
this is in daily resolution:
open high low close volume symbol time MSFT R735QTJ8XC9X 2005-04-07 18.149688 18.498292 18.134854 18.298030 74325499.0 2005-04-08 18.290613 18.639218 18.268362 18.616966 73084986.0 and here it is in minute resolution: 2005-04-07 16:00:00 18.616966 18.624383 18.609549 18.616966 881515.0 2005-04-08 09:31:00 18.594715 18.616966 18.587298 18.602132 563441.0... 2005-04-08 09:42:00 18.616966 18.683720 18.616966 18.676303 645279.0 1. the bars that include 18.290613 and 18.298030 are missing from the minute resolution.2. the high in 2005-04-08 is 18.639218, but in minute 09:42:00 it is 18.683720. what am i missing?
Jing Wu
Hi Nitay,
1) The datetime index in history dataframe is the EndTime of the bar. Please see the explanation in this post
Therefore, the open price 18.290613 indexed with 2005-04-08 is actually the daily open on 2005-04-07. If you check the minute open price at 09:31:00 2005-04-07, it is 18.290613.
2005-04-07 09:31:0018.29061318.34995018.26836218.349950609593.0
the close price 18.298030 indexed with 2005-04-07 is actually the daily close on 2005-04-06. You should check the minute close price at 16:00:00 2005-04-06.
2005-04-06 16:00:0018.30544718.31286418.29803018.298030661147.0
2) the bar is consolidated with the smaller resolution. For example, the second bar is consolidated with the tick bar, the minute bar is consolidted with the second bar. The daily bar is consolidated with the hourly bar. Therefore, the daily high is constructed with the highest high of a day. The high of the minute bar is just the high price within the last one minute.
.
Nitay Arcusin
Jing Wu , many thanks.
Nitay Arcusin
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!