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

电子眼定价
Traceback (most recent call last):
File "C:\vnstudio\lib\site-packages\vnpy-2.1.0.1-py3.7.egg\vnpy\app\option_master\ui\manager.py", line 132, in on_clicked
self.manager.start_algo_pricing(self.vt_symbol)
File "C:\vnstudio\lib\site-packages\vnpy-2.1.0.1-py3.7.egg\vnpy\app\option_master\ui\manager.py", line 412, in start_algo_pricing
self.algo_engine.start_algo_pricing(vt_symbol, params)
File "C:\vnstudio\lib\site-packages\vnpy-2.1.0.1-py3.7.egg\vnpy\app\option_master\engine.py", line 583, in start_algo_pricing
result = algo.start_pricing(params)
File "C:\vnstudio\lib\site-packages\vnpy-2.1.0.1-py3.7.egg\vnpy\app\option_master\algo.py", line 61, in start_pricing
self.calculate_price()
File "C:\vnstudio\lib\site-packages\vnpy-2.1.0.1-py3.7.egg\vnpy\app\option_master\algo.py", line 265, in calculate_price
ref_price = option.calculate_ref_price()
File "C:\vnstudio\lib\site-packages\vnpy-2.1.0.1-py3.7.egg\vnpy\app\option_master\base.py", line 221, in calculate_ref_price
self.option_type
File "binomial_tree_cython.pyx", line 77, in binomial_tree_cython.calculate_price
File "binomial_tree_cython.pyx", line 40, in binomial_tree_cython.generate_tree
ZeroDivisionError: float division

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

IO股指期权 电子眼"开始定价" 则是正常的, 不抛出这种异常.,.

Administrator
avatar
加入于:
帖子: 4191
声望: 235

330815977 wrote:

电子眼定价
Traceback (most recent call last):
File "C:\vnstudio\lib\site-packages\vnpy-2.1.0.1-py3.7.egg\vnpy\app\option_master\ui\manager.py", line 132, in on_clicked
self.manager.start_algo_pricing(self.vt_symbol)
File "C:\vnstudio\lib\site-packages\vnpy-2.1.0.1-py3.7.egg\vnpy\app\option_master\ui\manager.py", line 412, in start_algo_pricing
self.algo_engine.start_algo_pricing(vt_symbol, params)
File "C:\vnstudio\lib\site-packages\vnpy-2.1.0.1-py3.7.egg\vnpy\app\option_master\engine.py", line 583, in start_algo_pricing
result = algo.start_pricing(params)
File "C:\vnstudio\lib\site-packages\vnpy-2.1.0.1-py3.7.egg\vnpy\app\option_master\algo.py", line 61, in start_pricing
self.calculate_price()
File "C:\vnstudio\lib\site-packages\vnpy-2.1.0.1-py3.7.egg\vnpy\app\option_master\algo.py", line 265, in calculate_price
ref_price = option.calculate_ref_price()
File "C:\vnstudio\lib\site-packages\vnpy-2.1.0.1-py3.7.egg\vnpy\app\option_master\base.py", line 221, in calculate_ref_price
self.option_type
File "binomial_tree_cython.pyx", line 77, in binomial_tree_cython.calculate_price
File "binomial_tree_cython.pyx", line 40, in binomial_tree_cython.generate_tree
ZeroDivisionError: float division

请开个issue吧,我们后续来查下

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

好的, 已经提了: https://github.com/vnpy/vnpy/issues/2379

Member
加入于:
帖子: 29
声望: 0

现在哪个平台还能测试?
都没行情啊

Administrator
avatar
加入于:
帖子: 4191
声望: 235

昨天定位到了这个问题,已经在dev-portfolio-strategy分支修复,原因是NewtonRaphson算法无法收敛最后溢出了

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