1
$\begingroup$

I would like to use Python to programmatically find the cusips of all bonds that are currently issued by a given equity. Assume I can use any free api and bloomberg. Thank you!

$\endgroup$
2
$\begingroup$

Bloomberg has a Python interface, so this sort of thing is much easier than it used to be when you had to encapsulate the COM or C++ interface. First, set up a session as in the Bloomberg documentation, then form a request

refDataService = session.getService("//blp/refdata")
request = refDataService.createRequest("ReferenceDataRequest")

Now set up your data request

request.append("securities", "IBM US Equity")
request.append("fields", "BOND_CHAIN")

send the request and wait for the response event. Iterate over the (single security) and (single) field and you will have an iterable of Bloomberg identifiers for the bonds

$\endgroup$
1
$\begingroup$

Probably a lot easier to use the Bloomberg add-ins in excel, write a macro to cycle the equities your looking for and retrieve the associated CUSIPs.

$\endgroup$
  • 2
    $\begingroup$ Given that there's a python bbg api, and they want to use python, why on earth would you say "probably a lot easier to use excel"? $\endgroup$ – will Sep 30 '16 at 12:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.