Pandas wrapper for Bloomberg api? [closed]
Asked Answered
T

4

3

I'm starting to use the python api for Bloomberg and I'm wondering if anyone has written a wrapper to convert responses from Bloomberg into pandas timeseries? pybbg is a wrapper for the old COM api which I could of course extend, but want to avoid reinventing the wheel if possible.

Timaru answered 29/8, 2013 at 20:30 Comment(0)
L
2

Have a look at this one

https://code.google.com/p/pyalma/source/browse/trunk/InfoProviders/Bloomberg.py

You can request Bloomberg and return a panda,Panel object with

def bdh(sec_list, fld_list, start_date,
    end_date=dt.date.today().strftime('%Y%m%d'), periodicity='DAILY',
    verbose=False, **kwargs):
    """ Sends a historical request to Bloomberg.
    Parameters:
        sec_list: tuple or list of valid Bloomberg tickers.
        fld_list: tuple or list of valid Bloomberg fields.
        start_date: string formatted YYYYMMDD.
        end_date: string formatted YYYYMMDD (default = Today()).
        periodicity: string (default: DAILY).
        verbose: boolean to log Bloomberg response messages (default: False)
        **kwargs: any valid parameter.
    Returns a panda.Panel object.
    """

from this lib.

Landpoor answered 29/8, 2013 at 20:43 Comment(1)
Thanks - this code doesn't work directly out of the box, but is easily modifiable to call the new open API directly.Timaru
L
2

Have a look at this one too

https://github.com/kyuni22/pybbg

I made this for me since above does not work for me. It is kind of modified version of above. So if you need something work without modification, here it is.

Lakendra answered 11/2, 2014 at 14:23 Comment(2)
This link is broken.Brigitta
The link is restoredLakendra
B
2

For future reference, the package mentioned in the question has moved and is now incorporated into Tools for Analysis and Integration. It uses Pandas and has a lot of other features that may be of interest.

Brigitta answered 14/9, 2015 at 17:30 Comment(0)
D
0

This is an alternative library https://github.com/matthewgilbert/pdblp. It was inspired by pybbg but has several different features.

Disclaimer: I am the author

Devinne answered 13/7, 2016 at 9:57 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.