ls_instruments_by {FinancialInstrument} | R Documentation |
Subset names of instruments
Description
list names of instruments that have an attribute that matches some value
Usage
ls_instruments_by(what, value, in.slot = NULL, pattern = NULL,
match = TRUE)
Arguments
what |
What attribute? (e.g. “currency”, “type”, “strike”, etc.) |
value |
What value must the attribute have? (e.g. “EUR”,
“option”, 100, etc.). If missing or |
in.slot |
If the attribute you are looking for is stored inside another slot, this is the name of that slot. (usually "IB") |
pattern |
only return instruments with |
match |
should pattern match names exactly? |
Details
list instruments that have a given attribute level with a given value.
Value
chr vector of instrument names
Author(s)
Garrett See
See Also
buildHierarchy, instrument.table, ls_instruments
Examples
## Not run:
stock(c("GOOG","INTC"),currency("USD"))
synthetic("SnP","USD",src=list(name='^GSPC',src='yahoo'))
ls_instruments_by('type','stock')
ls_instruments_by("name",NULL,in.slot='src')
ls_instruments_by('src',NULL)
## End(Not run)
[Package FinancialInstrument version 1.3.1 Index]