VeighNa量化社区
你的开源社区量化交易平台
Member
avatar
加入于:
帖子: 52
声望: 0

multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
File "D:\vnstudio\lib\multiprocessing\pool.py", line 121, in worker
result = (True, func(args, **kwds))
File "D:\vnstudio\lib\multiprocessing\pool.py", line 44, in mapstar
return list(map(
args))
File "D:\vnstudio\lib\site-packages\vnpy\trader\optimize.py", line 228, in ga_evaluate
result: dict = evaluate_func(setting)
File "D:\vnstudio\lib\site-packages\vnpy_ctastrategy\backtesting.py", line 1195, in evaluate
engine.calculate_result()
File "D:\vnstudio\lib\site-packages\vnpy_ctastrategy\backtesting.py", line 278, in calculate_result
daily_result = self.daily_results[d]
KeyError: datetime.date(2022, 2, 11)
"""

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

Traceback (most recent call last):
File "backtesting.py", line 64, in <module>
batch_optimize()
File "backtesting.py", line 52, in batch_optimize
trading_assistant.batch_optimize(trade_day)
File "D:\vnstudio\lib\site-packages\vnpy\trading\trading_assistant.py", line 553, in batch_optimize
optimize_parameters.run_groups_optimize(all_contracts_optimize)
File "D:\vnstudio\lib\site-packages\vnpy\trading\optimize_parameters.py", line 85, in run_groups_optimize
optimal_value = engine.run_ga_optimization(Optimizationsetting, output=False)
File "D:\vnstudio\lib\site-packages\vnpy_ctastrategy\backtesting.py", line 577, in run_ga_optimization
output=self.output
File "D:\vnstudio\lib\site-packages\vnpy\trader\optimize.py", line 201, in run_ga_optimization
verbose=False
File "D:\vnstudio\lib\site-packages\deap\algorithms.py", line 301, in eaMuPlusLambda
fitnesses = toolbox.map(toolbox.evaluate, invalid_ind)
File "D:\vnstudio\lib\multiprocessing\pool.py", line 290, in map
return self._map_async(func, iterable, mapstar, chunksize).get()
File "D:\vnstudio\lib\multiprocessing\pool.py", line 683, in get
raise self._value
KeyError: datetime.date(2022, 2, 11)

Member
avatar
加入于:
帖子: 387
声望: 20

trading_assistant.py这个不是官方提供的模块吧,如果是自己写的只有自己排查了

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

沪公网安备 31011502017034号

【用户协议】
【隐私政策】
【免责条款】