unexpected result from function "blsimpv"

조회 수: 5 (최근 30일)
Yu Li
Yu Li 2025년 6월 5일
답변: Aabha 2025년 6월 9일
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

답변 (1개)

Aabha
Aabha 2025년 6월 9일
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.

카테고리

Help CenterFile 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!

Translated by