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.
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.