Learn R Programming

RTL (version 0.1.6)

swapInfo: swapInfo

Description

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

Usage

swapInfo(
  date = "2020-05-06",
  feeds = dplyr::tibble(feed = c("Crb_Futures_Price_Volume_And_Open_Interest",
    "CME_NymexFutures_EOD_continuous"), ticker = c("CL", "CL_001_Month")),
  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.

feeds

Feeds for Morningstar getCurve() and getPrice().

contract

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

exchange

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

iuser

Morningstar user name as character - sourced locally in examples.

ipassword

Morningstar user password as character - sourced locally in examples.

output

"chart" or "all"

Value

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

Examples

Run this code
# NOT RUN {
feeds = dplyr::tibble(feed = c("Crb_Futures_Price_Volume_And_Open_Interest",
                              "CME_NymexFutures_EOD_continuous"),
                     ticker = c("CL","CL_001_Month"))
swapInfo(date = "2020-05-06",feeds = feeds, contract = "cmewti",exchange = "nymex",
                    iuser = "x@xyz.com", ipassword = "pass", output = "all")
# }

Run the code above in your browser using DataLab