问答交流

HFTRADE中的 数据获得

由bq6c4sxi创建,最终由bq6c4sxi 被浏览 40 用户

data.history(instr, 'close', 1, '1m') 会出现下面的错误:

02750.SZA None


我也试过data.current(instr,’close’) 也是报错,

<moduleinvoker: module name: hfbacktest, module version: v1, trackeback: AttributeError: 'NoneType' object has no attribute 'get_value'>


我也遇到同样的问题.


\

评论
  • \+1
  • 02750\.SZA None 这个标的明显错误,代码都是六位数的,是002750.SZA吗
  • 官方这个30分钟策略也是相同的报错, \---> 40 big_cycle_bar_data = {'datetime':hist.index\[-1\],'high':hist.high.max(),'open':hist.open.values\[0\],'low':hist.low.min(),'close':hist.close.values\[-1\]} 41 context.bar_series.append(big_cycle_bar_data) 42 AttributeError: 'NoneType' object has no attribute 'index'
{link}