Skip to content

Commit

Permalink
Update bsm.py
Browse files Browse the repository at this point in the history
  • Loading branch information
jaehyukchoi committed Apr 8, 2021
1 parent 4b4b86f commit 1c525c4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pyfeng/bsm.py
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ def theta(self, strike, spot, texp, cp=1):
def impvol(self, price_in, strike, spot, texp, cp=1, setval=False):
spot = self.disp_spot(spot)
strike = self.disp_strike(strike, texp)
sigma = (1/self.beta)*super().impvol(self.beta*price_in, strike, spot, texp, cp=cp, setval=setval)
sigma = (1/self.beta)*super().impvol(self.beta*price_in, strike, spot, texp, cp=cp, setval=False)
if setval:
self.sigma = sigma
return sigma
Expand Down

0 comments on commit 1c525c4

Please sign in to comment.