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 1 1 1

Historical PE, EPS and forward PE for an ETF like XLK or XLF through python

Hello,

How can I retrieve the historical price to earnings ratio, earnings per share and forward PE for an ETF like XLK or XLF through python API?

Thank you!

python
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.

@julfigue

Hi,

Thank you for your participation in the forum.

Is the reply below satisfactory in answering your question?

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

Otherwise please post again offering further insight into your question.

Thanks,

AHS

Hi @julfigue ,

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


Thanks,

AHS

1 Answer

· Write an Answer
Upvote
Accepted
78.8k 250 52 74

@julfigue

Typically, the PE and forward PE fields are available via TR.PE and TR.FWDFE fields, as shown below.

1641786024761.png

However, it returns <NA> when using it with ETF RICs.

You need to contact the Eikon support directly via MyRefinitiv to verify if the data is available in Eikon and ask for the =TR formula which can be used in Eikon Excel to retrieve the required data. Then, if the formula is available, you can apply RICs, fields, and parameters to the Eikon Data API.


1641786024761.png (28.6 KiB)
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.