View source: R/sat_active_risk.R
bdh_weekday | R Documentation |
Wrapper for bdh with pre-built options for getting daily data for all weekdays, non-trading weekdays will have previous value
bdh_weekday(series, field = "PX_LAST", start_date = as.Date("1994-01-01"), end_date = NULL, options_overrides = NULL)
series |
A dataframe containing multiple securities with column names 'ticker' and optional 'name' |
field |
A character vector with Bloomberg query fields. |
start_date |
A Date variable with the query start date. |
end_date |
An optional Date variable with the query end date; if omitted the most recent available date is used. |
options_overrides |
A list containing any additional options besides those to get weekdays |
A list with as a many entries as there are entries in securities; each list contains a data.frame with one row per observations and as many columns as entries in fields. If the list is of length one, it is collapsed into a single data frame. Note that the order of securities returned is determined by the backend and may be different from the order of securities in the securities field.
bdh_weekday(c("SPX Index", "STI Index"), "PX_LAST", start.date = Sys.Date() - 31)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.