if (FALSE) {
cpairs <- dplyr::tibble(
year = c("2018", "2019", "2020","2021","2022","2023"),
first = c("@HO8H", "@HO9H", "@HO0H","@HO21H","@HO22H","@HO23H"),
second = c("@CL8H", "@CL9H", "@CL0H","@CL21H","@CL22H","@CL23H"),
expiry = c(NA,NA,NA,NA,NA,"2023-02-23")
)
chart_spreads(
cpairs = cpairs, daysFromExpiry = 200, from = "2012-01-01",
conversion = c(42, 1), feed = "CME_NymexFutures_EOD",
iuser = "x@xyz.com", ipassword = "pass",
title = "March/April ULSD Nymex Spreads",
yaxis = "$ per bbl",
output = "data"
)
}
Run the code above in your browser using DataLab