compute_implied_volatility: Compute European Option Implied Volatility

Description Usage Arguments Details Value Author(s) See Also

View source: R/compute_implied_volatility.R

Description

compute_implied_volatility returns the implied volatility of a European Option

Usage

1
2
compute_implied_volatility(type, value, underlying, strike, maturity,
  risk_free_rate = 0.01, initial_volatility_guess = 0.5)

Arguments

type

One of the two values: 'call' or 'put' (string)

value

Value of the option (number)

underlying

Current price of the underlying (number)

strike

Strike price of the option (number)

maturity

Time to maturity in fractional years (number)

risk_free_rate

Risk-free rate (number, default: 0.01)

initial_volatility_guess

Initial guess for the volatility (number, default: 0.5)

Details

This function is a wrapper around the EuropeanOptionImpliedVolatility function from the RQUantLib package. This function is used internally, in this package, to compute a dataframe with implied volatitilies for each row.

TODO: Model/financial restrictions on the parameters should be made clear here...

The EuropeanOptionImpliedVolatility function asks for a dividend_yield which we assume to be 0 as this is not a stock.

Fore more information about RQuantLib: https://cran.r-project.org/web/packages/RQuantLib/RQuantLib.pdf

For more information about QuantLib: http://quantlib.org/index.shtml

Value

implied volatility of a European Option (number)

Author(s)

John Dole <jdoleiv@gmail.com>

See Also

EuropeanOptionImpliedVolatility


otrenav/implied-volatility-r-package documentation built on Dec. 31, 2020, 1:10 a.m.