Find implied volatility given the option price using the generalized Black Scholes model. "Generalized" means that the asset can have a continuous dividend yield.
GenBSImplied(
s,
X,
r,
price,
t,
div_yield,
PutOpt = FALSE,
toler = 1e-06,
max.iter = 100,
convergence = 1e-08
)
the spot price of the asset (the stock price for options on stocks)
the exercise or strike price of the option
the continuously compounded rate of interest in decimal (0.10 or 10e-2 for 10%)
(use equiv.rate
to convert to a continuously compounded rate)
the price of the option
the maturity of the option in years
the continuously compounded dividend yield (0.05 or 5e-2 for 5%)
(use equiv.rate
to convert to a continuously compounded rate)
TRUE
for put options, FALSE
for call options
passed on to newton.raphson.root
The implied volatility is regarded as correct if the solver is able to
match the option price to within less than toler
. Otherwise the function returns NA
passed on to newton.raphson.root
passed on to newton.raphson.root
GenBSImplied
calls newton.raphson.root
and
if that fails uniroot