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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
16 2 3 5

Python Standarized Data Response

Hello,

Is there anyway to consult the complete periods for standarized balance sheet, Income and cashflow. I have the followings lines.

p = {

'Period': 'FY0'

, 'reportingState':'Rsdt'

, 'curn': currency

, 'Scale':'6'

, 'SORTA':'LISeq'

, 'CH':'Fd'

, 'IncludeOldYE' :'No'

, 'ReportType':'Latest'

, 'Edate' : '-5FY'

, 'FRQ':'FY'

, 'transpose':'y'

, 'Sdate' : '0FY'

, 'FXRate' : 'PeriodEnd'

, 'NULL' : 'blank'

}

df, err = ek.get_data(['MS.LM'], ['TR.F.BalanceSheet.fieldName','TR.F.BalanceSheet.fielddescription', 'TR.F.BalanceSheet.date','TR.F.BalanceSheet'], parameters = p )

I'm trying to get the last 5 years for each field that belongs to BalanceSheet, In some fields the data is ok for example:

and in the same query another field we got

How can I modify my current script or parameters to get the same periods even if the data does not exists I wondering if it is possible to get the following response:


InstrumentNameDateSTD Balance Sheet All534MS.LMTR.F.SecHeldUnderCollat2015-12-31T00:00:00Z11225666MS.LMTR.F.SecHeldUnderCollat2014-12-31T00:00:00Z213161007MS.LMTR.F.SecHeldUnderCollat2011-12-31T00:00:00Z421461115MS.LMTR.F.SecHeldUnderCollat2010-12-31T00:00:00Z46186


fieldperiodSTD Balance Sheet AllMS.LMTR.F.SecHeldUnderCollat2019-12-31T00:00:00Z

MS.LMTR.F.SecHeldUnderCollat2018-12-31T00:00:00Z

MS.LMTR.F.SecHeldUnderCollat2017-12-31T00:00:00Z

MS.LMTR.F.SecHeldUnderCollat2016-12-31T00:00:00Z

MS.LMTR.F.SecHeldUnderCollat2015-12-31T00:00:00Z11225


Thanks.

eikoneikon-data-apiworkspaceworkspace-data-apirefinitiv-dataplatform-eikonpython
1609195575943.png (16.5 KiB)
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.

Upvote
Accepted
39.2k 75 11 27

In a standardized balance sheet every standard line item is named, i.e. it is retrieved using a specific field name. The example in my previous response uses field names TR.F.BVExclOthEq and TR.F.SecHeldUnderCollat. You can group these fields (and all other named fields you'd like to retrieve) any way you like. E.g. you could use one get_data call to retrieve all fields that fall under assets and another call to retrieve all fields that fall under liabilities. Or you could create the list of fields where the first X fields fall under assets and the rest fall under liabilities.

The best way to explore the metadata for use with Eikon Data APIs is through CodeCreator app, which among other things allows you to search for field names or browse fields by category, see what parameters are applicable to selected field etc. And at the end it produces a code snippet, which you can copy & paste into whatever IDE you're using.

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.

Upvotes
39.2k 75 11 27

I'm not sure I quite understand the use case here, but it sounds to me like you're looking for a standardized balance sheet instead of "as reported" one, i.e. a balance sheet with standardized line items. If this is what you're looking for, create a list of the line items you're interested in and use them in the fields argument of get_data method, e.g.

df, err = ek.get_data(['MS.LM'], 
                      ['TR.F.BVExclOthEq',
                       'TR.F.SecHeldUnderCollat',
                       'TR.F.PeriodEndDate'], 
                      parameters = p )
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.

Hi @Alex Putkov.

ok, sound good, but is there a way to consult the line items group by section. Ej.


getting all the list item what belong to ASSETS Section or Liabilities section, because the main query at begining of the ticket

df, err = ek.get_data(['MS.LM'], ['TR.F.BalanceSheet.fieldName','TR.F.BalanceSheet.fielddescription', 'TR.F.BalanceSheet.date','TR.F.BalanceSheet'], parameters = p )


cannot find the way to separate by section.


thanks.


1609271447063.png (201.5 KiB)
Click below to post an Idea Post Idea