import backtrader as bt
cerebro = bt.Cerebro()
data = bt.feeds.GenericCSVData(
dataname='data.csv',
# Do not pass values before this date
fromdate=dt.datetime(2000, 1, 1),
# Do not pass values after this date
todate=dt.datetime.now().date(),
datetime=0,
high=5,
low=6,
open=4,
close=8,
volume=10,
openinterest=-1
)
cerebro.adddata(data)
如何检查小麦数据是否正确喂食?比如打印open
和close
?如何绘制它(蜡烛)?