Hi,
I'm trying to combine multiple requests for financial and company data, but I'm having trouble with the syntax.
(The EIKON support forwarded me here, I'm honestly not sure whether this is not a little to simple for this forum)
Basically I'm trying to derive the dividend information for the STOXX Europe 600 and the corresponding meta-information (name, iso-code, naicssector-code) and financial information which corresponds to the dividend information.
The Notebook file is uploaded separately (without EIKON app-key)
Any help is appreciated!
All the best,
Gabriel
dividends_data_without_appkey.txt
x = ek.get_data('.STOXX', ['TR.IndexConstituentRIC','TR.IndexConstituentName'])[0]
rics = x.iloc[:,1]
rics = rics.tolist()
# dividend data
df = ek.get_data(rics,
['TR.DivAnnouncementDate',
'TR.DivRecordDate',
'TR.DivUnadjustedGross',
'TR.DivType',
'TR.DivPaymentType',
'TR.DivCurr',
'TR.DivAnnouncementDate',
'TR.DivExDate',
'TR.DivPayDate',
'TR.DivEventStatus',
'TR.DivNotes',
'TR.DividendFrequency',
'TR.DivSourceOfFunds'],
{
"SDate":"2010-01-01","EDate":"2022-09-27",
})[0]
df.to_excel('stoxx_dividends_data.xlsx', sheet_name='sheet1', index=False)
df.head(10)
# meta-information
df = ek.get_data(
#'BAWG.VI',
rics,
['TR.CommonName',
'TR.CompanyIncorpRegion',
'TR.ISIN',
'TR.NAICSSector',
'TR.NAICSIndustryGroup',
'TR.NAICSIndustryGroupCode',
'TR.IssuerRating',
'TR.IssuerRating.Date'],
{
"SDate":"2010-01-01","EDate":"2022-09-27",
})[0]
df.to_excel('stoxx_meta_data.xlsx', sheet_name='sheet1', index=False)
df.head(10)
# financial data
df = ek.get_data(
'BAWG.VI',
#rics,
['TR.Revenue',
'TR.TotalOperatingExpense',
'TR.EBIT',
'TR.EBITDA',
'TR.NetIncomeBeforeTaxes',
'TR.NetIncomeAfterTaxes',
'TR.CashAndSTInvestments',
'TR.TotalAssetsReported',
'TR.TotalLiabilities',
'TR.NetDebt',
'TR.TotalEquity',
'TR.CompanyMarketCap',
'TR.Beta',
'TR.FreeCashFlow'],
{
"SDate":"2010-01-01","EDate":"2022-09-27",
})[0]
df.to_excel('stoxx_financial_data.xlsx', sheet_name='sheet1', index=False)
df.head(10)
# matched datasets (not working at the moment)
# dividend data
df = ek.get_data(rics,
['TR.DivAnnouncementDate',
'TR.DivRecordDate',
'TR.DivUnadjustedGross',
'TR.DivType',
'TR.DivPaymentType',
'TR.DivCurr',
'TR.DivAnnouncementDate',
'TR.DivExDate',
'TR.DivPayDate',
'TR.DivEventStatus',
'TR.DivNotes',
'TR.DividendFrequency',
'TR.DivSourceOfFunds',
'TR.CommonName',
'TR.CompanyIncorpRegion',
'TR.ISIN',
'TR.NAICSSector',
'TR.NAICSIndustryGroup',
'TR.NAICSIndustryGroupCode',
'TR.IssuerRating',
'TR.IssuerRating.Date',
'TR.Revenue',
'TR.TotalOperatingExpense',
'TR.EBIT',
'TR.EBITDA',
'TR.NetIncomeBeforeTaxes',
'TR.NetIncomeAfterTaxes',
'TR.CashAndSTInvestments',
'TR.TotalAssetsReported',
'TR.TotalLiabilities',
'TR.NetDebt',
'TR.TotalEquity',
'TR.CompanyMarketCap',
'TR.Beta',
'TR.FreeCashFlow'],
{
"SDate":"2010-01-01","EDate":"2022-09-27",
})[0]
df.to_excel('stoxx_dividends_data.xlsx', sheet_name='sheet1', index=False)
df.head(10)