matthewgilbert / pdblp

pandas wrapper for Bloomberg Open API
MIT License
241 stars 68 forks source link

Question: Ensuring sequential ref() calls use same cutoff time? #78

Closed jaksiprejak closed 4 years ago

jaksiprejak commented 4 years ago

Is there a way to ensure that the return values of separate, sequential calls to ref() (or any other function for that matter), are constrained to the same "as-of" time?

Example: I load the price of two securities, with some delay between calls, and take the spread. If there is a big move before the second call, the spread will be inaccurate.

I realize a solution would be to load both securities in the same call, but I need to be able to separate out the calls so I can blindly multiprocess (I assume this is how it works in excel when you have many BDP() calls).

Thanks for you time.

matthewgilbert commented 4 years ago

This is not possible through the underlying blpapi library and hence not possible in pdblp. Loading live intraday price fields will update throughout the day. For historical data you could use bdh. For intraday prices, you could look at intraday bar data via bdib

jaksiprejak commented 4 years ago

I had not noticed the notification of your reply, apologies.

Thank you very much for replying. I had a closer look at the blpapi library and came to the same conclusion.