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)?
Best Answer
-
@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"})
dataThe RD Library does have row fidelity but it does this by inserting NA artefacts. I hope this can clarify.
0
Answers
-
Hi @laurens , Please use the Data Item Browser. With this tool, you can find the Date value for any field as shown here: https://developers.refinitiv.com/en/video-catalog/data-item-browser
0 -
sorry, but this is not an acceptable answer. If you look at the formula's used you might infer that the data browser is already used. So this I obviously already tried...
Looking at your answer I doubt if you understand the difficulty of the question asked.
0 -
sorry, but this is not an acceptable answer. If you look at the formula's used you might infer that the data browser is already used. So this I obviously already tried...
Looking at your answer I doubt if you understand the difficulty of the question asked.
0 -
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?
0 -
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:
Is this a design choice?
0 -
I just checked RDP and RD behave the same.0
-
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"})
dfI hope this can help.
1 -
thx Jason!0
Categories
- All Categories
- 6 AHS
- 37 Alpha
- 161 App Studio
- 4 Block Chain
- 4 Bot Platform
- 16 Connected Risk APIs
- 47 Data Fusion
- 30 Data Model Discovery
- 608 Datastream
- 1.3K DSS
- 577 Eikon COM
- 4.9K Eikon Data APIs
- 7 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- Trading API
- 2.7K Elektron
- 1.3K EMA
- 236 ETA
- 519 WebSocket API
- 33 FX Venues
- 10 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 20 Messenger Bot
- 2 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 59 Open Calais
- 264 Open PermID
- 39 Entity Search
- 2 Org ID
- PAM
- PAM - Logging
- 8.4K Private Comments
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 20 RDMS
- 1.4K Refinitiv Data Platform
- 367 Refinitiv Data Platform Libraries
- 3 Refinitiv Due Diligence
- LSEG Due Diligence Portal API
- 3 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.1K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 10 World-Check Customer Risk Screener
- 990 World-Check One
- 44 World-Check One Zero Footprint
- 45 Side by Side Integration API
- Test Space
- 3 Thomson One Smart
- 1.2K TR Internal
- Global Hackathon 2015
- 2 Specialists Who Code
- 10 TR Knowledge Graph
- 150 Transactions
- 142 REDI API
- 1.7K TREP APIs
- 4 CAT
- 21 DACS Station
- 117 Open DACS
- 1.1K RFA
- 103 UPA
- 172 TREP Infrastructure
- 224 TRKD
- 886 TRTH
- 5 Velocity Analytics
- 5 Wealth Management Web Services
- 59 Workspace SDK
- 9 Element Framework
- 5 Grid
- 13 World-Check Data File
- Yield Book Analytics
- 46 中文论坛