powered by
show names of or remove instruments that expire on a given date
ls_by_expiry(expiry, pattern = NULL, match = TRUE)rm_by_expiry(x, expiry)
rm_by_expiry(x, expiry)
expiration date that should correspond to the ‘expires’ field of an instrument
an optional regular expression. Only names matching ‘pattern’ are returned.
exact match of pattern?
what to remove
ls_by_expiry gives a vector of names of instruments that expire on the given expiry. rm_by_expiry is called for its side-effect.
ls_by_expiry
rm_by_expiry
ls_by_expiry will find instruments that have a field named either “expiry” or “expires” with a value that matches expiry.
expiry
ls_instruments, ls_options, ls_calls, ls_puts, ls_futures, ls_derivatives
ls_instruments
ls_options
ls_calls
ls_puts
ls_futures
ls_derivatives
# NOT RUN { # } # NOT RUN { ls_by_expiry('20110917') ls_by_expiry('20110917',ls_options()) # }
Run the code above in your browser using DataLab