简体   繁体   中英

Using blpapi and xbbg to pull member holdings and weight data from Bloomberg?

Beginner Python user here. I was wondering if anyone has had any success using blpapi and xbbg to pull member holdings and constituent weight data directly into Python from Bloomberg (eg from a portfolio or ETF or index). I have a BBG license, of course.

Thank you in advance to any suggestions! Any advice is much appreciated!

This is how you get it in Excel:

=BDS("SPX Index","INDX_MWEIGHT")

The python equivalent should work

To add on to what ytoledano said you can do the below to get index constituents:

from xbbg import blp
index = "SPCPGN Index"
index_constituents = blp.bds(index,"INDX_MWEIGHT")
print(index_constituents)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM