Question related to Workspace Python API - for case 14761377

I would like to pull financial statement for a specific RIC
Here's the Python Api code I'm using
In the parameters line, I use reporting State = Rsdt (restated I believe). However, even if I change it to "Orig", the data seems to be the same and did not change accordingly.
Is there any way I can get all the accounting items name and value for Original/As reported by the company?
import pandas as pd
import numpy as np
from datetime import datetime
import eikon as ek
ek.set_app_key('<key>')
income_statement, err =ek.get_data(['NVDA.O'],['TR.F.IncomeStatement.fieldname','TR.F.IncomeStatement.fielddescription', 'TR.F.IncomeStatement.fperiod','TR.F.IncomeStatement.date', 'TR.F.IncomeStatement'],
parameters = {'Period':'FQ0', 'Frq' : 'FQ', 'SDate' : 0, 'EDate': -4,
'reportingState':'Rsdt', 'curn':'Native', 'Scale':'6', #'SORTA':'date'
}
)
income_statement['Date'] = income_statement['Date'].apply(lambda x: datetime.strptime(x, '%Y-%m-%dT%H:%M:%SZ'))
income_statement = income_statement.rename(columns = {'Date': 'Period End Date'})
income_statement
Answers
-
Thank you for reaching out to us.
I tested it on the Workspace Excel. Both Rsdt and Orig return the same values.
Please contact the helpdesk team directly via MyAccount to verify the data.
1 -
Hi @Jirapongse , thank you for your reply. Internal had replied as below, could you advise on the follow up query?
Follow up query:
I understand the issue here about Reportinstate=Orig or Rsdt. I have another question though. The code seems to return a standardized set of accounting item for most firms. However, each company reported different sets of accounting items in their quarterly filings. I am wondering is there a programmatic way to get the "as reported" statement of different RIC? Thank you.
Here is the reply from internal team:
"Reportingstate=rsdt is the most recent period and Reportingstate=Orig is the initial update for that period. For any company if there is no restatement or reclassification then original document will itself will be represented as most recent period. Hence when you request for rsdt you can see both Original and restatement periods. Hope this clarifies."
"For each period Content generates 2 series of data original to original - Orig (first financials reported by the company) recent to recent - Rsdt (most recent financials for the same period)
Recent to recent will have different financials when there is a change in value when compared to original statement otherwise same original data will be carried out to Recent to recent as well.
So, there is no issue if Original is reflecting under both Original to original (Reportinstate=Orig) and Recent to Recent (Reportingstate = Rsdt). This means company has not reported any changes to the original data. This is completely fine."
0 -
The functionalities in the API is quite similar to the =RDP.Data in Excel.
It requires RICs, fields, and parameters.
Please check with the content team if there are RICs, fields, and parameters in Excel that can provide the required data. Then, I can convert the excel formula to Python code.
0 -
Hi @Jirapongse, the RICs, fields, and parameters were mentioned in the initial query:
RIC: <NVDA.O>
Fields:
TR.F.IncomeStatement.fieldname
TR.F.IncomeStatement.fielddescription
TR.F.IncomeStatement.fperiod
TR.F.IncomeStatement.date
TR.F.IncomeStatement
Parameters = {'Period':'FQ0', 'Frq' : 'FQ', 'SDate' : 0, 'EDate': -4,'reportingState':'Rsdt', 'curn':'Native', 'Scale':'6', #'SORTA':'date'
Could you assist to review this and convert the excel formula to Python code?
0 -
The client is using it.
income_statement, err =ek.get_data(['NVDA.O'],['TR.F.IncomeStatement.fieldname','TR.F.IncomeStatement.fielddescription', 'TR.F.IncomeStatement.fperiod','TR.F.IncomeStatement.date', 'TR.F.IncomeStatement'],
parameters = {'Period':'FQ0', 'Frq' : 'FQ', 'SDate' : 0, 'EDate': -4,
'reportingState':'Rsdt', 'curn':'Native', 'Scale':'6', #'SORTA':'date'
}
)
0 -
Alright, may I have your advice how can we solve this based on the follow up query since client actually is using the Phyton code.
Follow up query:
I understand the issue here about Reportinstate=Orig or Rsdt. I have another question though. The code seems to return a standardized set of accounting item for most firms. However, each company reported different sets of accounting items in their quarterly filings. I am wondering is there a programmatic way to get the "as reported" statement of different RIC? Thank you.
0 -
It is better to clarify the question. For example: What is the "as reported" statement of different RIC?
The output of that code is:
If the client would like to get the same data for other RICs, the client can add more RICs in the first parameter. For example:
income_statement, err = ek.get_data( ['NVDA.O','IBM.N'], ['TR.F.IncomeStatement.fieldname', 'TR.F.IncomeStatement.fielddescription', 'TR.F.IncomeStatement.fperiod', 'TR.F.IncomeStatement.date', 'TR.F.IncomeStatement'], parameters = { 'Period':'FQ0', 'Frq' : 'FQ', 'SDate' : 0, 'EDate': -4, 'reportingState':'Rsdt', 'curn':'Native', 'Scale':'6'}) income_statement
However, this forum is dedicated to technical queries on LSEG product 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
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
- 685 Datastream
- 1.4K DSS
- 615 Eikon COM
- 5.2K Eikon Data APIs
- 10 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- 3 Trading API
- 2.9K Elektron
- 1.4K EMA
- 252 ETA
- 556 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
- 275 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
- 652 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
- 228 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
- 46 中文论坛