# NOT RUN {
# calculate forward curve for synthetic futures contracts, without prior
# date for curve calculation and contract information
tdate <- as.Date("2021-06-17")
include <- rep(TRUE, 10)
contract <- c("JUL-21", "AUG-21", "SEP-21", "OCT-21", "NOV-21", "DEC-21",
"Q1-22", "Q2-22", "Q3-22", "Q4-22")
sdate <- as.Date(c("2021-07-01", "2021-08-01", "2021-09-01", "2021-10-01",
"2021-11-01", "2021-12-01", "2022-01-01", "2022-04-01", "2022-07-01", "2022-10-01"))
edate <- as.Date(c("2021-07-30", "2021-08-31", "2021-09-30", "2021-10-31",
"2021-11-30", "2021-12-31", "2022-03-31", "2022-06-30", "2022-09-30", "2022-12-31"))
f <- c(32.55, 32.50, 32.50, 32.08, 36.88, 39.80, 39.40, 25.20, 21.15, 29.50)
fwd_curve <- msfc(tdate = tdate,
include = include,
contract = contract,
sdate = sdate,
edate = edate,
f = f)
# }
Run the code above in your browser using DataLab