<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)