make_spread_id {FinancialInstrument} | R Documentation |
Construct a primary_id for a spread
instrument
from the
primary_ids of its members
Description
Construct a primary_id for a spread
instrument
from the
primary_ids of its members
Usage
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 |
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
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')
[Package FinancialInstrument version 1.3.1 Index]