make_spread_id: Construct a primary_id for a 'spread' 'instrument' from the...

Description Usage Arguments Value Author(s) See Also Examples

Description

Construct a primary_id for a spread instrument from the primary_ids of its members

Usage

1
make_spread_id(x, root = NULL, format = NULL, sep = "_")

Arguments

x

character vector of member primary_ids

root

Optional character string of root_id to use.

format

String indicating how to format the suffix_ids of the spread. If NULL (the default), or FALSE, no formatting will be done. See format_id for other accepted values for format

sep

character string to separate root_id and suffix_id

Value

character string that can be used as a primary_id for a spread instrument

Author(s)

Garrett See

See Also

spread, build_spread_symbols, build_series_symbols

Examples

1
2
3
4
ids <- c('VX_aug1','VX_U11')
make_spread_id(ids, format='CY')
make_spread_id(ids, format=FALSE)
make_spread_id(c("VIX_JAN11","VIX_FEB11"),root='VX',format='CY')

FinancialInstrument documentation built on May 2, 2019, 3:41 a.m.