Hi ALPACA team,
Since Polygon is no longer available I am resorting back to alpaca bar set for historic data.
However I have encountered an annoying problem when downloading historic data for multiple assets.
Say assets are [‘A’, ‘PFF’],
api.get_barset(['A','PFF'], 'day', limit=None).df
Returns following
A ... PFF
open high ... close volume
time ...
2020-10-02 00:00:00-04:00 NaN NaN ... 36.490 8297815.0
2020-10-05 00:00:00-04:00 100.99 103.4600 ... 36.730 5825401.0
2020-10-06 00:00:00-04:00 103.12 103.3300 ... 36.775 13036632.0
2020-10-07 00:00:00-04:00 102.47 104.7500 ... 36.930 5146187.0
2020-10-08 00:00:00-04:00 104.20 104.3900 ... 37.010 7018194.0
... ... ... ... ...
2021-02-22 00:00:00-05:00 125.95 126.1600 ... 37.535 6197263.0
2021-02-23 00:00:00-05:00 123.51 123.5100 ... 37.510 4757245.0
2021-02-24 00:00:00-05:00 122.26 125.4100 ... 37.440 6439420.0
2021-02-25 00:00:00-05:00 124.81 125.2500 ... 37.150 9318772.0
2021-02-26 00:00:00-05:00 122.93 123.5094 ... 37.370 11018438.0
[101 rows x 10 columns]
NaN is due the fact that PFF misses one entry on 2020-11-16. Hence the return has 101 rows and NaN entry for asset ‘A’ as well for 2020-10-02. I know i can fix this at my end but really guys, if Alpaca data is premium now ($49/month Wow BTW!), why not fix it when bar set is called.
Why is there a NaN entry on 2020-11-16? Usually this should be last closing day entry if the asset did not trade on the day.
Looking forward to a reply from alpaca team.