vollib / py_vollib

MIT License
308 stars 68 forks source link

Dealing with deep in-the-money index option #18

Closed TNightV closed 1 year ago

TNightV commented 2 years ago

I am trying to get the implied volatility of SP500 options under deep in-the-money condition.

It returns "below intrinsic value".

I am aware the traditional method of calculating implied volatility would fail when it is deep in the money, while jaeckel's method improves the calculation.

So, I wanna know if it is my code's problem or it is the problem with the data of deep strikes.

implied_volatility(1529.75, 4127.83, 2600, 133/252, 0.01, "c")

lbrichards commented 1 year ago

It seems from context that you are using black-scholes iv. The reason for the exception is that when K= 2600 and F=~4149.67, a call price of 1529.75 is well below the intrinsic value of ~1549.67. In general, IV is undefined for option prices below intrinsic, especially for calls. (European puts can have negative time value, but not calls) Note that internally we are converting to F, the forward price, in order to use Black, although your input for black-scholes is S, the spot price.