2
$\begingroup$

Is there a way to get code names of publicly traded companies by any FinancialData option? I would like to identify for each market the company listed there and to associate it with the code name in order to filter companies according to some parameters.

$\endgroup$
3
$\begingroup$

I do not know what you mean by "code name". Perhaps,

prop = {"Name", "StandardName", "Symbol", "CIK", "SICCode"};

Grid[Join[{prop}, FinancialData[#,
     prop] & /@ {"Alphabet", "Microsoft", "Apple"}],
 Frame -> All]

enter image description here

EDIT:

all = FinancialData[];

exch = StringCases[all, __ ~~ ":"] // Union // Flatten

(* {"DE:", "F:", "HK:", "L:", "MB:", "NASDAQ:", "NYSE:", "PA:", 
    "SS:", "SZ:", "TO:", "TSE:"} *)

nasdaq = FinancialData["NASDAQ:*"];

consumerElec = Select[nasdaq,
   FinancialData[#, "Sector"] === "ConsumerElectronics" &];

Length /@ {all, nasdaq, consumerElec}

(* {46311, 2926, 9} *)
| improve this answer | |
$\endgroup$
  • $\begingroup$ Thank you Bob, with "code name" I mean what you called "StandardName", but is there a way to have a similar list with all the companies of the world or of a market without writing every time the name of each company within &/{"Microsoft","Apple",...}? $\endgroup$ – Nate Apr 16 at 7:33
  • $\begingroup$ @Mick Are you looking for FinancialData[], FinancialData["NASDAQ:*"], ... $\endgroup$ – Suba Thomas Apr 16 at 14:34
  • $\begingroup$ Thank you guys, that's what I was looking for! How can I associate "Standard Name" for each market to "Name" of the company? $\endgroup$ – Nate Apr 17 at 9:06
  • $\begingroup$ Do not ask new questions in comments. You should have enough information now to formulate a clear question to include a minimal example, the code that you have tried, and what specific problems you are having with the code. $\endgroup$ – Bob Hanlon Apr 17 at 16:42
  • $\begingroup$ Got it, thank you $\endgroup$ – Nate Apr 18 at 12:23

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.