Hi all,
I have some experience building algorithms, but I'm very new when it comes to Quantopian and Python. Right now, I'm trying to port all of my algorithms from TradingView to Quantopian because this platform is much more powerful and provides me with more historical data. However, I'm running into some issues with creating 60 minute bars from the 1 minute data that Quantopian provides. I tried to resample the data following these two posts (https://www.quantopian.com/posts/writing-algos-for-time-frames-other-than-1m-and-1d and https://www.quantopian.com/posts/custom-intraday-bars) as closely as possible, but I can't quite get it to work. I printed the resampled DataFrame 'prices_60m' to troubleshoot, and I noticed something very weird. Some timestamps give me the correct price every hour, but most give me NaN. Could I get some help with this?
Here is a snippet of the logs I'm talking about:
2014-03-07 09:30 PRINT prices_60m: 2013-12-30 14:00:00+00:00 3.800
2013-12-30 15:00:00+00:00 3.795
2013-12-30 16:00:00+00:00 3.878
2013-12-30 17:00:00+00:00 3.870
2013-12-30 18:00:00+00:00 3.850
2013-12-30 19:00:00+00:00 3.840
2013-12-30 20:00:00+00:00 3.850
2013-12-30 21:00:00+00:00 3.840
2013-12-30 22:00:00+00:00 NaN
2013-12-30 23:00:00+00:00 NaN
2013-12-31 00:00:00+00:00 NaN
2013-12-31 01:00:00+00:00 NaN
2013-12-31 02:00:00+00:00 NaN
2013-12-31 03:00:00+00:00 NaN
2013-12-31 04:00:00+00:00 NaN
2013-12-31 05:00:00+00:00 NaN
2013-12-31 06:00:00+00:00 NaN
2013-12-31 07:00:00+00:00 NaN
2013-12-31 08:00:00+00:00 NaN
2013-12-31 09:00:00+00:00 NaN
2013-12-31 10:00:00+00:00 NaN
2013-12-31 11:00:00+00:00 NaN
2013-12-31 12:00:00+00:00 NaN
2013-12-31 13:00:00+00:00 NaN
2013-12-31 14:00:00+00:00 3.865
2013-12-31 15:00:00+00:00 3.840
2013-12-31 16:00:00+00:00 3.845
2013-12-31 17:00:00+00:00 3.860
2013-12-31 18:00:00+00:00 3.8...