Rblp / Rblpapi

R package interfacing the Bloomberg API from https://www.bloomberglabs.com/api/
Other
166 stars 75 forks source link

GetBars Function - Time problem #272

Closed laraacrani closed 6 years ago

laraacrani commented 6 years ago

Hello, I am having an issue with the get bars function and I would appreciate some help on this. I am trying to create a data frame with the prices fo VOYA US Equity from 01/01/2018 until now 07/23/2018, with an interval of 30minutes starting at 1a.m and ending at 23p.m. I did:

Start <- make_datetime(year = 2018L, day = 1L, hour= 1L) Dataframe <- getBars(“VOYA US Equity”, barInteval = 30, startTime = start, endTime= Sys.time())

The object start is the date 01-01-2018 01:00:00. But when I click to see the dataframe it is starting on 01-08-2018 11:30:00 and it is ending by 18:00:00 instead of starting ate 1am and end at 23pm everyday. Am I doing something wrong? There is any specific reason why this is happening? Like time zone? I am from Brazil.

Thank you in advance for your help on this :)

eddelbuettel commented 6 years ago

Most likely you do not have your timezone set properly.

joel23888 commented 6 years ago

@laraacrani It could also potentially be due to the way BBG calculates bars and their intraday history limits. My experience has been the first bar in a (multi-day) intraday time series will reflect the time of the first data point. Additionally the intraday history in-principle should be around 140 calendar days but can vary. It may be that the intraday history is currently available from 1/8/2018 and the first trade was at the time you are seeing. BBG's helpdesk can provide further information.

laraacrani commented 6 years ago

Thank you for your help! I found out that we can’t see after market prices with this function. Do you know any function in Rblpapi package who can?

eddelbuettel commented 6 years ago

Sounds like a data provisioning issue with your Bloomberg. We just let you access the data ... you can access. Control is done by Bloomberg so talk to the help desk.

Shall we close this?

joel23888 commented 6 years ago

Also it may be under a different exchange code. I am not focused on US data so I am unsure, but it is worth asking the BBG helpdesk.