问答交流

滚动训练报错:'market_cap'

由mymdeep创建,最终由mymdeep 被浏览 24 用户

During handling of the above exception, another exception occurred:

KeyError: 'market_cap'

During handling of the above exception, another exception occurred:

KeyError: 'market_cap'

The above exception was the direct cause of the following exception:

pandas.core.computation.ops.UndefinedVariableError: name 'market_cap' is not defined

{w:100}

{w:100}滚动训练的错误非常不好调试,出错了也看不出来,这块是否有日志输出功能?没有错误堆栈,很难确认问题

https://bigquant.com/experimentshare/aa68936e44c44fdc9d1011a78907ac3e

\

评论
  • 你的策略并不完整,缺失了不少模块 ,可以参考滚动训练的示例: 我们的建议是:你先实现一个单独能跑通的策略,然后再拖入滚动训练模块,该模块的代码是开源的,你需要直接按需求调整,毕竟每个人的策略模块名都不一样
{link}