swapInfo {RTL}R Documentation

Commodity Swap details to learn their pricing

Description

Returns dataframe required to price a WTI averaging instrument based on first line settlements.

Usage

swapInfo(
  date = "2023-08-24",
  feed = "CME_NymexFutures_EOD_continuous",
  ticker = "CL",
  contract = "cmewti",
  exchange = "nymex",
  iuser = "x@xyz.com",
  ipassword = "pass",
  output = "all"
)

Arguments

date

Character date as of which you want to extract daily settlement and forward values. character

feed

Feeds for Morningstar getCurve() and getPrice(). character

ticker

Nymex contract code. character

contract

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

exchange

Exchange code in data(holidaysOil). Defaults to "nymex". character

iuser

Morningstar user name as character - sourced locally in examples. character

ipassword

Morningstar user password as character - sourced locally in examples. character

output

"chart" or "all". character

Value

Plot or a list of data frame and plot if output = "all". htmlwidget or list

Author(s)

Philippe Cote

Examples

## Not run: 
swapInfo(
  date = "2020-05-06", feed = "CME_NymexFutures_EOD_continuous",
  ticker = "CL",
  contract = "cmewti", exchange = "nymex",
  iuser = "x@xyz.com", ipassword = "pass", output = "all"
)

## End(Not run)


[Package RTL version 1.3.5 Index]