Message Boards Message Boards


Better way to get FinancialData / CompanyData?

Posted 1 month ago
2 Replies
1 Total Likes

It can take 2 to 5 minutes to get data on a company. Is there a better way then what is coded below??

With[{sec = "TTT"}, Select[
   Table[{prop, FinancialData[sec, prop]}, {prop, 
     FinancialData[sec, "Properties"]}], 
   FreeQ[#, {_, Missing["NotAvailable"] |
       HoldPattern[FinancialData[__]]}] & ]] // Grid


With[{sec = Entity["Company", "MFCIndustrial::fz786"]}, Select[
   Table[{prop, CompanyData[sec, prop]}, {prop, 
     CompanyData[sec, "Properties"]}], 
   FreeQ[#, {_, Missing["NotAvailable"] |
       HoldPattern[CompanyData[__]]}] & ]] // Grid
2 Replies
Posted 1 month ago

Retrieve all of the properties in a single call rather than a call per property. That should be faster.

props = FinancialData["TTT", "Properties"];
data = FinancialData["TTT", props];
AssociationThread[props, data] // DeleteMissing // Dataset
Posted 1 month ago

Beautiful -- Thank you Rohit, amazing, 1 sec to download, huge difference, It takes longer to scroll in the notebook than to download the whole table.

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract