yassinemaaroufi / MibianLib

Python Options Pricing Library
http://code.mibian.net
254 stars 77 forks source link

Updated iv function #8

Closed vikramcbajaj closed 6 years ago

vikramcbajaj commented 6 years ago

Implied Volatility Calculation Time Improved for deep In The Money options and far Out of The Money option.

Case 1: Deep in the money options are traded with negative time values sometimes. Underlying Price > StrikePrice + CallPrice ImplieadVloatility function loops 10000 times to return "Low" value.

Case 2: Far Out of The Money options are traded with IV greater than 'High' value in function sometimes. ImplieadVloatility function loops 10000 times to return "High" value.

Both these cases are addressed in this edit. This improves performance a lot.