I'm using the Refinitiv package in python, following code, and receive wrong data back, also depending on the parameters.
The code:
import refinitiv.data as rd
from refinitiv.data.content import fundamental_and_reference
rd.open_session()
fields = [
'TR.F.TotRevenue.fperiod',
'TR.F.TotRevenue',
'TR.F.COGSTot.fperiod',
'TR.F.COGSTot',
'TR.F.IncTaxDef.fperiod',
'TR.F.IncTaxDef'
]
parameters = {
"SDate": '-30Y',
"EDate": '-1d',
"FRQ": "FY", # frequency, full year
"Scale": 3, # in thousands
"Curn": 'EUR',
}
response = fundamental_and_reference.Definition(
universe=['5056437385'],
fields=fields,
use_field_names_in_headers=True,
parameters=parameters
).get_data()
df = response.data.df
print(df)
This returns a dataframe with data from 2001 to 2018, formatted as EUR. See below:
There are 2 problems with dataframe:
1. The years FY2007 is double. Why is this?
2. The value for "TR.F.IncTaxDef" is different for each row. First row is 560 and second row is -455.
The data can be verified in the Refinitiv Workspace app, searching for instrument 5056437385, then opening the financials and opening the income statement. Revenue for all years are correct. The IncTaxDef should be -605. See:
What we can do is zoom into the years, using parameters:
parameters = {
"SDate": '-18Y',
"EDate": '-14Y',
"FRQ": "FY", # frequency, full year
"Scale": 3, # in thousands
"Curn": 'EUR',
}
The same code results in:
As you can see: the IncTaxDef is correct, -605. However there is no COGS. Also 2007 is double.
This is very weird and incoherent behavior. In the working of the API I would expect:
1. If the parameter FRQ is "FY", then I would expect that each row is a unique year. How come 2007 is double?
2. If we adjust Sdate/Edate, then this should not change the data. How come if I search for past 30Y I get a different value for the income tax then if I search for -18Y.
3. The API should result in the same values as found in the financial report of the app. How come the tax income is different for 2007?
What is going on and can you help to get coherent code working?
Thanks