From b9d1d3cf1f24c83c2375285d55f04fafbf03a097 Mon Sep 17 00:00:00 2001 From: "vn.py" Date: Thu, 1 Feb 2018 16:44:35 +0800 Subject: [PATCH] [Fix]Close #706 --- vnpy/pricing/crr.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vnpy/pricing/crr.py b/vnpy/pricing/crr.py index ccb0b8e8..41d381c4 100644 --- a/vnpy/pricing/crr.py +++ b/vnpy/pricing/crr.py @@ -139,9 +139,9 @@ def calculateImpv(price, f, k, r, t, cp, n=15): # 检查期权价格是否满足最小价值(即到期行权价值) meet = False - if cp == 1 and (price > (f - k) * exp(-r * t)): + if cp == 1 and (price > f - k): meet = True - elif cp == -1 and (price > k * exp(-r * t) - f): + elif cp == -1 and (price > k - f): meet = True # 若不满足最小价值,则直接返回0