| Type: | Package | 
| Title: | Utilizes the Black-Scholes Option Pricing Model to Perform Strategic Option Analysis and Plot Option Strategies | 
| Version: | 1.4.1 | 
| Author: | John T. Buynak [aut, cre] | 
| Maintainer: | John T. Buynak <jbuynak94@gmail.com> | 
| Description: | Utilizes the Black-Scholes-Merton option pricing model to calculate key option analytics and perform graphical analysis of various option strategies. Provides functions to calculate the option premium and option greeks of European-style options. | 
| License: | GPL-3 | 
| Encoding: | UTF-8 | 
| LazyData: | true | 
| RoxygenNote: | 6.1.1 | 
| Imports: | graphics, stats | 
| Suggests: | knitr, rmarkdown | 
| VignetteBuilder: | knitr | 
| NeedsCompilation: | no | 
| Packaged: | 2019-12-03 18:14:26 UTC; John Buynak | 
| Repository: | CRAN | 
| Date/Publication: | 2019-12-03 19:20:02 UTC | 
Call Delta
Description
Calculates the delta of the European- style call option
Usage
calldelta(s, x, sigma, t, r, d = 0)
Arguments
| s | Spot price of the underlying asset | 
| x | Strike price of the option | 
| sigma | Implied volatility of the underlying asset price, defined as the annualized standard deviation of the asset returns | 
| t | Time to maturity in years | 
| r | Annual continuously-compounded risk-free rate, use the function r.cont | 
| d | Annual continuously-compounded dividend yield, use the function r.cont | 
Details
The delta of an option can be defined as the rate of change of the option value given a $1 change in the underlying asset price.
Value
Returns the call delta
Examples
calldelta(100, 100, 0.20, (45/365), 0.02, 0.02)
Call Option Evaluation
Description
Creates a data.frame containing call option greeks; delta, gamma, vega, theta, rho and the call premium
Usage
calleval(s, x, sigma, t, r, d = 0)
Arguments
| s | Spot price of the underlying asset | 
| x | Strike price of the option | 
| sigma | Implied volatility of the underlying asset price, defined as the annualized standard deviation of the asset returns | 
| t | Time to maturity in years | 
| r | Annual continuously-compounded risk-free rate, use the function r.cont | 
| d | Annual continuously-compounded dividend yield, use the function r.cont | 
Value
Returns a data.frame containing the option premium and greeks:
- Premium 
- Delta 
- Gamma 
- Vega 
- Theta 
- Rho 
Author(s)
John T. Buynak
Examples
calleval(100, 100, 0.20, (45/365), 0.02, 0.02)
Call Option Greek
Description
Computes the selected option greek, including premium
Usage
callgreek(greek = c("delta", "gamma", "theta", "vega", "rho", "premium"),
  s, x, sigma, t, r, d = 0)
Arguments
| greek | String value, desired option greek to return | 
| s | Spot price of the underlying asset | 
| x | Strike price of the option | 
| sigma | Implied volatility of the underlying asset price, defined as the annualized standard deviation of the asset returns | 
| t | Time to maturity in years | 
| r | Annual continuously-compounded risk-free rate, use the function r.cont | 
| d | Annual continuously-compounded dividend yield, use the function r.cont | 
Value
Returns the desired option greek, including premium
Examples
callgreek("delta", 100, 100, 0.20, (45/365), 0.02, 0.02)
callgreek("gamma", 100, 100, 0.20, (45/365), 0.02, 0.02)
Call Premium
Description
Calculates the premium of a European-style call option using the Black-Scholes option pricing model
Usage
callpremium(s, x, sigma, t, r, d = 0)
Arguments
| s | Spot price of the underlying asset | 
| x | Strike price of the option | 
| sigma | Implied volatility of the underlying asset price, defined as the annualized standard deviation of the asset returns | 
| t | Time to maturity in years | 
| r | Annual continuously-compounded risk-free rate, use the function r.cont | 
| d | Annual continuously-compounded dividend yield, use the function r.cont | 
Value
Returns the value of the call option
Examples
callpremium(100, 100, 0.20, (45/365), 0.02, 0.02)
Call Rho
Description
Calculates the rho of the European- style call option
Usage
callrho(s, x, sigma, t, r, d = 0)
Arguments
| s | Spot price of the underlying asset | 
| x | Strike price of the option | 
| sigma | Implied volatility of the underlying asset price, defined as the annualized standard deviation of the asset returns | 
| t | Time to maturity in years | 
| r | Annual continuously-compounded risk-free rate, use the function r.cont | 
| d | Annual continuously-compounded dividend yield, use the function r.cont | 
Details
Rho measures the change in the option's value given a 1
Value
Returns the call rho
Examples
callrho(100, 100, 0.20, (45/365), 0.02, 0.02)
Call Theta
Description
Calculates the theta of the European- style call option
Usage
calltheta(s, x, sigma, t, r, d = 0)
Arguments
| s | Spot price of the underlying asset | 
| x | Strike price of the option | 
| sigma | Implied volatility of the underlying asset price, defined as the annualized standard deviation of the asset returns | 
| t | Time to maturity in years | 
| r | Annual continuously-compounded risk-free rate, use the function r.cont | 
| d | Annual continuously-compounded dividend yield, use the function r.cont | 
Details
Theta is the "time-decay" of the option value measured as a daily value
Value
Returns the call theta
Examples
calltheta(100, 100, 0.20, (45/365), 0.02, 0.02)
Double Vertical Spread Analytics
Description
Calculates the key analytics of a Double Vertical Credit Spread
Usage
dv(s, x1, x2, x3, x4, t, r, sigma, sigma2 = sigma, sigma3 = sigma,
  sigma4 = sigma, vol = sigma, d = 0)
Arguments
| s | Spot price of the underlying asset | 
| x1 | Strike price of the lower strike (long) put option | 
| x2 | Strike price of the higher strike (short) put option | 
| x3 | Strike price of the lower strike (short) call option | 
| x4 | Strike price of the higher strike (long) call option | 
| t | Time to expiration in years | 
| r | Annual continuously compounded risk-free rate | 
| sigma | Implied volatility of the lower strike (long) put option (annualized) | 
| sigma2 | Implied volatility of the higher strike (short) put option (annualized) | 
| sigma3 | Implied volatility of the lower strike (short) call option (annualized) | 
| sigma4 | Implied volatility of the higher strike (long) call option (annualized) | 
| vol | Manual over-ride for the volatility of the underlying asset (annualized) | 
| d | Annual continuously compounded dividend yield | 
Value
Returns a data.frame
Examples
dv(s = 100, x1 = 90, x2 = 95, x3 = 105, x4 = 110, t = 0.08, r = 0.02, sigma = 0.2, vol = 0.3)
Implied Volatility Calculation
Description
Computes the implied volatility of an option, either a call or put, given the option premium and key parameters
Usage
iv.calc(type, price, s, x, t, r, d = 0)
Arguments
| type | String argument, either "call" or "put" | 
| price | Current price of the option | 
| s | Spot price of the underlying asset | 
| x | Strike Price of the underlying asset | 
| t | Time to expiration in years | 
| r | Annual continuously compounded risk-free rate | 
| d | Annual continuously compounded dividend yield | 
Value
Returns a single option's implied volatility
Examples
iv.calc(type = "call", price = 2.93, s = 100, x = 100, t = (45/365), r = 0.02, d = 0)
Lambda
Description
Calculates the Lambda of the call or put option
Usage
lambda(type = "call", s, x, sigma, t, r, d = 0)
Arguments
| type | Character string, either "call" or "put" | 
| s | Spot price of the underlying asset | 
| x | Strike price of the option | 
| sigma | Implied volatility of the underlying asset price, defined as the annualized standard deviation of the asset returns | 
| t | Time to maturity in years | 
| r | Annual continuously-compounded risk-free rate, use the function r.cont | 
| d | Annual continuously-compounded dividend yield, use the function r.cont | 
Details
Lambda, or elasticity is the percentage change in the option valueper percentage change in the underlying price. It is a measure of leverage.
Value
Calculates the Lambda of the option contract
Examples
lambda(type = "put", s = 100, x = 100, sigma = 0.15, t = 45/365, r = 0.02)
Dual Option Evaluation
Description
Creates a data.frame containing both call and put option greeks; delta, gamma, vega, theta, rho and the option premium
Usage
opteval(s, x, sigma, t, r, d = 0)
Arguments
| s | Spot price of the underlying asset | 
| x | Strike price of the option | 
| sigma | Implied volatility of the underlying asset price, defined as the annualized standard deviation of the asset returns | 
| t | Time to maturity in years | 
| r | Annual continuously-compounded risk-free rate, use the function r.cont | 
| d | Annual continuously-compounded dividend yield, use the function r.cont | 
Value
Returns a data.frame containing the call and put option premium and greeks:
- Premium 
- Delta 
- Gamma 
- Vega 
- Theta 
- Rho 
Examples
opteval(100, 100, 0.20, (45/365), 0.02, 0.02)
Option Gamma
Description
Calculates the gamma of a European- style call and put option
Usage
optiongamma(s, x, sigma, t, r, d = 0)
Arguments
| s | Spot price of the underlying asset | 
| x | Strike price of the option | 
| sigma | Implied volatility of the underlying asset price, defined as the annualized standard deviation of the asset returns | 
| t | Time to maturity in years | 
| r | Annual continuously-compounded risk-free rate, use the function r.cont | 
| d | Annual continuously-compounded dividend yield, use the function r.cont | 
Details
Gamma is the rate of change of the option's delta given a $1 change in the underlying asset.
Value
Returns the option gamma
Examples
optiongamma(100, 100, 0.20, (45/365), 0.02, 0.02)
Option Vega
Description
Calculates the vega of a European- style call and put option
Usage
optionvega(s, x, sigma, t, r, d = 0)
Arguments
| s | Spot price of the underlying asset | 
| x | Strike price of the option | 
| sigma | Implied volatility of the underlying asset price, defined as the annualized standard deviation of the asset returns | 
| t | Time to maturity in years | 
| r | Annual continuously-compounded risk-free rate, use r.cont | 
| d | Annual continuously-compounded dividend yield, use r.cont | 
Details
Vega measures the change in the option's value given a 1
Value
Returns the option vega
Examples
optionvega(100, 100, 0.20, (45/365), 0.02, 0.02)
Plot Bear Call Spread
Description
Plot a bear call spread (credit spread)
Usage
plotbearcall(s, x1, x2, t, r, sigma, sigma2 = sigma, d = 0,
  ll = 0.75, ul = 1.25, xlab = "spot", ylab = "Profit/Loss",
  main = "Bear Call Spread", ...)
Arguments
| s | Spot price of the underlying asset | 
| x1 | Lower-strike option price (short option) | 
| x2 | Higher-strike option price (long option) | 
| t | Time to expiration in years | 
| r | Annual continuously compounded risk-free rate | 
| sigma | Annualized implied volatility of the lower-strike option | 
| sigma2 | Annualized implied volatility of the higher-strike option | 
| d | Annual continuously compounded risk-free rate | 
| ll | Lower-limit of the plot, set as (desired price/spot) | 
| ul | Upper-limit of the plot, set as (desired price/spot) | 
| xlab | X-Axis Label | 
| ylab | Y-Axis Label | 
| main | Title of the plot | 
| ... | Additional plot parameters | 
Value
Returns a plot of a vertical call spread (credit spread). Black line: The profit(loss) at expiration. Red line: The profit(loss) at (1/2) time "t" ~ half-way to expiration. Blue line: The profit(loss) at inception.
Author(s)
John T. Buynak
Examples
plotbearcall(s= 100, x1 = 95, x2 = 105, t = (45/365), r = 0.02,
sigma = 0.20, sigma2 = 0.20, d = 0, ll = 0.75, ul = 1.25)
Plot Bear Put Spread
Description
Plot a bear put spread (debit spread)
Usage
plotbearput(s, x1, x2, t, r, sigma, sigma2 = sigma, d = 0, ll = 0.75,
  ul = 1.25, xlab = "spot", ylab = "Profit/Loss",
  main = "Bear Put Spread", ...)
Arguments
| s | Spot price of the underlying asset | 
| x1 | Lower-strike option price (short option) | 
| x2 | Higher-strike option price (long option) | 
| t | Time to expiration in years | 
| r | Annual continuously compounded risk-free rate | 
| sigma | Annualized implied volatility of the lower-strike option | 
| sigma2 | Annualized implied volatility of the higher-strike option | 
| d | Annual continuously compounded risk-free rate | 
| ll | Lower-limit of the plot, set as (desired price/spot) | 
| ul | Upper-limit of the plot, set as (desired price/spot) | 
| xlab | X-Axis Label | 
| ylab | Y-Axis Label | 
| main | Title of the plot | 
| ... | Additional plot parameters | 
Value
Returns a plot of a vertical put spread (debit spread). Black line: The profit(loss) at expiration. Red line: The profit(loss) at (1/2) time "t" ~ half-way to expiration. Blue line: The profit(loss) at inception.
Author(s)
John T. Buynak
Examples
plotbearput(s= 100, x1 = 95, x2 = 105, t = (45/365), r = 0.02,
sigma = 0.20, sigma2 = 0.20, d = 0, ll = 0.75, ul = 1.25)
Plot Bull Call Spread
Description
Plot a bull call spread (debit spread)
Usage
plotbullcall(s, x1, x2, t, r, sigma, sigma2 = sigma, d = 0,
  ll = 0.75, ul = 1.25, xlab = "spot", ylab = "profit/loss",
  main = "Bull Call Spread", ...)
Arguments
| s | Spot price of the underlying asset | 
| x1 | Lower-strike option price (long option) | 
| x2 | Higher-strike option price (short option) | 
| t | Time to expiration in years | 
| r | Annual continuously compounded risk-free rate | 
| sigma | Annualized implied volatility of the lower-strike option | 
| sigma2 | Annualized implied volatility of the higher-strike option | 
| d | Annual continuously compounded risk-free rate | 
| ll | Lower-limit of the plot, set as (desired price/spot) | 
| ul | Upper-limit of the plot, set as (desired price/spot) | 
| xlab | X-Axis Label | 
| ylab | Y-Axis Label | 
| main | Title of the plot | 
| ... | Additional plot parameters | 
Value
Returns a plot of a vertical call spread (debit spread). Black line: The profit(loss) at expiration. Red line: The profit(loss) at (1/2) time "t" ~ half-way to expiration. Blue line: The profit(loss) at inception.
Author(s)
John T. Buynak
Examples
plotbullcall(s= 100, x1 = 95, x2 = 105, t = (45/365), r = 0.02,
sigma = 0.20, sigma2 = 0.20, d = 0, ll = 0.75, ul = 1.25)
Plot Bull Put Spread
Description
Plot a bull put spread (credit spread)
Usage
plotbullput(s, x1, x2, t, r, d = 0, sigma, sigma2 = sigma, ll = 0.75,
  ul = 1.25, xlab = "spot", ylab = "Profit/Loss",
  main = "Bull Put Spread", ...)
Arguments
| s | Spot price of the underlying asset | 
| x1 | Lower-strike option price (long option) | 
| x2 | Higher-strike option price (short option) | 
| t | Time to expiration in years | 
| r | Annual continuously compounded risk-free rate | 
| d | Annual continuously compounded risk-free rate | 
| sigma | Annualized implied volatility of the lower-strike option | 
| sigma2 | Annualized implied volatility of the higher-strike option | 
| ll | Lower-limit of the plot, set as (desired price/spot) | 
| ul | Upper-limit of the plot, set as (desired price/spot) | 
| xlab | X-Axis Label | 
| ylab | Y-Axis Label | 
| main | Title of the plot | 
| ... | Additional plot parameters | 
Value
Returns a plot of a vertical put spread (credit spread). Black line: The profit(loss) at expiration. Red line: The profit(loss) at (1/2) time "t" ~ half-way to expiration. Blue line: The profit(loss) at inception.
Author(s)
John T. Buynak
Examples
plotbullput(s= 100, x1 = 95, x2 = 105, t = (45/365), r = 0.02,
sigma = 0.20, sigma2 = 0.20, d = 0, ll = 0.75, ul = 1.25)
Plot Double Vertical Spread
Description
Plot a double vertical spread (credit spread)
Usage
plotdv(s, x1, x2, x3, x4, t, r, sigma, sigma2 = sigma, sigma3 = sigma,
  sigma4 = sigma, d = 0, ll = 0.75, ul = 1.25, xlab = "spot",
  ylab = "Profit/Loss", main = "Double Vertical Spread", ...)
Arguments
| s | Spot price of the underlying asset | 
| x1 | Lower-strike put option price (long option) | 
| x2 | Higher-strike put option price (short option) | 
| x3 | Lower-strike call option price (short option) | 
| x4 | Higher-strike call option price (long option) | 
| t | Time to expiration in years | 
| r | Annual continuously compounded risk-free rate | 
| sigma | Annualized implied volatility of the lower-strike put option | 
| sigma2 | Annualized implied volatility of the higher-strike put option | 
| sigma3 | Annualized implied volatility of the lower-strike call option | 
| sigma4 | Annualized implied volatility of the higher-strike call option | 
| d | Annual continuously compounded risk-free rate | 
| ll | Lower-limit of the plot, set as (desired price/spot) | 
| ul | Upper-limit of the plot, set as (desired price/spot) | 
| xlab | X-Axis Label | 
| ylab | Y-Axis Label | 
| main | Title of the plot | 
| ... | Additional plot parameters | 
Details
The double vertical spread consists of a credit put spread and a credit debit spread.
Value
Returns a plot of a double vertical spread (credit spread). Black line: The profit(loss) at expiration. Red line: The profit(loss) at (1/2) time "t" ~ half-way to expiration. Blue line: The profit(loss) at inception.
Author(s)
John T. Buynak
Examples
plotdv(s= 100, x1 = 90, x2 = 95, x3 = 105, x4 = 110, t = (45/365), r = 0.02, sigma = 0.20)
Plot Custom Vertical Spread
Description
Plot Custom Vertical Spread
Usage
plotvertical(options = c("call", "put"), s, x1, x2, t, r, sigma,
  sigma2 = sigma, d = 0, ll = 0.75, ul = 1.25, xlab = "spot",
  ylab = "profit/loss", main = "Vertical Spread", ...)
Arguments
| options | String argument, either "call" or "put" | 
| s | Spot price of the underlying asset | 
| x1 | Short strike (either higher or lower) | 
| x2 | Long strike (either higher or lower) | 
| t | Time to expiration in years | 
| r | Annual continuously compounded risk-free rate | 
| sigma | Annualized implied volatility of the short option | 
| sigma2 | Annualized implied volatility of the long option | 
| d | Annual continuously compounded dividend yield | 
| ll | Lower-limit of the plot, set as (desired price/spot) | 
| ul | Upper-limit of the plot, set as (desired price/spot) | 
| xlab | X-Axis Label | 
| ylab | Y-Axis Label | 
| main | Title of the plot | 
| ... | Additional plot parameters | 
Value
Returns a plot of a custom vertical spread. Black line: The profit(loss) at expiration. Red line: The profit(loss) at (1/2) time "t" ~ half-way to expiration. Blue line: The profit(loss) at inception.
Author(s)
John T. Buynak
Examples
plotvertical("call", 100, 90, 110, (45/365), 0.02, 0.20)
Probability Above
Description
Calculates the probability of the underlying asset value remaining above a price level in a designated time frame, given the daily standard devaiation of the underlying returns.
Usage
prob.above(spot, lower, mean = 0, asd = 0, dsd = 0, dte = 0, p,
  quantile = FALSE, tradedays = 262)
Arguments
| spot | Current price of the underlying asset | 
| lower | Lower price of the range | 
| mean | The average daily price movement, default = 0 | 
| asd | Annualized standard deviation of the underlying returns | 
| dsd | Daily standard deviation of the underlying returns (Annual vol/sqrt(256)), used as an alternative to the asd parameter in conjuction with the dte parameter | 
| dte | Days until expiration, designated time frame | 
| p | Designated probability | 
| quantile | Logical. If True, calculates the price the asset will remain above, given the designated probability | 
| tradedays | Number of trade days in a year, default = 262 | 
Details
This function has two separate possible operations: 1. Calculates the probability of the underlying asset value remaining above a price level in a designated time frame, given the daily standard devaiation of the underlying returns. 2. Calculates the price the asset will remain above, given the designated probability
Value
Returns a probability (if quantile = FALSE), Returns a data.frame (if quantile = TRUE)
Examples
prob.above(spot = 100, lower = 110, mean = 0, dsd = 0.01, dte = 45)
prob.above(spot = 100, mean = 0, dsd = 0.01, dte = 45, p = 0.75, quantile = TRUE)
Probability Below
Description
Calculates the probability of the underlying asset value remaining below a price level in a designated time frame, given the daily standard devaiation of the underlying returns.
Usage
prob.below(spot, upper, mean = 0, asd = 0, dsd = 0, dte = 0, p,
  quantile = FALSE, tradedays = 262)
Arguments
| spot | Current price of the underlying asset | 
| upper | Upper price of the range | 
| mean | The average daily price movement, default = 0 | 
| asd | Annualized standard deviation of the underlying returns | 
| dsd | Daily standard deviation of the underlying returns (Annual vol/sqrt(256)), used as an alternative to the asd parameter in conjuction with the dte parameter | 
| dte | Days until expiration, designated time frame | 
| p | Designated probability | 
| quantile | Logical. If True, calculates the price the asset will remain below, given the designated probability | 
| tradedays | Number of trade days in a year, default = 262 | 
Details
This function has two separate possible operations: 1. Calculates the probability of the underlying asset value remaining below a price level in a designated time frame, given the daily standard devaiation of the underlying returns. 2. Calculates the price the asset will remain below, given the designated probability
Value
Returns a probability (if quantile = FALSE), Returns a data.frame (if quantile = TRUE)
Examples
prob.below(spot = 100, upper = 110, mean = 0, dsd = 0.01, dte = 45)
prob.below(spot = 100, mean = 0, dsd = 0.01, dte = 45, p = 0.75, quantile = TRUE)
Probability Between
Description
Calculates the probability of the underlying asset value falling between two prices in a designated time frame, given the daily standard devaiation of the underlying returns.
Usage
prob.btwn(spot, lower, upper, asd = 0, dsd = 0, dte = 0, mean = 0,
  p, quantile = FALSE, tradedays = 262)
Arguments
| spot | Current price of the underlying asset | 
| lower | Lower price of the range | 
| upper | Upper price of the range | 
| asd | Annualized standard deviation of the underlying returns | 
| dsd | Daily standard deviation of the underlying returns (Annual vol/sqrt(256)), used as an alternative to the asd parameter in conjuction with the dte parameter | 
| dte | Days until expiration, designated time frame | 
| mean | The average daily price movement, default = 0 | 
| p | Designated probability | 
| quantile | Logical. If True, calculates the probable price range | 
| tradedays | Number of trade days in a year, default = 262 | 
Details
This function has two separate possible operations: 1. Calculates the probability of the underlying asset value falling between two prices in a designated time frame, given the daily standard devaiation of the underlying returns. 2. Calculates the probable price range, given a set probability
Value
Returns a probability (if quantile = FALSE), Returns a data.frame (if quantile = TRUE)
Examples
prob.btwn(spot = 100, lower = 90, upper = 110, mean = 0, dsd = 0.01, dte = 45)
prob.btwn(spot = 100, mean = 0, dsd = 0.01, dte = 45, p = 0.75, quantile = TRUE)
Put Delta
Description
Calculates the delta of the European- style put option
Usage
putdelta(s, x, sigma, t, r, d = 0)
Arguments
| s | Spot price of the underlying asset | 
| x | Strike price of the option | 
| sigma | Implied volatility of the underlying asset price, defined as the annualized standard deviation of the asset returns | 
| t | Time to maturity in years | 
| r | Annual continuously-compounded risk-free rate, use the function r.cont | 
| d | Annual continuously-compounded dividend yield, use the function r.cont | 
Details
The delta of an option can be defined as the rate of change of the option value given a $1 change in the underlying asset price.
Value
Returns the put delta
Examples
putdelta(100, 0.20, (45/365), 0.02, 0.02)
Put Option Evaluation
Description
Creates a data.frame containing put option greeks; delta, gamma, vega, theta, rho and the putpremium
Usage
puteval(s, x, sigma, t, r, d = 0)
Arguments
| s | Spot price of the underlying asset | 
| x | Strike price of the option | 
| sigma | Implied volatility of the underlying asset price, defined as the annualized standard deviation of the asset returns | 
| t | Time to maturity in years | 
| r | Annual continuously-compounded risk-free rate, use the function r.cont | 
| d | Annual continuously-compounded dividend yield, use the function r.cont | 
Value
Returns a data.frame containing the option premium and greeks:
- Premium 
- Delta 
- Gamma 
- Vega 
- Theta 
- Rho 
Author(s)
John T. Buynak
Examples
puteval(100, 100, 0.20, (45/365), 0.02, 0.02)
Put Option Greek
Description
Computes the selected option greek, including premium
Usage
putgreek(greek = c("delta", "gamma", "theta", "vega", "rho", "premium"),
  s, x, sigma, t, r, d = 0)
Arguments
| greek | String value, desired option greek to return | 
| s | Spot price of the underlying asset | 
| x | Strike price of the option | 
| sigma | Implied volatility of the underlying asset price, defined as the annualized standard deviation of the asset returns | 
| t | Time to maturity in years | 
| r | Annual continuously-compounded risk-free rate, use the function r.cont | 
| d | Annual continuously-compounded dividend yield, use the function r.cont | 
Value
Returns the dired option greek, including premium
Examples
putgreek("vega", 100, 100, 0.20, (45/365), 0.02, 0.02)
Put Premium
Description
Calculates the premium of a European-style put option using the Black-Scholes option pricing model
Usage
putpremium(s, x, sigma, t, r, d = 0)
Arguments
| s | Spot price of the underlying asset | 
| x | Strike price of the option | 
| sigma | Implied volatility of the underlying asset price, defined as the annualized standard deviation of the asset returns | 
| t | Time to maturity in years | 
| r | Annual continuously-compounded risk-free rate, use the function r.cont | 
| d | Annual continuously-compounded dividend yield, use the function r.cont | 
Value
Returns the value of the put option
Examples
putpremium(100, 100, 0.20, (45/365), 0.02, 0.02)
Put Rho
Description
Calculates the rho of the European- style put option
Usage
putrho(s, x, sigma, t, r, d = 0)
Arguments
| s | Spot price of the underlying asset | 
| x | Strike price of the option | 
| sigma | Implied volatility of the underlying asset price, defined as the annualized standard deviation of the asset returns | 
| t | Time to maturity in years | 
| r | Annual continuously-compounded risk-free rate, use the function r.cont | 
| d | Annual continuously-compounded dividend yield, use the function r.cont | 
Details
Rho measures the change in the option's value given a 1
Value
Returns the put rho
Examples
putrho(100, 100, 0.20, (45/365), 0.02, 0.02)
Put Theta
Description
Calculates the theta of the European- style put option
Usage
puttheta(s, x, sigma, t, r, d = 0)
Arguments
| s | Spot price of the underlying asset | 
| x | Strike price of the option | 
| sigma | Implied volatility of the underlying asset price, defined as the annualized standard deviation of the asset returns | 
| t | Time to maturity in years | 
| r | Annual continuously-compounded risk-free rate, use the function r.cont | 
| d | Annual continuously-compounded dividend yield, use the function r.cont | 
Details
Theta is the "time-decay" of the option value measured as a daily value.
Value
Returns the put theta
Examples
puttheta(100, 100, 0.20, (45/365), 0.02, 0.02)
Continuously Compounded Rate
Description
Convert a given nominal rate to a continuously compounded rate
Usage
r.cont(r, n)
Arguments
| r | nominal rate | 
| n | number of times compounded each year | 
Value
Returns a continuously compounded rate
Examples
r.cont(0.12, 2)
Time Difference
Description
Computes the difference in time between two dates
Usage
tdiff(date1, date2, period = c("days, years"))
Arguments
| date1 | Earlier date | 
| date2 | Later date | 
| period | String value, either "days", or "years" | 
Value
Returns a numeric value
Examples
tdiff("2018-01-01", "2018-06-30", "days")
Vertical Spread Analytics
Description
Calculates the key analytics of a vertical spread
Usage
vertical(options = c("call", "put"), s, x1, x2, t, r, sigma,
  sigma2 = sigma, vol = sigma, d = 0)
Arguments
| options | Character string. Either "call", or "put" | 
| s | Spot price of the underlying asset | 
| x1 | Strike price of the short option | 
| x2 | Strike price of the long option | 
| t | Time to expiration in years | 
| r | Annual continuously compounded risk-free rate | 
| sigma | Implied volatility of the short option (annualized) | 
| sigma2 | Implied volatility of the long option (annualized) | 
| vol | Manual over-ride for the volatility of the underlying asset (annualized) | 
| d | Annual continuously compounded dividend yield | 
Value
Returns a data.frame
Examples
vertical("call", s = 100, x1 = 90, x2 = 110, t = (45/365), r =  0.025, sigma = 0.20, vol = 0.25)