Take the 2-minute tour ×
Quantitative Finance Stack Exchange is a question and answer site for finance professionals and academics. It's 100% free, no registration required.

Is there a way by which I can get a list of CIK of all registered stocks at the SEC?

share|improve this question
add comment

4 Answers

The EDGAR FTP should have all of the information you need. Here is the list from that page in text format. Keep in mind a given CIK can be associated with multiple names through time.

share|improve this answer
    
How about a CIK - Ticker mapping ? –  Jean May 31 '13 at 16:12
1  
There isn't one I'm aware of. Mappings require legwork and most who have built one aren't always readily willing to share it, especially for a universe this large. –  jeff m May 31 '13 at 20:23
add comment

As of now, I know of no good method.

The tedious part about all of this is that there is no company name standard apparent to me, as CIK company name, exchange company name, and legal company name can all be different. I have to get my hands dirty with the method I use.

I only trade options, so I download the CBOE's master list in csv and input into my database. I think the stock exchanges post something similar.

This is the tedious part: you can use the established company name to ticker search which is difficult to parse or this other search that gives everything on a given result. I use the second search.

For this, I made a simple php script that iterates through each ticker I receive from the CBOE, searching first the entire company name then each word individually, both except for words like "the", "company", "corporation", "inc", etc and dump the results into a database.

You'll see that with the "other search" there are two results: a company page if there's only result or a company list if there're multiple. Both are easy to parse.

When there's 1 result for the search with the "sanitized" entire company name, I just went with that initially and started on the ones with multiples (rare with full name search) or no results (sometimes with full name search). Over time, I have confirmed all manually.

The manual inspection never ends. Companies change names and tickers.


I will now parse with jeff m's link.

share|improve this answer
add comment

Yahoo Finance has a mapping of tickers to CIKs, which is visible on their SEC Filings pages, e.g. http://finance.yahoo.com/q/sec?s=KO+SEC+Filings

This page links to documents on EDGAR, and at the bottom of the page there is a link, "View All Filings on EDGAR Online", which contains the cik as a URL parameter:

<a href="http://www.edgar-online.com/brand/yahoo/search/?cik=21344" data-rapid_p="39">
  <strong>View All Filings on EDGAR Online</strong>
</a>

And indeed, Coca-Cola's CIK is 21344.


Incorporating pabtorre's code for easier reading:

import re
import urllib2

def get_cik(ticker):
  ''' this function uses yahoo to translate a ticker into a CIK '''
  url = "http://finance.yahoo.com/q/sec?s=%s+SEC+Filings" % (ticker)
  return int(re.findall('=[0-9]*', 
                        str(re.findall('cik=[0-9]*',
                                       urllib2.urlopen(url).read())[0]))[0][1:])

This can probably be tidied up a bit but I gave it a try and it worked.


Cerin's comment referenced a discussion thread that lead me to discover in fact you can query EDGAR directly with ticker names. it's not clear to me why this wasn't apparent before, perhaps it's a new feature. If you go to [EDGAR's Company Search][2] page you can type in a ticker and get the associated CIK and companies filings; here's the result page for KO again - even better, the data is served up as XML, making it very easy to parse.

http://www.sec.gov/cgi-bin/browse-edgar?action=getcompany&CIK=KO&count=100&output=xml

share|improve this answer
    
this can be done in python with a few lines of code. import re import urllib2 def get_cik(ticker): ''' this function uses yahoo to translate a ticker into a CIK ''' url = "http://finance.yahoo.com/q/sec?s=%s+SEC+Filings"%(ticker) return int(re.findall('=[0-9]*', str(re.findall('cik=[0-9]*', urllib2.urlopen(url).read())[0]))[0][1:]) –  pabtorre Jan 9 at 19:18
    
This can also be scraped directly from the SEC Edgar site as shown here. –  Cerin Jan 19 at 13:21
add comment

The following is a list of every CIK at the SEC:

http://www.sec.gov/edgar/NYU/cik.coleft.c

share|improve this answer
    
That link is already in a previous answer. –  chrisaycock Nov 1 '13 at 4:26
    
I found your comment useful. thank you. –  user6477 Nov 9 '13 at 23:31
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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