Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/bdh char #267

Merged
merged 2 commits into from Jun 27, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 7 additions & 2 deletions R/bdh.R
Expand Up @@ -66,6 +66,10 @@
##' bdh("SPY US Equity", c("PX_LAST", "VOLUME"),
##' start.date=Sys.Date()-31*6, options=opt)
##'
##' ## example for non-date start
##' bdh("SPY US Equity", c("PX_LAST", "VOLUME"),
##' start.date="-6CM", options=opt)
##'
##' ## example for options and overrides
##' opt <- c("periodicitySelection" = "QUARTERLY")
##' ovrd <- c("BEST_FPERIOD_OVERRIDE"="1GQ")
Expand All @@ -76,8 +80,9 @@ bdh <- function(securities, fields, start.date, end.date=NULL,
include.non.trading.days=FALSE, options=NULL, overrides=NULL,
verbose=FALSE, identity=NULL, con=defaultConnection(),
int.as.double=getOption("blpIntAsDouble", FALSE)) {
if (!class(start.date) == "Date") stop("start.date must be a Date object", call.=FALSE)
start.date <- format(start.date, format="%Y%m%d")
if (class(start.date) == "Date") {
start.date <- format(start.date, format="%Y%m%d")
}
if (!is.null(end.date)) {
end.date <- format(end.date, format="%Y%m%d")
}
Expand Down
4 changes: 4 additions & 0 deletions man/bdh.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 9 additions & 2 deletions man/blpAuthenticate.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions man/blpConnect.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.