Got a question about pulling daily historical data released at a given time. I am working stock prices of firms based in different time zones. For each day of the time series I want to pull the price of the stocks released at the same time of the day. My aim is to compare the stock price of a European security at 4pm CEST with the price of an American security at 10am EST (which corresponds to 4pm CEST, indeed).
In order to do so with Bloomberg, I need to import data and select intraday bars, as in the following example:
=BDH("ABLX BB EQUITY","OPEN","06/01/17 09:00","06/30/17 09:05","recurdaily=true","barsz=5","bartp=B")
The formula requests the data at the time specified, between 09:00 and 09:05 (in my timezone).
With the option "OPEN”
I request the data as close as possible to the start of the bar bucket, which is 09:00.
Since this is a 5-minutes time interval, I used "barsz=5"
.
By setting "bartp=B"
I request BID price.
The option "recurdaily=true"
means that I will get recursive data through days, i.e. daily data for the month of June 2017 at around 09:00am.
I have tried hard to translate this formula in R, using Rblpapi, but I couldn’t manage it. I can either get historical data with “bdh”
or bar data with “getBar”
but I wasn’t able to find a solution that provides me with the same result of the Excel formula written above.
Would anyone please help me?
The
bdh()
function does not retrieve intra-daily history.But you can try
getBars()
orgetTicks()
. The option values you have there may need some extra mapping.