Code Monkey home page Code Monkey logo

implied-volatility-r-package's Introduction

Delta Lab | Twitter | LinkedIn


European Options Implied Volatilities (R Package)

This repository contains code for an R package that contains functions to compute and graph implied volatility for European Options.

  • Omar Trejo
  • September, 2016

How to use this package

1. Make sure you have devtools installed

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.

2. Install the package using GitHub

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.

3. Load the package in R

library(ImpliedVolatility)

4. Use the functions included in the pacakge

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)

Notes on RStudio

  • You can use devtools::document() to build the documentation
  • You can use CTRL/CMD + SHIFT + B in RStudio to build the package

If you want to re-build documentation everytime you build the package adjust your settings inside RStudio as follows:

  1. Click on menu: "Build" / "Configure Build Tools"
  2. Activate "Generate documentation with Roxygen"
  3. Click on "Configure"
  4. Activate "Build & Reload"
  5. Save your settings

The previous instructions work fine using:

  • RStudio version 0.99.903
  • R version 3.2.3

"We are the people we have been waiting for."

implied-volatility-r-package's People

Contributors

otrenav avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.