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

Missing data for SP500 using fundamental_and_reference.Definition get_data

Am looking to download the following fields (list below) for SP500 index constituents, from 1995 to yesterday, daily data. Am using the following

import refinitiv.data as 
from refinitiv.data.content import fundamental_and_reference
import datetime

rd.open_session()

growth_fields = ["TR.EPSMeanEstLastToNextYrGrowth",
                 "TR.EPSLTGEstValue(Period=FY1)",
                 "TR.LTGMean",
                 "TR.RevenueSmartEstFwdYrGrowth",
                 "TR.OrganicSalesGrowthMean(Period=FY1)",
                 "TR.GrowthCapexActValue(Period=FY0)",
                 "ROE",
                 "TR.ReturnonAvgCommEqtyPctIncomeAvailabletoCommExclExtraItems5YrAvg(Period=FY0)",
                 "TR.ROICActValue(Period=FY0)",
                 "TR.NetProfitMargin(Period=FY0)",
                 "TR.OperatingMarginPercent(Period=FY0)",
                 "TR.GrossMargin(Period=FY0)",
                 "TR.EBITDAMarginPercent(Period=FY0)",
                 "TR.LTDebtToTtlCapitalPct(Period=FY0)",
                 "TR.TtlDebtToTtlEquityPct(Period=FY0)",
                 "TR.EBITIntCov(Period=FY0)"]


lse = fundamental_and_reference.Definition(
    ["0#.INX"],
    fields = growth_fields
).get_data()

Ho do i specify a start and end date? it appears that there are lot of missing data in the cross section, so I am looking to download a time series, and I would like to have a login in place to have the latest available data if the most recent for a given date is not yet available. Ho do I do this?

#technologypython apihistoricaltime-seriesfundamentalsfundamental-data
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.

@Diego.Daprile

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, and then close the question. This will guide all community members who have a similar question.

Otherwise please post again offering further insight into your question.

Thanks,

AHS

Hi @Diego.Daprile ,

Please note that the answer below was marked as accepted. Please let us know if that's incorrect/inapropriate.

Kind regards,

AHS.

1 Answer

· Write an Answer
Upvotes
Accepted
5.8k 21 2 6

Hi @Diego.Daprile ,


Have you tried get_history?

rd.get_history(
    universe=["0#.INX"],
    fields=["TR.EPSMeanEstLastToNextYrGrowth",
        "TR.EPSLTGEstValue(Period=FY1)",
        "TR.LTGMean",
        "TR.RevenueSmartEstFwdYrGrowth",
        "TR.OrganicSalesGrowthMean(Period=FY1)",
        "TR.GrowthCapexActValue(Period=FY0)",
        "ROE",
        "TR.ReturnonAvgCommEqtyPctIncomeAvailabletoCommExclExtraItems5YrAvg(Period=FY0)",
        "TR.ROICActValue(Period=FY0)",
        "TR.NetProfitMargin(Period=FY0)",
        "TR.OperatingMarginPercent(Period=FY0)",
        "TR.GrossMargin(Period=FY0)",
        "TR.EBITDAMarginPercent(Period=FY0)",
        "TR.LTDebtToTtlCapitalPct(Period=FY0)",
        "TR.TtlDebtToTtlEquityPct(Period=FY0)",
        "TR.EBITIntCov(Period=FY0)"],
    start="2024-02-01",
    end="2024-02-04",
    interval='1D')



Else I suggest you use `extended_params`:


import refinitiv.data as rd
from refinitiv.data.content import fundamental_and_reference
import datetime
rd.open_session()

growth_fields = [
    "TR.EPSMeanEstLastToNextYrGrowth.date",
    "TR.EPSMeanEstLastToNextYrGrowth",
    "TR.EPSLTGEstValue(Period=FY1)",
    "TR.LTGMean",
    "TR.RevenueSmartEstFwdYrGrowth",
    "TR.OrganicSalesGrowthMean(Period=FY1)",
    "TR.GrowthCapexActValue(Period=FY0)",
    "ROE",
    "TR.ReturnonAvgCommEqtyPctIncomeAvailabletoCommExclExtraItems5YrAvg(Period=FY0)",
    "TR.ROICActValue(Period=FY0)",
    "TR.NetProfitMargin(Period=FY0)",
    "TR.OperatingMarginPercent(Period=FY0)",
    "TR.GrossMargin(Period=FY0)",
    "TR.EBITDAMarginPercent(Period=FY0)",
    "TR.LTDebtToTtlCapitalPct(Period=FY0)",
    "TR.TtlDebtToTtlEquityPct(Period=FY0)",
    "TR.EBITIntCov(Period=FY0)"]

lse = fundamental_and_reference.Definition(
    ["0#.INX"],
    fields = growth_fields,
    extended_params={"Scale": 6, "SDate": 0, "EDate": -3,
                    #  "FRQ": "FY",
                     "Curn": "EUR"
                     }
).get_data()


1710326159807.png


For details on the extended_params, please watch the tutorials here, they are still relevant to rd.

For more fields (e.g.: date), I suggest watching the DIB Video.



1710326159807.png (105.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.