unexpected result from function "blsimpv"

5 visualizaciones (últimos 30 días)
Yu Li
Yu Li el 5 de Jun. de 2025
Respondida: Aabha el 9 de Jun. de 2025
Hi:
I use command to calculate option IV but returns nan, this particularly happen while the strike price is ITM (in the money), I read through the documentation and I believe I'm using the correct inputs. so maybe this is a bug?
blsimpv(455,385, 0.1, 7.420091324200912e-04,67,'Class',{'Call'}, 'Limit',100)*100
Thanks!
Yu

Respuestas (1)

Aabha
Aabha el 9 de Jun. de 2025
Hi @Yu Li,
I understand that you are using theblsimpv function in MATLAB to compute the implied volatility of an option, but you're getting a result of NaN. This usually happens when the inputs to the function are inconsistent or violate assumptions in the Black-Scholes model, making it impossible for the function to converge to a volatility value.
For a European call option, the intrinsic value is calculated as:
value = max(currentStockPrice - strikePrice, 0);
In this case, the minimum value of the ‘Value’ parameter should be (455 – 385) = 70, from the specified values of prices. Since the specified value parameter is less than 70 in this case, it violates the assumptions in the Black-Scholes model, leading to the ‘NaN’ result. The function provides the expected numerical result when the ‘Value’ parameter is changed as per the following:
blsimpv(455, 385, 0.1, 7.420091324200912e-04, 75, 'Class',{'Call'}, 'Limit',100) * 100
ans = 582.0327
Please refer to the following documentation link for more information about the 'blsimpv' function:
I hope this helps.

Categorías

Más información sobre Price and Analyze Financial Instruments en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by