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
77 5 12 17

ek.get_data correct date with multiple fields

Hi,


I have the following call in excel:

=@TR("IAG.AX","TR.IssueMarketCap(Scale=6 ShType=FFL), ((TR.FreeFloatPct)/100), TR.IssueSharesOutstanding(Scale=3), TR.CLOSEPRICE(Adjusted=0)","SDate=2020-10-27 EDate=2020-12-01 Curn=USD CH=Fd RH=calcdate")

I repeat to make this same call in:

 ek.get_data


However I want in the return also a correct date (that is correct for all fields) so that If I later use the information I know which get_data result is for which date

data, err = ek.get_data("IAG.AX"
                       , fields = ["TR.IssueMarketCap('Scale'=6,'ShType'=FFL)"
                                   ,"TR.FreeFloatPct()/100/*FreefloatWeight*/"
                                   ,"TR.IssueSharesOutstanding(Scale=3)/*shares outstanding*/"                                        ,"TR.CLOSEPRICE(Adjusted=0)/*close*/"]
                       , parameters = {"Curn" = "USD", "SDate" = "2020-10-27"
                                      , "EDate" = "2020-12-01"}


I can add a date like e.g.:

"TR.CLOSEPRICE(Adjusted=0).DATE"


But then how do I know for sure that this date is valid also for the other fields (not close price)?








eikondatafieldsdateformula-builder
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
10.2k 18 6 9

@laurens thanks for your question - so there is no way to guarantee fidelity of dates across different fields with the Eikon Data API library - without explicitly requesting a date or a calc date:

data, err = ek.get_data("VOD.L",fields = ["TR.IssueMarketCap(Scale=6).calcdate","TR.IssueMarketCap(Scale=6)","TR.FreeFloatPct.calcdate","TR.FreeFloatPct","TR.IssueSharesOutstanding(Scale=3).calcdate","TR.IssueSharesOutstanding(Scale=3)","TR.CLOSEPRICE(Adjusted=0).calcdate","TR.CLOSEPRICE(Adjusted=0)"],parameters = {"Curn": "USD", "SDate" : "2020-10-27", "EDate" : "2020-12-01", "Frq":"D"})

data

1686664252042.png

The RD Library does have row fidelity but it does this by inserting NA artefacts. I hope this can clarify.


1686664252042.png (177.8 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.

hi @jason.ramchandani01 many thanks for your answer, this is what I already was suspecting.


To clarfiy upon your last sentence:

(`The RD Library does have row fidelity but it does this by inserting NA 
artefacts.`)


is this only for RD or also for RDP, and if possible can you provide me with an example?


I just checked RDP and RD behave the same.

I checked this query

import refinitiv.data as rd
rd.open_session()

df = rd.get_data(universe="VOD.L",
    fields= ["TR.IssueMarketCap(Scale=6)","TR.IssueMarketCap(Scale=6).calcdate","TR.FreeFloatPct","TR.FreeFloatPct.calcdate","TR.IssueSharesOutstanding(Scale=3).calcdate","TR.CLOSEPRICE(Adjusted=0)","TR.CLOSEPRICE(Adjusted=0).calcdate"],
parameters = {"Curn": "USD", "SDate" : "2020-10-27", "EDate" : "2020-12-01", "Frq":"D"})

I notice than that still there is no consistency in the dates:

1686671570599.png

Is this a design choice?



1686671570599.png (113.9 KiB)

Apologies @laurens I meant with a get_history call you get row fidelity as below - we did not change the get_data output:

df = rd.get_history(universe="VOD.L",fields= ["TR.IssueMarketCap(Scale=6)","TR.FreeFloatPct","TR.IssueSharesOutstanding(Scale=3)","TR.CLOSEPRICE(Adjusted=0)"],parameters = {"Curn": "USD", "SDate" : "2020-10-27", "EDate" : "2020-12-01", "Frq":"D"})

df

1686672399358.png

I hope this can help.

1686672399358.png (149.0 KiB)
thx Jason!

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.