future_id: Create future_series ids

Description Usage Arguments Value Author(s) See Also Examples

View source: R/define_futures.R

Description

Create a vector of future_series ids.

Usage

1
future_id(root, month, year, format = "CYY", sep = "_")

Arguments

root

character vector of names of contract roots

month

numeric vector of months (3 letter abbreviations also work)

year

numeric vector of years

format

character string indicating how the id should be formatted. See format_id

sep

character that will separate root_id and suffix_id

Value

character vector of primary_ids for future_series instruments, OR, if root is missing, a character vector of suffix_ids.

Author(s)

Garrett See

See Also

format_id and parse_suffix for examples of id formats.

Examples

1
2
3
4
future_id(root=c("ES","YM"), month=c(3,6,9,12), year=2010:2011)
#getSymbols(future_id("VX",1:12,10:11),src='cfe')
future_id('VX',M2C(),10)
#future_id('VX',paste(M2C(),collapse=','),10)

twsInstrument documentation built on May 2, 2019, 5:24 p.m.