[Mod]增加隐含波动率异常检验
This commit is contained in:
parent
5e03feef29
commit
6a832eac4d
@ -8,10 +8,8 @@
|
|||||||
{
|
{
|
||||||
"underlyingSymbol": "510050",
|
"underlyingSymbol": "510050",
|
||||||
"chainSymbol": "510050-1802",
|
"chainSymbol": "510050-1802",
|
||||||
"r": 0.03
|
"r": 0.04
|
||||||
}
|
},
|
||||||
],
|
|
||||||
"other": [
|
|
||||||
{
|
{
|
||||||
"underlyingSymbol": "510050",
|
"underlyingSymbol": "510050",
|
||||||
"chainSymbol": "510050-1803",
|
"chainSymbol": "510050-1803",
|
||||||
|
@ -211,8 +211,13 @@ class OmOption(OmInstrument):
|
|||||||
|
|
||||||
self.askImpv = self.calculateImpv(self.askPrice1, underlyingPrice, self.k,
|
self.askImpv = self.calculateImpv(self.askPrice1, underlyingPrice, self.k,
|
||||||
self.r, self.t, self.cp)
|
self.r, self.t, self.cp)
|
||||||
|
if self.askImpv > 1: # 正常情况下波动率不应该超过100%
|
||||||
|
self.askImpv = 0.01 # 若超过则大概率为溢出,调整为1%
|
||||||
|
|
||||||
self.bidImpv = self.calculateImpv(self.bidPrice1, underlyingPrice, self.k,
|
self.bidImpv = self.calculateImpv(self.bidPrice1, underlyingPrice, self.k,
|
||||||
self.r, self.t, self.cp)
|
self.r, self.t, self.cp)
|
||||||
|
if self.bidImpv > 1:
|
||||||
|
self.bidImpv = 0.01
|
||||||
self.midImpv = (self.askImpv + self.bidImpv) / 2
|
self.midImpv = (self.askImpv + self.bidImpv) / 2
|
||||||
|
|
||||||
#----------------------------------------------------------------------
|
#----------------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user