CBOE_interpolation_terms: Determine the expiration "term" used in the linear...

CBOE_interpolation_termsR Documentation

Determine the expiration "term" used in the linear interpolation of the CBOE VIX

Description

Provide either maturity or date_t and date_exp

This function determines the interpolation terms used for the VIX. It provides terms for the two different interpolation techniques used by the CBOE:

Both methods rely on a "near-term" and a "next-term" contract.

Usage

CBOE_interpolation_terms(maturity, date_t, date_exp, method)

Arguments

maturity

numeric scalar giving the time to maturity \mjseqnT in years

date_t

(For the monthly method) date scalar giving the date of the option quotation

date_exp

(For the monthly method) date scalar giving the date of the option expiration

method

A string scalar, either "weekly" or "monthly" for the respective method.

Value

Returns a numeric scalar: 1 for the "near-term" and 2 for the "next-term". If the maturity doesn't fall inside either category, NA is returned.

Examples


library(R.MFIV)

## Weekly method
CBOE_interpolation_terms(25/365, method = "weekly")

## Monthly method
t <- lubridate::ymd("2020-01-02")
exp <- lubridate::ymd("2020-02-21")
CBOE_interpolation_terms(date_t = t, date_exp = exp, method = "monthly")


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