Calculate Black-Scholes implied volatility
Arguments
- price
(vector of) option price
- strike
(vector of) strike price
- spot
(vector of) spot price
- texp
(vector of) time to expiry
- intr
interest rate (domestic interest rate)
- divr
dividend/convenience yield (foreign interest rate)
- cp
call/put sign.
1for call,-1for put.- forward
forward price. If given,
forwardoverridesspot- df
discount factor. If given,
dfoverridesintr
References
Giner, G., & Smyth, G. K. (2016). statmod: Probability Calculations for the Inverse Gaussian Distribution. The R Journal, 8(1), 339-351. doi:10.32614/RJ-2016-024