option_descriptives: Calculate descriptive variables for a nest of option quotes

View source: R/general.R

option_descriptivesR Documentation

Calculate descriptive variables for a nest of option quotes

Description

Calculate descriptive variables for a nest of option quotes

Usage

option_descriptives(option_quotes, K_0, R, price, maturity)

Arguments

option_quotes

A data.table or "nest" of option quotes with three columns:

  • K (numeric) - strike price in ascending order

  • c (numeric) - call option price

  • p (numeric) - put option price

K_0

numeric scalar, giving the theoretical at-the-money strike price (see CBOE_K_0)

R

numeric scalar giving the risk-free rate \mjseqnR corresponding to the maturity \mjseqnT in decimal

price

numeric scalar giving the underlying stock price.

maturity

numeric scalar giving the time to maturity \mjseqnT in years

Value

Returns a list with the following variables:

  • SD (numeric)- the Black Merton Scholes implied volatility for the at-the money call (using GBSVolatility from fOptions)

  • max_K (numeric) - highest strike price for out-of-the-money calls

  • min_K (numeric) - lowest strike price for out-of-the-money puts

  • mean_delta_K (numeric) - average distance between strike prices

  • n_put (numeric) - number of out-of-the money puts

  • n_call (numeric) - number of out-of-the money calls

Examples


library(R.MFIV)

nest <- option_dataset$option_quotes[[1]]

option_descriptives(option_quotes = nest,
                   K_0 = 147,
                   R = 0.005,
                   price = 147,
                   maturity = 0.07)


m-g-h/R.MFIV documentation built on July 4, 2022, 3:35 a.m.