unexpected result from function "blsimpv"
6 次查看(过去 30 天)
显示 更早的评论
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
0 个评论
回答(1 个)
Aabha
2025-6-9
I understand that you are using the ‘blsimpv’ 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
Please refer to the following documentation link for more information about the 'blsimpv' function:
I hope this helps.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Price and Analyze Financial Instruments 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!