Hello,
I was writing some algos and couldn't figure out why even the most basic systems were not trading the way I thought they should.
After further examination i noticed two things. The first is that the data that im logging for OHLC is significantly off. More than I would expect even with exchanges reporting slightly different trade numbers. Below iv copied the daily OHLC from my log dated 9/1/17-9/28/17. I have put it next to data I copied from Nasdaq historical data.
Spreadsheet: Nasdaq vs Quantopian data
Nasdaq data: Nasdaq Historical Data
The Open data seems to be good, the High data is off by just a bit, but the Low and Close data are way off. The difference can be multiple points in some cases. I have also tested this with other sample dates as well as data from other sources and the results are just as bad. Some where even the Opens and Highs are off as well.
My second issue is that my data.history 1 minute log data is off by four hours. I thought the default time was EST but i am getting 4 hours ahead of this. Here is an example that should be logging OHLC 1m data from the last two minutes. In my log that should be 9:34 and 9:35. It is displaying 13:04 and 13:05 instead. As you can see though, it initiates the logging at 9:35 correctly, but then the time zone changes.
2017-09-25 09:35 Test:48 INFO 2017-09-25 13:34:00+00:00 2017-09-25 13:35:00+00:00
Equity(24 [AAPL]) 149.88 149.89
Equity(24 [AAPL]) 150.08 150.03
Equity(24 [AAPL]) 149.78 149.79
Equity(24 [AAPL]) 149.91 149.79
Can someone help me with this issue? I am not sure if it is something wrong with my code, or an issue with the back end of Quantopian.
Iv attached the simple code that I have been using to test this.