vn.py量化社区
By Traders, For Traders.
Member
avatar
加入于:
帖子: 7
声望: 0

2019-06-05 16:00:46.687047 开始加载历史数据
2019-06-05 16:00:54.853514 历史数据加载完成,数据量:9654
Traceback (most recent call last):
File "E:\Software\vnpy\JetBrains\PyCharm Community Edition 2019.1.2\helpers\pydev\pydevd.py", line 1758, in <module>
main()
File "E:\Software\vnpy\JetBrains\PyCharm Community Edition 2019.1.2\helpers\pydev\pydevd.py", line 1752, in main
globals = debugger.run(setup['file'], None, None, is_module)
File "E:\Software\vnpy\JetBrains\PyCharm Community Edition 2019.1.2\helpers\pydev\pydevd.py", line 1147, in run
pydev_imports.execfile(file, globals, locals) # execute the script
File "E:\Software\vnpy\JetBrains\PyCharm Community Edition 2019.1.2\helpers\pydev_pydev_imps_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "D:/svn/STSTRATEGY/vnpy-2.0.3/tests/backtesting/run_ga.py", line 51, in <module>
engine.run_ga_optimization(setting)
File "D:\svn\STSTRATEGY\vnpy-2.0.3\vnpy\app\cta_strategy\backtesting.py", line 639, in run_ga_optimization
halloffame=hof
File "D:\svn\STSTRATEGY\VNConda\lib\site-packages\deap\algorithms.py", line 304, in eaMuPlusLambda
for ind, fit in zip(invalid_ind, fitnesses):
File "D:\svn\STSTRATEGY\vnpy-2.0.3\vnpy\app\cta_strategy\backtesting.py", line 1137, in ga_optimize
return _ga_optimize(tuple(parameter_values))
File "D:\svn\STSTRATEGY\vnpy-2.0.3\vnpy\app\cta_strategy\backtesting.py", line 1130, in _ga_optimize
ga_mode
File "D:\svn\STSTRATEGY\vnpy-2.0.3\vnpy\app\cta_strategy\backtesting.py", line 1104, in optimize
engine.run_backtesting()
File "D:\svn\STSTRATEGY\vnpy-2.0.3\vnpy\app\cta_strategy\backtesting.py", line 252, in run_backtesting
self.callback(data)
TypeError: 'NoneType' object is not callable

Administrator
avatar
加入于:
帖子: 1468
声望: 69

你的策略内部调用load_bar函数的时候,最后一个参数callback传了个None?应该留空

© 2015-2019 上海韦纳软件科技有限公司
备案服务号:沪ICP备18006526号-3