简体   繁体   English

Arelle Webserver - 如何从 XBRL 文件中提取损益表?

[英]Arelle Webserver - How to extract the income statement from an XBRL filing?

I am trying to extract financial statement information based on type of the statement.我正在尝试根据报表类型提取财务报表信息。

Let me explain to you in a little more details.让我更详细地向您解释一下。

I want to extract the income statement, balance sheet and cash flow statement from an XBRL instance – especially US GAAP.我想从 XBRL 实例中提取损益表、资产负债表和现金流量表——尤其是美国 GAAP。

For me, the perfect solution would be to have tags in the XML file in such a way that I can extract the income statement with tag <incomestatement> , balance sheet with <balancesheet> and cash flow with <cashflow> .对我来说,完美的解决方案将是在XML文件中的标签以这样的方式,我可以用标签提取利润表<incomestatement> ,资产负债表<balancesheet>与和现金流量<cashflow>

Please help me here.请在这里帮助我。 I am a novice and do not posses much background in XBRL.我是新手,没有太多 XBRL 背景。

Fortunately, it is not that difficult to extract financial statements.幸运的是,提取财务报表并不难。 Here is how I was able to extract income statement info:以下是我如何提取损益表信息:

  1. Use arelle web server to get the complete fact table as shown below: http://localhost:8080/rest/xbrl/view?file=c:/Python/SEC-EDGAR/sec/2017/01/0001530425-0001477932-17-000505-xbrl.zip&view=factTable&media=xml使用arelle web server获取完整的事实表如下图: http://localhost:8080/rest/xbrl/view?file=c:/Python/SEC-EDGAR/sec/2017/01/0001530425-0001477932-17 -000505-xbrl.zip&view=factTable&media=xml

Replace the file="" parameter with your own path.将 file="" 参数替换为您自己的路径。 You can also substitute url for file parameter您还可以将 url 替换为文件参数

  1. Once you have xml fact table in xml format, extract role nodes where for income statement, you can look for "StatementsOfOperations".一旦您拥有 xml 格式的 xml 事实表,将角色节点提取到损益表的位置,您可以查找“StatementsOfOperations”。 Even though there are a few variations for income statement role id, they are not that many.尽管损益表角色 ID 有一些变化,但它们并没有那么多。

截屏

As far as I recall, the right place to look at is the user-friendly labels associated with these roles.据我回忆,正确的查看位置是与这些角色相关的用户友好标签。

The SEC places restrictions on how these labels look like (eg, paragraph 6.7.12 of the Edgar Filing Manual), eg 02 - Statement - Balance Sheet . SEC 对这些标签的外观进行了限制(例如,埃德加归档手册的第 6.7.12 段),例如02 - Statement - Balance Sheet The income statement, cash flow statement and balance sheet are commonly found in labels with Statement (as opposed to Disclosure , Document , Schedule ) between the two dashes.损益表、现金流量表和资产负债表通常出现在两个破折号之间带有Statement (与DisclosureDocumentSchedule相对)的标签中。

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 vary between filers.标签本身的第三部分会告诉您在哪里可以找到损益表/现金流量表/资产负债表,但确切的标签可能因申报人而异。 Also, there are several kinds of these (consolidated vs. unconsolidated, classified vs. unclassified, etc), and the complexity is further increased because sometimes, the same filing may contain several versions (consolidated and unconsolidated), so that you need some domain expertise to decide which one you need.此外,这些有几种类型(合并与未合并、分类与未分类等),并且复杂性进一步增加,因为有时同一个文件可能包含多个版本(合并未合并),因此您需要一些域专业知识来决定您需要哪一种。

In a nutshell, you will need to do some trial and error on real filings in order to find the right algorithm to filter these labels.简而言之,您需要对真实的文件进行一些试验和错误,以便找到过滤这些标签的正确算法。

What should help you though, is that Charles Hoffman has done some research on this, which for example can be found here (section 1.5).不过,应该对您有所帮助的是,Charles Hoffman 对此做了一些研究,例如可以在此处找到(第 1.5 节)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM