GenBSImplied: Generalized Black Scholes model implied volatility

Description Usage Arguments Details

View source: R/GenBS.R

Description

Find implied volatility given the option price using the generalized Black Scholes model. "Generalized" means that the asset can have a continuous dividend yield.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
GenBSImplied(
  s,
  X,
  r,
  price,
  t,
  div_yield,
  PutOpt = FALSE,
  toler = 1e-06,
  max.iter = 100,
  convergence = 1e-08
)

Arguments

s

the spot price of the asset (the stock price for options on stocks)

X

the exercise or strike price of the option

r

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)

price

the price of the option

t

the maturity of the option in years

div_yield

the continuously compounded dividend yield (0.05 or 5e-2 for 5%) (use equiv.rate to convert to a continuously compounded rate)

PutOpt

TRUE for put options, FALSE for call options

toler

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

max.iter

passed on to newton.raphson.root

convergence

passed on to newton.raphson.root

Details

GenBSImplied calls newton.raphson.root and if that fails uniroot


jrvFinance documentation built on Nov. 5, 2021, 5:07 p.m.