0.32025830955048284
Kerry Back
from scipy.optimize import fsolve
def callIV(C, S, K, T, r, q=0):
return fsolve(
lambda x: C - callBS(S, K, T, x, r, q),
x0=0.3
)
C = 15
S = 100
K = 100
T = 1
r = 0.05
iv = callIV(C, S, K, T, r)
iv[0]
0.32025830955048284
153.22
contractSymbol | lastTradeDate | lastPrice | bid | ask | change | percentChange | volume | openInterest | impliedVolatility | inTheMoney | contractSize | currency | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
strike | |||||||||||||
140.0 | AAPL230421C00140000 | 2023-03-08 16:36:24+00:00 | 14.82 | 15.20 | 15.40 | 0.799999 | 5.706129 | 95 | 14898 | 0.334479 | True | REGULAR | USD |
145.0 | AAPL230421C00145000 | 2023-03-08 16:45:34+00:00 | 11.20 | 11.20 | 11.40 | 1.000000 | 9.803922 | 257 | 11747 | 0.310432 | True | REGULAR | USD |
150.0 | AAPL230421C00150000 | 2023-03-08 16:50:30+00:00 | 8.00 | 8.00 | 8.05 | 1.050000 | 15.107916 | 509 | 32189 | 0.297370 | True | REGULAR | USD |
155.0 | AAPL230421C00155000 | 2023-03-08 16:50:17+00:00 | 5.15 | 5.05 | 5.10 | 0.850000 | 19.767439 | 3199 | 46486 | 0.275703 | False | REGULAR | USD |
160.0 | AAPL230421C00160000 | 2023-03-08 16:50:01+00:00 | 2.92 | 2.91 | 2.93 | 0.550000 | 23.206760 | 1686 | 44386 | 0.259529 | False | REGULAR | USD |
165.0 | AAPL230421C00165000 | 2023-03-08 16:49:14+00:00 | 1.46 | 1.44 | 1.45 | 0.300000 | 25.862078 | 918 | 33471 | 0.243538 | False | REGULAR | USD |
170.0 | AAPL230421C00170000 | 2023-03-08 16:50:01+00:00 | 0.66 | 0.67 | 0.67 | 0.140000 | 26.923088 | 457 | 43256 | 0.236092 | False | REGULAR | USD |
Call IV | Put IV | |
---|---|---|
strike | ||
140.0 | 0.334479 | 0.280036 |
145.0 | 0.310432 | 0.264045 |
150.0 | 0.297370 | 0.247444 |
155.0 | 0.275703 | 0.232063 |
160.0 | 0.259529 | 0.222359 |
165.0 | 0.243538 | 0.209969 |
170.0 | 0.236092 | 0.160653 |
Call IV | Put IV | |
---|---|---|
strike | ||
165.00 | 0.694339 | 0.636722 |
166.67 | 0.675723 | 0.632694 |
170.00 | 0.678226 | 0.618534 |
175.00 | 0.668949 | 0.612858 |
180.00 | 0.659671 | 0.601078 |
183.33 | 0.652347 | 0.604923 |
185.00 | 0.651127 | 0.591313 |
190.00 | 0.645389 | 0.582341 |
191.67 | 0.642215 | 0.581059 |
195.00 | 0.637760 | 0.576420 |