Compute the implied volatility in a Black and Scholes framework. The function computes the volatility by equating the theoretical value of an option (with both constant riskless interest rate and volatility) to its market value.
[sigmaC,sigmaP]=bsimpvol(option,S,K,r,T,sigma0);
Compute the Black and Scholes implied volatility
the market price of an option (either put or call)
current price of the underlying asset
strike price of the option
implicit volatility of a call option; the function writes "Call: good convergence" if the solver finds a good value for the implicit volatility, instead it writes "Call: bad convergence"
We assume that an option (eithe call or put) is worth 1.09 euros on the market. It is written on an asset whose value is 25 euros, with a strike price of 25 euros. If the (annual) riskless interest rate is 0.001 and the time to maturity is 3 months, then the implicit volatility is computed with the following command.
-->[sigmaC,sigmaP]=bsimpvol(1.09,25,25,0.001,3/12,0.1)
Call: good convergence
Put: good convergence
sigmaP = 0.2193413
sigmaC = 0.2180861
Francesco Menoncin - Brescia University - 2010