getBars(security, eventType = "TRADE", barInterval = 60, startTime = Sys.time() - 60 * 60 * 6, endTime = Sys.time(), options = NULL, verbose = FALSE, returnAs = getOption("blpType", "matrix"), tz = Sys.getenv("TZ", unset = "UTC"), con = defaultConnection())
blpConnect
call, and retrieved via the internal function
defaultConnection
.returnAs
.
Note that the time value is adjusted: Bloomberg returns the
opening time of the bar interval, whereas financial studies
typically refer to the most recent timestamp. Therefore, if one wants
the timestamp associated with the end of the bar interval one should
add the length of the bar interval to time value returned from Bloomberg
to obtain the time at the end of the interval.
## Not run:
# getBars("ES1 Index")
# ## End(Not run)
Run the code above in your browser using DataLab