greeks: Calculate Option Values and Common Risk Sensitivities...

Description Usage Arguments Details Value Note Author(s) References Examples

View source: R/greeks.R

Description

Black-Scholes calculation of call and put values, given standard inputs. Also calculates 14 risk sensitivities, commonly referred to as ‘Greeks’.

Usage

1
greeks(S, X, b, r, Time, v)

Arguments

S

Underlying stock price

X

Strike price

b

Dividend rate

r

Risk-free rate

Time

Time remaining until expiry

v

Estimated volatility

Details

Provides a fast and vectorized way to calculate option prices and all associated greeks. To accomplish this the standard Black-Scholes formula is used, along with formulas for invididual greek values. Both call and put values are calculated, and returned in a list of two lists - one for call values and one for put values.

The function returns a list of fifteen values for each type of contract, calls or puts. These values are described below.

The estimated ‘value’, via Black-Scholes.

‘delta’ measures the change of an option value with respect to changes in the underlying price.

‘gamma’ measures the rate of change in delta with respect to the changes in the underlying price.

‘vega’ measures the sensitivity to volatility changes.

‘theta’ measures the sensitivity to the passage of time, or time-decay.

‘rho’ measures the sensitivity to the applicable interest rate.

‘vanna’ measures sensitivity of option delta with respect to changes in volatility.

‘charm’ measures the delta decay - or the change of delta over time.

‘zomma’ measures gamma change with respect to changes in volatility.

‘speed’ measures gamma change with respect to changes in the underlying.

‘colour’ measures gamma decay.

‘DvegaDtime’ measures the change in ‘vega’ with respect to time.

‘vomma’, also known as vega convexity or volga, measures vega change with respect to changes in volatility.

‘dualdelta’ is the first derivative of the option price with respect to strike - also used as the probablility of the option finishing in the money.

Value

A named list containing two named lists: one for calls and one for puts.

Note

The precision of Black-Scholes pricing isn't the reason for using it, rather it is the speed at which values as well as approximate greeks can be estimated for a range of inputs.

Author(s)

Jeffrey A. Ryan

References

http://en.wikipedia.org/wiki/Greeks_(finance)

Examples

1
2
3
4
5
6
greeks(51.03, # underlying price
       55,    # strike
       0,     # dividend rate
       0,     # risk-free rate
       25/360,# time remaining
       0.5)   # volatility estimate

joshuaulrich/greeks documentation built on May 19, 2019, 8:54 p.m.