swapFutWeight: Commodity Calendar Month Average Swap futures weights

View source: R/swapFutWeight.R

swapFutWeightR Documentation

Commodity Calendar Month Average Swap futures weights

Description

Returns the percentage weight of the future in Calendar Month Average swaps

Usage

swapFutWeight(
  Month = "2020-09-01",
  contract = "cmewti",
  exchange = "nymex",
  output = "first.fut.weight"
)

Arguments

Month

First calendar day of the month. character

contract

Contract code in data(expiry_table). sort(unique(expiry_table$cmdty)) for options. character

exchange

Exchange code in data(holidaysOil). Currently only "nymex" and "ice" supported. character

output

Either "numDaysFut1", "numDaysFut2" or "first.fut.weight". character

Value

Depending on output setting. numeric If first.fut.weight, to compute swap 1 - first.fut.weight = % applied to 2nd line contract.

Author(s)

Philippe Cote

Examples

swapFutWeight(
  Month = "2020-09-01",
  contract = "cmewti", exchange = "nymex", output = "first.fut.weight"
)

RTL documentation built on Oct. 21, 2023, 1:06 a.m.