For a deeper look into our Eikon Data API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
5 1 1 4

Results for the same data item come out differently depending on the time range selected.

<br>

I would like to retrieve data for Instrument: 1730.T - Profit and Loss, but it appears that the same data comes out differently, depending on the time period chosen.

I’ve tried below 4 conditions for the same data item;

1) When retrieving the data shortening time range (Attached as Reuter_question1.jpg)

Research and development: no data

Unusual Expense (income): 545000

「Reuter_question1.csv」
import eikon as ek
from datetime import datetime as dt
import pandas as pd


ek.set_app_id('8A74283D221E74D48347816')


fields = ['TR.Revenue.date', 'TR.Revenue', 'TR.GrossProfit']
param = {'SDate': 0, 'EDate': -3, 'FRQ': 'FS'}


if __name__ == '__main__':


    start_date = str(20170701)
    end_date = str(20171005)
    chunk = ['1730.T']


    fields = ['TR.ISOriginalAnnouncementDate', 'TR.ISPeriodEndDate', 'TR.TotalOperatingExpense', 'TR.CostofRevenueTotal', 'TR.SgaExpenseTotal', 'TR.ResearchAndDevelopment', 'TR.UnusualExpense']
    data, error = ek.get_data(chunk, fields, {"SDate": start_date, "EDate": end_date, "FRQ": "FQ", "Period": "FQ0", "ReportingState": "Orig"})


    data.to_csv(path + "Reuter_question1.csv", index=None)
    print(data)

2) When retrieving the data lengthening time range (Reuter_question2.jpg)

Research and development: no data

Unusual Expense (income): no data

「Reuter_question2.csv」
import eikon as ek
from datetime import datetime as dt
import pandas as pd


ek.set_app_id('8A74283D221E74D48347816')


fields = ['TR.Revenue.date', 'TR.Revenue', 'TR.GrossProfit']
param = {'SDate': 0, 'EDate': -3, 'FRQ': 'FS'}


if __name__ == '__main__':
    start_date = str(20150101)
    end_date = str(20171005)
    chunk = ['1730.T']


    fields = ['TR.ISOriginalAnnouncementDate', 'TR.ISPeriodEndDate', 'TR.TotalOperatingExpense', 'TR.CostofRevenueTotal', 'TR.SgaExpenseTotal', 'TR.ResearchAndDevelopment', 'TR.UnusualExpense']
    data, error = ek.get_data(chunk, fields, {"SDate": start_date, "EDate": end_date, "FRQ": "FQ", "Period": "FQ0", "ReportingState": "Orig"})


    data.to_csv(path + "Reuter_question2.csv", index=None)
    print(data)

3) When retrieving quarterly data for 30 periods (Reuter_question3.jpg)

Research and development: 22313000.0

Unusual Expense (income): 545000.0

「Reuter_question3.csv」
import eikon as ek
from datetime import datetime as dt
import pandas as pd


ek.set_app_id('8A74283D221E74D48347816')


fields = ['TR.Revenue.date', 'TR.Revenue', 'TR.GrossProfit']
param = {'SDate': 0, 'EDate': -3, 'FRQ': 'FS'}


if __name__ == '__main__':
    chunk = ['1730.T']
    fields = ['TR.ISOriginalAnnouncementDate', 'TR.ISPeriodEndDate', 'TR.TotalOperatingExpense', 'TR.CostofRevenueTotal', 'TR.SgaExpenseTotal', 'TR.ResearchAndDevelopment', 'TR.UnusualExpense']
    data, error = ek.get_data(chunk, fields, {"SDate": 0, "EDate": -30, "FRQ": "FQ", "Period": "FQ0", "ReportingState": "Orig"})


    data.to_csv(path + "Reuter_question3.csv", index=None)
    print(data)

4) When retrieving quarterly data for 10 periods (Reuter_question4.jpgreuter-question2.jpg)

Research and development: no data

Unusual Expense (income): 545000

「Reuter_question4.csv」
import eikon as ek
from datetime import datetime as dt
import pandas as pd


ek.set_app_id('8A74283D221E74D48347816')


fields = ['TR.Revenue.date', 'TR.Revenue', 'TR.GrossProfit']
param = {'SDate': 0, 'EDate': -3, 'FRQ': 'FS'}


if __name__ == '__main__':
    chunk = ['1730.T']
    fields = ['TR.ISOriginalAnnouncementDate', 'TR.ISPeriodEndDate', 'TR.TotalOperatingExpense', 'TR.CostofRevenueTotal', 'TR.SgaExpenseTotal', 'TR.ResearchAndDevelopment', 'TR.UnusualExpense']
    data, error = ek.get_data(chunk, fields, {"SDate": 0, "EDate": -10, "FRQ": "FQ", "Period": "FQ0", "ReportingState": "Orig"})


    data.to_csv(path + "Reuter_question4.csv", index=None)
    print(data)


I think the data below should be right, but how should I fix the program so that no matter what time range I chose I can get the right data?

Research and development: no data

Unusual Expense (income): 545000 (shown as 0.5)

eikoneikon-data-apiworkspaceworkspace-data-apirefinitiv-dataplatform-eikonpython
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

1 Answer

Upvotes
Accepted
39.2k 75 11 27

This is the effect of the issue that's been previously raised and acknowledged on numerous threads on this forum. Null values or data gaps are pushed down to the bottom of the column, thus screwing up the alignment of data between rows and columns. See for example https://community.developers.refinitiv.com/questions/19014/period-end-date-not-pulling-through-properly.html
The issue is still being worked on.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Click below to post an Idea Post Idea