2019-10-02: The community is currently in read-only mode
Pandas Data Issue
colehertz last edited by
I'm using quandl to retrieve historical stock data that is returned as a pandas data frame that I would like to add to backtrader to run a simple stock strategy. I'm able to create a PandasData feed as outlined in the Backtrader documentation and I'm able to add this data to cerebro.
The problem occurs when I run cerebro.I get this strange error at the following code statement:
tstamp = self.p.dataname.index[coldtime][self._idx]
I get a type error at this line stating that int object is not subscriptable. What could be causing this error? I've even tried setting the column numbers for the different fields (datetime, open, close, etc.) outs outlined here: https://www.backtrader.com/blog/posts/2015-08-21-pandas-datafeed/pandas-datafeed.html?highlight=pandas
Any help would be appreciated. Thanks!
A sample of the returned value would be needed. Else use the native Quandl support available in the last release. It has only been tested with the