For a deeper look into our Eikon Data API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
1 0 0 1

Download historical daily stock prices for all S&P 500 stocks

Hello,

Is there a way to download historical daily prices for all constituents of a stock index (e.g. S&P 500, NYSE, NASDAQ etc) for as many days possible back in the past? Either way would work i.e. through Excel or Eikon Web/GUI or Python etc..

Thanks in advance!

eikoneikon-data-apiworkspaceworkspace-data-apirefinitiv-dataplatform-eikonpythontime-series
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

1 Answer

Upvotes
Accepted
39.2k 75 11 27

For an index with a small number of constituents you may be able to retrieve price history in a single request. E.g. the following Excel worksheet function retrieves daily price history for the last 30 years for current constituents of Dow Jones Industrial Average Index.

=TR("0#.DJI","TR.CLOSEPRICE","EDate=-30Y SDate=0D RH:Date CH:In")
For indices with larger number of constituents you'd need to split the request: first retrieve the list of constituents, then slice the list and retrieve price history for a few stocks at a time (or maybe even just one stock at a time if you choose to use Eikon Data APIs).
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Click below to post an Idea Post Idea