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!
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
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!
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
Typically, the PE and forward PE fields are available via TR.PE and TR.FWDFE fields, as shown below.
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.