Learn R Programming

RTL (version 1.3.7)

swapFutWeight: 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"
)

Value

Depending on output setting. numeric

If first.fut.weight, to compute swap 1 - first.fut.weight = % applied to 2nd line contract.

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

Author

Philippe Cote

Examples

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

Run the code above in your browser using DataLab