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*/")

Best Answer

  • Jirapongse
    Jirapongse admin
    Answer ✓

    @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