Description Usage Arguments Details Value Author(s) See Also
View source: R/compute_implied_volatility.R
compute_implied_volatility
returns the implied volatility of a European Option
1 2 | compute_implied_volatility(type, value, underlying, strike, maturity,
risk_free_rate = 0.01, initial_volatility_guess = 0.5)
|
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) |
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
implied volatility of a European Option (number)
John Dole <jdoleiv@gmail.com>
EuropeanOptionImpliedVolatility
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.