【平台使用】3.0平台的历史数据问题,运行代码就发现history只能看2个记录,不能看11个记录
由csowen创建,最终由yzhzheng2 被浏览 35 用户
https://bigquant.com/codesharev3/c75cc1ed-24f3-4f97-893d-f2fe55a98adb
\
评论
- [2025-02-07 14:16:04] INFO: 2015-01-05, 2015-12-31, , equity, instruments=2789
- [2025-02-07 14:16:05] INFO: bigtrader module V2.2.0
- [2025-02-07 14:16:05] INFO: bigtrader engine v1.10.10 2024-12-25
- owen-view
- owen-view-cash portfolio_value 3000000.1 cash 3000000.1
- start
- ranker data
- current stock hold 0
- buy_instruments 2258
- 002306.SZ Equity(191 [002306.SZ]) debug
- lsit 2
- 您可以去社区论坛问答交流板块反馈咨询
- return self._values[key]
- ~~~~~~~~~~~~^^^^^
- IndexError: index -11 is out of bounds for axis 0 with size 2 最终是这个错误, 3.0平台,这个data.history 函数有问题啊。我已经查询 11天历史,执行结果只有2天,不是你们bug吗?
- ranker data
- current stock hold 0
- buy_instruments 2258
- 002306.SZ Equity(191 [002306.SZ]) debug
- lsit 2
- 您可以去社区论坛问答交流板块反馈咨询
- 查看一下那天实际交易了多少只票,如果过滤条件过多或者一些情况下,可能有些票买不进去,所以history就没那么多,并不是设置了固定值就可以买固定值数量的票。所以会报错。先确定已经买了多少只票。
- 我的过滤条件就是要看history啊, 2.0平台支持看,我设置11,就可以向后看11天啊。