If the value of an option, and other (model)parameters like the risk-free interest rate, the time-to-maturity, and the dividend yield are known, the assumed volatility of the underlying asset, the implied volatility can be inferred. See Hull (2022).
Implied_Volatility(
option_price,
initial_price = 100,
exercise_price = 100,
r = 0,
time_to_maturity = 1,
dividend_yield = 0,
model = "Black_Scholes",
option_type = "European",
payoff = "call",
start_volatility = 0.3,
precision = 1e-06,
max_iter = 30
)Named vector containing the values of the Greeks specified in the
parameter greek.
current price of the option
initial price of the underlying asset
strike price of the option
risk-free interest rate
time to maturity in years
dividend yield
the model to be chosen
in c("European", "American", "Geometric Asian", "Asian", "Digital") - the type of option to be considered
in c("call", "put")
initial guess
precision of the computation
maximal number of iterations of the approximation
Hull, J. C. (2022). Options, futures, and other derivatives (11th Edition). Pearson
BS_Implied_Volatility for the special case option_type = "European" and payoff in c("call", "put")
Implied_Volatility(15, r = 0.05, option_type = "Asian",
payoff = "call")
Run the code above in your browser using DataLab