Delta Lab | Twitter | LinkedIn
This repository contains code for an R package that contains functions to compute and graph implied volatility for European Options.
install.packages(c("devtools", "roxygen2", "testthat", "knitr"))
Technically roxygen2
, testthat
, and knitr
are only required if you are
going to further develop this (or any other) package.
devtools::install_github("otrenav/implied_volatility")
NOTE: if you use yourown repository or fork this one, remember to install from your repository by changing
otrenav
to user corresponding user name.
library(ImpliedVolatility)
To see the available datasets included in the package (currently only one), execute:
data(package = "ImpliedVolatility")
If you want to use the included European Options dataset, execute:
data(european_options)
You may compute and graph the implied volatilities with:
results <- compute_and_graph_implied_volatilities(european_options)
You may also use the functions directly yourself:
implied_voltility <- compute_implied_volatilities("call", )
results <- append_implied_volatilities(european_options)
graph_implied_volatility(results)
devtools::document()
to build the documentationCTRL/CMD + SHIFT + B
in RStudio to build the packageIf you want to re-build documentation everytime you build the package adjust your settings inside RStudio as follows:
The previous instructions work fine using:
"We are the people we have been waiting for."
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.