Message Boards Message Boards

0
|
3229 Views
|
2 Replies
|
1 Total Likes
View groups...
Share
Share this post:

Better way to get FinancialData / CompanyData?

Posted 2 years ago

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

or

With[{sec = Entity["Company", "MFCIndustrial::fz786"]}, Select[
   Table[{prop, CompanyData[sec, prop]}, {prop, 
     CompanyData[sec, "Properties"]}], 
   FreeQ[#, {_, Missing["NotAvailable"] |
       HoldPattern[CompanyData[__]]}] & ]] // Grid
POSTED BY: Raymond Low
2 Replies
Posted 2 years 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 BY: Rohit Namjoshi
Posted 2 years 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.

POSTED BY: Raymond Low
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract