powered by
Calculate Black-Scholes option price
BlackScholesPrice( strike = forward, spot, texp = 1, sigma, intr = 0, divr = 0, cp = 1L, forward = spot * exp(-divr * texp)/df, df = exp(-intr * texp) )
(vector of) strike price
(vector of) spot price
(vector of) time to expiry
(vector of) volatility
interest rate (domestic interest rate)
dividend/convenience yield (foreign interest rate)
call/put sign. 1 for call, -1 for put.
1
-1
forward price. If given, forward overrides spot
forward
spot
discount factor. If given, df overrides intr
df
intr
option price
Black, F., & Scholes, M. (1973). The Pricing of Options and Corporate Liabilities. Journal of Political Economy, 81(3), 637-654. 10.1086/260062
Black, F. (1976). The pricing of commodity contracts. Journal of Financial Economics, 3(1), 167-179. 10.1016/0304-405X(76)90024-6
https://en.wikipedia.org/wiki/Black-Scholes_model
BlackScholesImpvol
# NOT RUN { spot <- 100 strike <- seq(80,125,5) texp <- 1.2 sigma <- 0.2 intr <- 0.05 FER::BlackScholesPrice(strike, spot, texp, sigma, intr=intr) # }
Run the code above in your browser using DataLab