[Add]增加期权计算隐含波动率前对存续时间t的检查
This commit is contained in:
parent
b2fc3e5d84
commit
948f081441
@ -206,7 +206,7 @@ class OmOption(OmInstrument):
|
|||||||
def calculateOptionImpv(self):
|
def calculateOptionImpv(self):
|
||||||
"""计算隐含波动率"""
|
"""计算隐含波动率"""
|
||||||
underlyingPrice = self.underlying.midPrice
|
underlyingPrice = self.underlying.midPrice
|
||||||
if not underlyingPrice:
|
if not underlyingPrice or not self.t:
|
||||||
return
|
return
|
||||||
|
|
||||||
self.askImpv = self.calculateImpv(self.askPrice1, underlyingPrice, self.k,
|
self.askImpv = self.calculateImpv(self.askPrice1, underlyingPrice, self.k,
|
||||||
|
Loading…
Reference in New Issue
Block a user