ls_instruments_by: Subset names of instruments

Description Usage Arguments Details Value Author(s) See Also Examples

Description

list names of instruments that have an attribute that matches some value

Usage

1
2
  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 NULL, the names of all instruments that have a what slot will be returned

pattern

only return instruments with pattern in the name

match

should pattern match names exactly?

in.slot

If the attribute you are looking for is stored inside another slot, this is the name of that slot. (usually "IB")

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

1
2
3
4
5
6
7
8
## 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)

redmode/FinancialInstrument documentation built on May 27, 2019, 4:03 a.m.