question

Upvotes
Accepted
7 1 2 6

How to retrieve daily marketcap, PE LTM and 3-year EPS Growth rate

Hi,

Refinitive helpdesk provided me excel formulas to retrieve these info. Below are the details, can anyone please help convert them to Python get_data? Much appreciated!

3-year EPS Growth.

=@TR("CPRT.O","TR.EPSMeanEstLastYrGrowth","Frq=Y SDate=0 EDate=-2")

MarketCap

=@TR("CPRT.O","TR.CompanyMarketCapitalization","SDate=0 EDate=-2")

What's weird is that helpdesk to me it's not possible to retrieve the daily market cap, but if I use below, I get something, why is that?

df2 = ek.get_data(['CPRT.O'],
                  ['TR.PriceClose.date; TR.PriceClose; TR.SETTLEMENTPRICE; TR.CompanyMarketCap(ShType=DEF); TR.IssueMarketCap'],
                  {'SDate': '2015-01-01', 'EDate': '2023-02-05', 'CURN': 'USD', 'FRQ': 'M'})

PE LTM

=@TR("CPRT.O","TR.PriceClose(SDate=0D,Curn=USD)/ROUND(TR.EPSActValue(Period=LTM,Sdate=0D,Curn=USD),3)/*P/E (LTM) - IBES Actual*//*P/E (LTM) - IBES Actual*/")
eikon-data-api#technology#contentpython api
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.

1 Answer

· Write an Answer
Upvotes
Accepted
87.7k 294 53 79

@rgustin

Thanks for reaching out to us.

The Eikon Data API code looks like this:

#==TR("CPRT.O","TR.EPSMeanEstLastYrGrowth","Frq=Y SDate=0 EDate=-2")
df, err = ek.get_data(
    ["CPRT.O"],
    ["TR.EPSMeanEstLastYrGrowth"],
    {"Frq":"Y","SDate":0, "Edate":-2})
df
#=@TR("CPRT.O","TR.CompanyMarketCapitalization","SDate=0 EDate=-2")
df, err = ek.get_data(
    ["CPRT.O"],
    ["TR.CompanyMarketCapitalization"],
    {"SDate":0, "Edate":-2})
df
#=@TR("CPRT.O","TR.PriceClose(SDate=0D,Curn=USD)/ROUND(TR.EPSActValue(Period=LTM,Sdate=0D,Curn=USD),3)")
df, err = ek.get_data(
    ["CPRT.O"],
    ["TR.PriceClose(SDate=0D,Curn=USD)/ROUND(TR.EPSActValue(Period=LTM,Sdate=0D,Curn=USD),3)"])
df

The output is:

1675824420200.png

The output is similar to Eikon Excel.

1675824490424.png

I hope that this information is of help


1675824420200.png (95.1 KiB)
1675824490424.png (19.3 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.