diff --git a/vnpy/trader/app/optionMaster/etf_portfolio.json b/vnpy/trader/app/optionMaster/etf_portfolio.json index fe2ea449..8de8b975 100644 --- a/vnpy/trader/app/optionMaster/etf_portfolio.json +++ b/vnpy/trader/app/optionMaster/etf_portfolio.json @@ -8,10 +8,8 @@ { "underlyingSymbol": "510050", "chainSymbol": "510050-1802", - "r": 0.03 - } - ], - "other": [ + "r": 0.04 + }, { "underlyingSymbol": "510050", "chainSymbol": "510050-1803", diff --git a/vnpy/trader/app/optionMaster/omBase.py b/vnpy/trader/app/optionMaster/omBase.py index bf96d0b9..116b652b 100644 --- a/vnpy/trader/app/optionMaster/omBase.py +++ b/vnpy/trader/app/optionMaster/omBase.py @@ -211,8 +211,13 @@ class OmOption(OmInstrument): self.askImpv = self.calculateImpv(self.askPrice1, underlyingPrice, self.k, 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.r, self.t, self.cp) + if self.bidImpv > 1: + self.bidImpv = 0.01 self.midImpv = (self.askImpv + self.bidImpv) / 2 #----------------------------------------------------------------------