Currently, we use the Python API and ld.get_data() to extract fundamental and ESG data of several companies over time. We want to make sure that the date variables we are using in both requests (see below) correspond to the last day of the company’s business year so that we can interprete both datasets on a fiscal year level.
Therefore, we have the following questions:
Is it true that 'TR.F.PeriodEndDate' equals the last day of the company's business year?
Is it true that date variables of a specific variable (as for example 'TR.TRESGScore.date' for 'TR.TRESGScore') equals the variable 'TR.F.PeriodEndDate'?
Is it true that date variables of a specific variable (as for example 'TR.F.TOTASSETS.date' for 'TR.F.TOTASSETS') equals the variable 'TR.F.PeriodEndDate'?
Is there an additional possibility to get the fiscal year for yearly company observations?
Code:
# Extracting the data
ld.open_session()
DJ_constitutents_2024_06_14_df = ld.get_data(
universe=[
'.DJI'
],
fields=[
'TR.IndexConstituentRIC'
],
header_type=HeaderType.TITLE,
parameters = {
'SDate':'2024-06-14',
'EDate':'2024-06-14',}
)
ld.close_session()
RIC_list = DJ_constitutents_2024_06_14_df['Constituent RIC'].tolist()
fundamental_variables_list = [
# Date item
'TR.F.PeriodEndDate',
'TR.F.TOTASSETS.date',
# Main items
'TR.F.TOTASSETS',
'TR.F.TOTCURRASSETS',
]
ld.open_session()
fundamental_df = ld.get_data(
universe=RIC_list,
fields=fundamental_variables_list,
parameters={'SDate':'0','EDate':'-16','Frq':'FY', 'Curn': 'USD'},
header_type=HeaderType.NAME
)
ld.close_session()
ESG_variables_list = [
#date
'TR.TRESGScore.date',
#score
'TR.TRESGScore',
'TR.TRESGCScore',
]
# Extracting the data
ld.open_session()
ESG_df = ld.get_data(
universe=RIC_list,
fields=ESG_variables_list,
parameters={'SDate':'0','EDate':'-16','Frq':'FY'},
header_type=HeaderType.NAME
)
ld.close_session()