Eikon API guidance summary data gets mixed up

Hello,
I am trying to pull guidance summary data using eikon api.
My issue is that when I include new data field (for example TR.GuidanceUnitType),
the data gets mixed up and some items like revenues show up as tax rates.
I have seen this happen as I include and exclude different data fields.
Please let me know why this is happening.
I have included the screenshots for your reference.
As you can see, some of the guidance items showing up as tax rates are actually not tax rates, but some other measures.
Thank you very much.
Answers
-
Thank you for reaching out to us.
The Eikon Data API wasn't updated since 2023.
Please try the new LSEG Data Library for Python instead. I tested it and the data looks correct.
df = ld.get_data( universe=['MSFT.O'], fields = ['TR.GuidanceDate', 'TR.GuidancePeriodYear', 'TR.GuidancePeriodMonth', 'TR.GuidanceLowValue', 'TR.GuidanceHighValue', 'TR.GuidanceUnitType', 'TR.GuidanceMeasure', 'TR.GuidanceSegmentName', 'TR.GuidanceDocType', 'TR.GuidanceSpeaker', 'TR.GuidanceAcctType', 'TR.GuidanceDataForm', 'TR.GuidanceText'], parameters = { 'Period':'FQ1', 'Frq':'FQ', 'SDate':'2020-01-01', 'EDate':'2025-07-30', 'GuidAcctType':'ALL', 'Scale':6 } ) df
The examples are available on GitHub.
0 -
Hello Jirapongse,
Thank you very much for your help.
Is the new data library relatively easy to learn?
I also had a few additional questions.
- If I would like to get both quarterly and annual guidance (given every quarter), how should I modify the parameters?
- How do I found out the data range available for each firm? For example, when does the earliest guidance data start for Microsoft?
- If I would like to fully understand what fields are available for each parameter, which documentation should I take a look? Could you give me some resources that can help me understand the syntax?
I really appreciate your help.
0 -
Hello Jirapongse,
Thank you very much for your help.
Is the new data library relatively easy to learn?
I also had a few additional questions.
- If I would like to get both quarterly and annual guidance (given every quarter), how should I modify the parameters?
- How do I found out the data range available for each firm? For example, when does the earliest guidance data start for Microsoft?
- If I would like to fully understand what fields are available for each parameter, which documentation should I take a look? Could you give me some resources that can help me understand the syntax?
I really appreciate your help.
0 -
Yes, it is easy to learn. There are a lot of examples available on GitHub.
The code can be changed to:
import lseg.data as ld ld.open_session(app_key = 'APP_KEY') df = ld.get_data(…)
You can use the Data Item Browser tool to list all available fields and parameters.
However, this forum is dedicated to software developers using LSEG APIs. The moderators on this forum do not have deep expertise in every bit of content available through LSEG products, which is required to answer content questions such as this one.
The best resource for content questions is the Helpdesk support team, which can be reached by submitting queries through MyAccount. The support team will either have the required content expertise ready available or can reach out to relevant content experts to get the answer for you.0 -
Hello,
Thank you very much for your help.
I tried using the new library, but I still have the same issue.
Could you please take a look at my screen shots and let me know what the problem is?
I also do not understand the warning regarding 'downcasting'
I would appreciate if you explain what the warning is trying to say.
Thank you very much.
0 -
Please try this one:
df = ld.get_data( universe=['MSFT.O'], fields = ['TR.GuidanceDate(GuidAcctType="ALL")', 'TR.GuidancePeriodYear(GuidAcctType="ALL")', 'TR.GuidancePeriodMonth(GuidAcctType="ALL")', 'TR.GuidanceLowValue(GuidAcctType="ALL")', 'TR.GuidanceHighValue(GuidAcctType="ALL")', 'TR.GuidanceUnitType(GuidAcctType="ALL")', 'TR.GuidanceMeasure(GuidAcctType="ALL")', 'TR.GuidanceSegmentName(GuidAcctType="ALL")', 'TR.GuidanceDocType(GuidAcctType="ALL")', 'TR.GuidanceSpeaker(GuidAcctType="ALL")', 'TR.GuidanceAcctType(GuidAcctType="ALL")', 'TR.GuidanceText(GuidAcctType="ALL")'], parameters = { 'Period':'FQ1', 'Frq':'FQ', 'SDate':'2020-01-01', 'EDate':'2025-07-30', 'Scale':6 } )
The warning indicates the the library uses the deprecated pandas method (replace) which will be removed in a pandas future version. The product team is aware of this warning.
C:\Python312\Lib\site-packages\lseg\data\_tools\_dataframe.py:192:FutureWarning: Downcasting behavior in `replace` is deprecated and will be removed in a future version. To retain the old behavior, explicitly call `result.infer_objects(copy=False)`. To opt-in to the future behavior, set `pd.set_option('future.no_silent_downcasting', True)`
Currently, you can ignore this warning by using the following code.
import pandas as pd pd.set_option('future.no_silent_downcasting', True)
0 -
Hello,
Thank you very much for your help.
I figured out that drop.na and drop.duplicates are causing the problem.
Do you know why this might be the case?
As long as I do not include them in my code, the data is stable and accurate.
0 -
I rechecked it and found that the issue happens randomly.
I can replicate this issue on the Workspace Excel with the following formula.
=@RDP.Data("MSFT.O","TR.GuidanceDate;TR.GuidancePeriodYear;TR.GuidancePeriodMonth;TR.GuidanceLowValue;TR.GuidanceHighValue;TR.GuidanceUnitType;TR.GuidanceMeasure;TR.GuidanceSegmentName;TR.GuidanceDocType;TR.GuidanceSpeaker;TR.GuidanceAcctType;TR.Guida"&"nceDataForm;TR.GuidanceText","Period=FQ1 Frq=FQ SDate=2020-01-01 EDate=2025-07-30 CH=Fd RH=IN GuidAcctType=ALL Scale=6",B2)
Because the problem also happens on the Workspace Excel, please contact the helpdesk team via MyAccount to investigate this issue.
0 -
Hello Jirapongse,
I have reached out to the help desk team and got a response.
They basically told me to post this here and have the excel formula replicated in python code.
Unfortunately, I am not very proficient with the excel formula. Could you help me with the python code of it?
Thank you very much and I appreciate it.
The below excel formula is sorted by Guidance Measure to arrange Tax Rate, Revenue, etc in order:
=@RDP.Data("MSFT.O","TR.GuidanceDate(GuidAcctType=ALL);TR.GuidancePeriodYear(GuidAcctType=ALL);TR.GuidancePeriodMonth(GuidAcctType=ALL);TR.GuidanceLowValue(GuidAcctType=ALL
Scale=6);TR.GuidanceHighValue(GuidAcctType=ALL Scale=6);TR.GuidanceUnitType(Gu"&"idAcctType=ALL);TR.GuidanceMeasure(GuidAcctType=ALL);TR.GuidanceSegmentName(GuidAcctType=ALL);TR.GuidanceDocType(GuidAcctType=ALL);TR.GuidanceSpeaker(GuidAcctType=ALL);TR.GuidanceAcctType(GuidAcctType=ALL);TR.GuidanceDataForm(GuidAcctType=ALL);TR.Gui"&"danceText(GuidAcctType=ALL)","Period=FQ1 Frq=FQ SDate=2020-01-01 EDate=2025-07-30 CH=Fd RH=IN SORTA=TR.GuidanceMeasure",B2)
0 -
I have contacted the helpdesk to refresh the formula several times to replicate the issue.
You may ask them for the same.
0 -
Hello Jirapongse,
Shall I just stay put until this issue is solved? Could you please let me know once there is no issue pulling the data with the original python code?
In addition to this, is there a python code that can pull quarterly and annual guidance simultaneously? How will I have to modify the parameters to do this?
Thank you very much.
0 -
The problem must be solved at the server side, not Python.
Please contact the support team on the case#14796016 to investigate this issue.
Python and Excel retrieve data from the same data source. I think if the issue on Excel has been solved, the issue on Python will be solved too.
The Period and Frq parameters accept one value at a time. Therefore, as far as I know, it can't be used to pull quarterly and annual guidance in the same request. However, you need to contact the helpdesk team to confirm it.
'Period':'FQ1',
'Frq':'FQ',0
Categories
- All Categories
- 3 Polls
- 6 AHS
- 36 Alpha
- 166 App Studio
- 6 Block Chain
- 4 Bot Platform
- 18 Connected Risk APIs
- 47 Data Fusion
- 34 Data Model Discovery
- 687 Datastream
- 1.4K DSS
- 621 Eikon COM
- 5.2K Eikon Data APIs
- 11 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- 4 Trading API
- 2.9K Elektron
- 1.4K EMA
- 254 ETA
- 557 WebSocket API
- 38 FX Venues
- 14 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 23 Messenger Bot
- 3 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 60 Open Calais
- 276 Open PermID
- 44 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 22 RDMS
- 1.9K Refinitiv Data Platform
- 669 Refinitiv Data Platform Libraries
- 4 LSEG Due Diligence
- LSEG Due Diligence Portal API
- 4 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.2K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 12 World-Check Customer Risk Screener
- 1K World-Check One
- 46 World-Check One Zero Footprint
- 45 Side by Side Integration API
- 2 Test Space
- 3 Thomson One Smart
- 10 TR Knowledge Graph
- 151 Transactions
- 143 REDI API
- 1.8K TREP APIs
- 4 CAT
- 27 DACS Station
- 121 Open DACS
- 1.1K RFA
- 104 UPA
- 193 TREP Infrastructure
- 229 TRKD
- 917 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 90 Workspace SDK
- 11 Element Framework
- 5 Grid
- 18 World-Check Data File
- 1 Yield Book Analytics
- 48 中文论坛