Description Usage Arguments Value References See Also Examples
View source: R/blackscholes_impvol.R
Calculate Black-Scholes implied volatility
1 2 3 4 5 6 7 8 9 10 11 | BlackScholesImpvol(
price,
strike = forward,
spot,
texp = 1,
intr = 0,
divr = 0,
cp = 1L,
forward = spot * exp(-divr * texp)/df,
df = exp(-intr * texp)
)
|
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. |
forward |
forward price. If given, |
df |
discount factor. If given, |
Black-Scholes implied volatility
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
1 2 3 4 5 6 7 | spot <- 100
strike <- 100
texp <- 1.2
sigma <- 0.2
intr <- 0.05
price <- 20
FER::BlackScholesImpvol(price, strike, spot, texp, intr=intr)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.