As part of a research project I ran a query on the Mergent FISD database using the WRDS website. The output included the CUSIPs of numerous bond issues (>10000). I am using this data to run event studies and I need to obtain the CUSIP of the stock of the company that issued the bonds. Since I have over 10000 data points, I need to automate this conversion or lookup process. Any programming language or method would be fine with me in this situation.
You can use this website here: http://activequote.fidelity.com/mmnet/SymLookup.phtml
I would recommend using a simple data manipulation language such as Python in order to solve your problem. You would need to write a code that read the webpage for specific CUSIP numbers and then find the specific portion of the HTML file that will contain the name of the company and pull that information out of the webpage.
For instance, in order to look up the CUSIP of 037833100, you will get the corresponding URL: http://activequote.fidelity.com/mmnet/SymLookup.phtml?reqforlookup=REQUESTFORLOOKUP&productid=mmnet&isLoggedIn=mmnet&rows=50&for=stock&by=cusip&criteria=037833100&submit=Search
Now your Python program could manipulate the URL by inserting different numbers for the criteria portion and then read the page and pull out the name of the company.
Here's some Python code you would use to get a specific stock:
import urllib2 data = urllib2.urlopen('http://activequote.fidelity.com/mmnet/SymLookup.phtml?reqforlookup=REQUESTFORLOOKUP&productid=mmnet&isLoggedIn=mmnet&rows=50&for=bond&by=cusip&criteria=CUSIPNUMBERGOESHERE&submit=Search') data_string = data.read() start = data_string.find("<tr><td height=\"20\" nowrap><font class=\"smallfont\">") end = data_string[start:].find("</font>") companyName = data_string[start:][51:end]
if you have access to a Bloomberg terminal, you could use this function in Excel:
=BDP("013926500 CORP","BOND To EQY TICKER")
013926500 is the CUSIP for ABB
It is very easy to automate Bloomberg / Excel functions and a quick Google should show you decent examples. Also Bloomberg terminals carry several such example APIs that should help you automate the download.