CBOE_delta_K: Calculate the average strike price distance variable...

View source: R/CBOE_VIX.R

CBOE_delta_KR Documentation

Calculate the average strike price distance variable \mjseqn\Delta K_i from the CBOE VIX calculation.

Description

Following the VIX whitepaper this function calculates \mjseqn\Delta K_i as "half the difference between the strike prices on either side of \mjseqnK_i": \loadmathjax \mjsdeqn\Delta K_i := \begincases K_1 - K_0 \qquad \; \; if \; i = 0 \\\ K_N - K_N-1 \; \; \; if \; i = N \\\ \fracK_i+1 - K_i-12 \qquad \; else \endcases

Usage

CBOE_delta_K(K)

Arguments

K

A numeric vector of strike prices

Value

Returns a numeric vector giving the \mjseqn\Delta K_i variable of the CBOE VIX calculation.

Examples


library(R.MFIV)
strikes <- c(10, 12.5, c(1:10)*5 + 10, 62.5, 65)
CBOE_delta_K(K = strikes)

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