blsimpv — Compute Black-Scholes implied volatility from observed European option prices.
blsimpv(Price,Strike,Rate,Time,Value) computes implied annualized volatility from an observed European option value under the Black-Scholes model.
Syntax
blsimpv(Price,Strike,Rate,Time,Value)How blsimpv works
- Supports scalar expansion across matching nonscalar numeric inputs.
- Name-value options include
Limit,Yield,Tolerance,Class, andMethod. Classaccepts logical values (truefor call,falsefor put), strings, character vectors, string arrays, or cell arrays containingcall/putvalues.Methodacceptssearchandjackel2016; the default isjackel2016, implemented with the same robust scalar solver but without applying callerLimit/Toleranceoverrides.- Empty optional values use their documented defaults.
- For
Method='search', if no implied volatility exists inside[0, Limit], the output isNaN.
Examples
Recover call implied volatility
Volatility = blsimpv(100, 95, 0.10, 0.25, 13.6953)Expected output:
Volatility = 0.5000Put implied volatility with yield
Volatility = blsimpv(910, 980, 0.02, 0.25, 90.4683, 'Yield', 0.025, 'Class', 'put')Expected output:
Volatility = 0.2500Using blsimpv with coding agents
Open a RunMat example with live inputs, then ask the agent to explain how blsimpv changes the result.
Run a small blsimpv example, explain the result, then change one input and compare the output.
Related Finance functions
Open-source implementation
Unlike proprietary runtimes, every RunMat function is open-source. Read exactly how blsimpv is executed, line by line, in Rust.
- View the source for blsimpv in Rust on GitHub
- Learn how the RunMat runtime works
- Found a bug? Open an issue with a minimal reproduction.
About RunMat
RunMat is an open-source runtime that executes MATLAB-syntax code blazing on any GPU. It is licensed under the Apache 2.0 license.
- RunMat automatically optimizes your math for GPU execution on Apple, Nvidia, and AMD hardware. No code changes needed. Simulations that took hours now take minutes.
- Start running code in seconds. RunMat runs in the browser, on the desktop, or from the CLI. No license server, no IT ticket.