Arelle Webserver - How to Extract Income Statement from XBRL Registration?

I am trying to extract financial reporting information based on instruction type.

Let me explain to you in a little more detail.

I want to extract the income statement, balance sheet, and cash flow statement from an XBRL instance - especially US GAAP.

For me, the ideal solution would be to have tags in the XML file in such a way that I can extract the income statement with the tag <incomestatement>

, balance with <balancesheet>

and cash flow with <cashflow>

.

Please help me here. I am a beginner and not very experienced with XBRL.

+3


source to share


2 answers


Fortunately, retrieving financial statements is not that difficult. Here's how I was able to extract income information:

Replace the file = "" parameter with your own path. You can also replace url for file parameter



  1. Once you have an xml fact table in xml format, extract the role nodes where you can search for "StatementsOfOperations" for the income statement. While there are several variations of the income statement role identifier, there are not many.

Screenshot

+1


source


As far as I remember, a good place to look is the user-friendly labels associated with these roles.

The SEC places restrictions on how these labels look (for example, clause 6.7.12 of the Edgar Filing Guidelines), for example. 02 - Statement - Balance Sheet

... Profit and loss account, cash flow statement and balance sheet are typically found in labels with Statement

(as opposed to Disclosure

, Document

, Schedule

) between the two dashes.

The third part of the label itself will tell you where to find the income statement / cash flow statement / balance sheet, however the exact labels may differ between filters. In addition, there are several types (consolidated or unconsolidated, classified versus unclassified, etc.), and the complexity is further increased because sometimes the same record can contain multiple versions (consolidated and unconsolidated), so you you need some kind of domain to decide which one you need.



In a nutshell, you will need to do trial and error on real files to find the correct algorithm to filter these tags.

What should help you is that Charles Hoffman has done some research on the subject, which can be found , for example, here (section 1.5).

+1


source







All Articles