Back

Timezone treatment for QuoteBar data

Hi,

I'm noticing that QuoteBars are not timestamped properly - their DateTime.Kind is set to "Unspecified" which leads to issues when comparing data from different providers, as an example.

Please see attached backtest where the log shows this problem.

Is there a good reason why this is the case? Am I perhaps missing another way to infer the timezone from the data?

Update Backtest








As mentioned in the Documentation here, all FXCM data is set in UTC-05 Time, or Eastern Standard Time (EST). QuantConnect's documentation lists the TimeZone for all the supported data providers. 

When trying to discover the differences in TimeZones, one can compare the Time property of QCAlgorithm with a security's local time. The backtest below shows the 6 hour time difference between EST and Europe/London time. 

0


Thank you Guru! In fact, I found that in some instances, I did not have access to the algorithm's `Time` so I resorted to using `sec.LocalTime.ConvertToUtc( sec.Exchange.TimeZone )` to convert the time back into algorithm time.

0

Update Backtest





0

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.


Loading...

This discussion is closed