Quantitative Finance Stack Exchange is a question and answer site for finance professionals and academics. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Does anyone know where I can find a list of all stocks traded on the NYSE in a table that also includes what sector they are in? I want to look at some data using info both from the individual stock and from the sector but I cannot find a comprehensive list containing both pieces of information.

share|improve this question

I just ran the Mathematica code below to make a list of stocks and sectors you can access here:


Mathematica uses curated data from Yahoo. Items that lack sector information have been omitted. The list may be incomplete but it might provide something for you to work with.

members = FinancialData["NYSE", "Members"];
names = If[SameQ[Head[#], FinancialData], "-", #] &@
     FinancialData[#, "Name"] & /@ members;
companies = If[SameQ[Head[#], FinancialData], "-", #] &@
     FinancialData[#, "Company"] & /@ members;
sectors = If[SameQ[Head[#], FinancialData], "-", #] &@
     FinancialData[#, "Sector"] & /@ members;
data = Transpose[{members, names, companies, sectors}];
data2 = DeleteCases[data, {_, _, _, Missing["NotAvailable"] | "-"}];
data3 = SortBy[data2, Last];
  Prepend[data3, {"Symbol", "Name", "Company", "Sector"}]];
share|improve this answer

Your best bet is to use the stock screener over at FINVIZ. You can limit the results to NYSE listed stocks and can easily export to CSV using the "export" link at the bottom right of the table.

Bear in mind, industry/sector classifications are no uniform. You'll find different classification methods depending on where you look.

share|improve this answer

As @Louis said, from Finviz's stock screener you can filter by exchange and sort column by sector.

>>> import urllib2 
>>> url = "http://www.finviz.com/export.ashx?v=111&f=exch_nyse&o=sector"
>>> file = open("tickers.txt",'wb')
>>> data = urllib2.urlopen(url).readlines()
>>> for l in data:
... file.write(l)
>>> file.close()
share|improve this answer

Your Answer


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.