bdh_weekday: Wrapper for bdh with pre-built options for getting daily data...

View source: R/sat_active_risk.R

bdh_weekdayR Documentation

Wrapper for bdh with pre-built options for getting daily data for all weekdays, non-trading weekdays will have previous value

Description

Wrapper for bdh with pre-built options for getting daily data for all weekdays, non-trading weekdays will have previous value

Usage

bdh_weekday(series, field = "PX_LAST",
  start_date = as.Date("1994-01-01"), end_date = NULL,
  options_overrides = NULL)

Arguments

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

Value

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.

Examples


bdh_weekday(c("SPX Index", "STI Index"), "PX_LAST", start.date = Sys.Date() - 31)


yunching/tidymas documentation built on Feb. 5, 2023, 1:42 p.m.