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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
9 0 0 3

historical index valuation ratio via Eikon API

Hello, I am looking for historical index valuation ratios e.g. P/E ratio for the SP500. I know how to pull it for individual stocks but I dont get any result when I put the index RIC. Is there a way to get them or have to do it the hard way, i.e. pulling historical constituents and estimating the index aggregate ratio?

eikoneikon-data-apiworkspaceworkspace-data-apirefinitiv-dataplatform-eikonpython
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

Upvote
Accepted
318 1 0 4

Hi @ninja,

You can use the following code to retrieve historical PE for the S&P 500:

spx_pe, err = ek.get_data(['.SPX'], ['TR.Index_PE_RTRS.date' ,'TR.Index_PE_RTRS'], {'SDate':'0D','EDate':'-1CY'})


spx-pe.jpg (45.2 KiB)
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.

Hi @ninja,

The easiest way to find other ratios for indices is to search for TR.Index:

index-ratios.jpg (79.1 KiB)
Thank you @Agnes Terada! And a last question, do you know if the historical ratios for the index are based on the historical constituents of the index (as it was at each point in time) or they are based on its today's constituents (aggregation of historical ratios of the firms that are in the index today)?
Click below to post an Idea Post Idea