Hello!
I am trying to create a panel dataset with historical quarterly balance sheet observations that is supposed to look like this:
The line of code I am using to retrieve the data, through the Python API is this:
data, e = ek.get_data(names.Instrument.to_list(), fields, parameters={'Frq':'Q', 'Period':'FQ0', 'SDate':'2010-01-01', 'EDate':'2020-09-30'})
I used this combination of parameters because it returns the most 'complete' data coverage. However, a lot of cells are empty and there are some duplications and inconsistencies. What could be the optimal way to download historical BS data with the Eikon API?
I would be mostly interested in the calendar quarter data, but the coverage using this filter is by far inferior to the one obtained with the fiscal quarter filter.
Thank you in advance for your help!
@Filippo.Claps Please see the code below this can pull the whole standard Balance Sheet (or Cashflow Statement or Income Statement in one API call) Here we are pulling in the last 8 fiscal quarters of FQ0 data:
df, err =ek.get_data(['ADBE.N'],['TR.F.BalanceSheet.periodenddate','TR.F.BalanceSheet.fieldname','TR.F.BalanceSheet.fielddescription','TR.F.BalanceSheet'],parameters = {'SDate':'-8','EDate':'0','Period':'FQ0','Frq':'FQ','reportingState':'Rsdt', 'curn':'Native', 'Scale':'6','SORTA':'LISeq'}) df
I don't know the universe of RICs you are requesting but not all countries mandate quarterly returns - that could be why there are gaps in the data. In the US quarterly reporting is standard. I hope this can help.