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

Traceback (most recent call last):
File "c:\vnstudio\lib\site-packages\vnpy\app\cta_backtester\ui\widget.py", line 284, in process_backtesting_finished_event
self.chart.set_data(df)
File "c:\vnstudio\lib\site-packages\vnpy\app\cta_backtester\ui\widget.py", line 780, in set_data
hist, x = np.histogram(df["net_pnl"], bins="auto")
File "<__array_function__ internals>", line 6, in histogram
File "c:\vnstudio\lib\site-packages\numpy\lib\histograms.py", line 792, in histogram
bin_edges, uniform_bins = _get_bin_edges(a, bins, range, weights)
File "c:\vnstudio\lib\site-packages\numpy\lib\histograms.py", line 448, in _get_bin_edges
endpoint=True, dtype=bin_type)
File "<__array_function__ internals>", line 6, in linspace
File "c:\vnstudio\lib\site-packages\numpy\core\function_base.py", line 128, in linspace
y = _nx.arange(0, num, dtype=dt).reshape((-1,) + (1,) * ndim(delta))
ValueError: Maximum allowed size exceeded

Member
avatar
加入于:
帖子: 4622
声望: 284

可参考https://stackoverflow.com/questions/54504496/cifar10-dataset-maximum-allowed-size-exceeded-error
试一下

Member
avatar
加入于:
帖子: 13
声望: 0

xiaohe wrote:

可参考https://stackoverflow.com/questions/54504496/cifar10-dataset-maximum-allowed-size-exceeded-error
试一下
这…………搞不懂啊

Member
avatar
加入于:
帖子: 4622
声望: 284

你这个应该是溢出的问题,原帖里是matplotlib报错建议升级matplotlib,你这个是在numpy里报的,要不升级一下numpy试试看?

Member
avatar
加入于:
帖子: 13
声望: 0

xiaohe wrote:

你这个应该是溢出的问题,原帖里是matplotlib报错建议升级matplotlib,你这个是在numpy里报的,要不升级一下numpy试试看?
好的 我试试,十分感谢,运行其它策略没问题,我怀疑是我的策略有问题,但反复查验又找不出问题
另外再请问一下,做历史回测时,用print序列化输出内容为啥没有反应,在vscode输出面板中没有任何内容,这是为什么?

Member
avatar
加入于:
帖子: 4622
声望: 284

用run.py打开vnstation就可以输出了

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

沪公网安备 31011502017034号

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