Upgrade from Eikon -> Workspace. Learn about programming differences.

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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
1 2 1 2

How can I get historical data for the constituents of an index on Python?

How can I get historical data for the constituents of an index on Python?

eikoneikon-data-apipythonrefinitiv-dataplatform-eikonworkspaceworkspace-data-apihistoricalindex
icon clock
10 |1500

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

@reshma.palackan

Hi,

Thank you for your participation in the forum.

Are any of the replies below satisfactory in resolving your query?

If yes please click the 'Accept' text next to the most appropriate reply. This will guide all community members who have a similar question.

Otherwise please post again offering further insight into your question.

Thanks,

AHS

Please be informed that a reply has been verified as correct in answering the question, and has been marked as such.

Thanks,

AHS

Upvotes
Accepted
3.8k 4 4 6

Hi @reshma.palackan

Here is an example how you can make it. The best approach to find the fields and necessary parameters is using Eikon Excel Build Formula tool.

df_tmp,err= ek.get_data("0#.STOXX50","TR.RIC")
instruments = df_tmp['RIC'].tolist()
df,err = ek.get_data(instruments,["TR.WasteTotal.date","TR.WasteTotal"],{"Period":"FY0", "Frq":"FY", "SDate":"0", "EDate":"-10"})
df
icon clock
10 |1500

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

Upvotes
17.3k 82 39 63
icon clock
10 |1500

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

Upvotes
3.8k 4 4 6

Hi @reshma.palackan

If you are looking for a historical constituents of an index you can also try with:

ek.get_data("0#.FTSE(2010-08-09)","TR.CommonName")
icon clock
10 |1500

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

Upvotes
1 2 1 2

It is not for historical constituents, but for historical data pertaining to say Total Waste, for the past ten years of each constituent of Stoxx50, say. I am only getting familiar with the syntax for retrieving data using get_data :)

icon clock
10 |1500

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

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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