XBRL stands for Extensible Business Reporting Language and is an XML-based file which uses accepted financial reporting standards to exchange financial statements across all systems.

According to the XBRL.org website, “The international XBRL consortium is supported by more than 600 member organisations, from both the private and public sectors”. And some of the most important features of XBRL are: Testable Business Rules and Strong Software Support.

Recently, in FlexRule we have built a software application based on Charles Hoffman’s Fundamental Accounting Concepts. In this app, we can validate SEC Filings against the Fundamental Accounting Concepts (accounting's business rules).

In this project, we have modelled all the networks (Balance Sheet, Income Statement, etc.). In this article, all examples and screenshots are taken from the Balance Sheet network. Below is a flow that shows how we modelled the steps:

xbrl process steps

As you can see from the above screenshot, the Flow contains 4 steps, as follows:

  1. Load XBRL instance
  2. Reading reported facts by mapping
  3. Imputing related information that are not reported
  4. Running accounting consistency rules

Load XBRL instance

In this step, we load the XBRL instance in order to have full control of all of its elements.
FlexRule can deal with complex XML documents easily as part of its dynamic and powerful expression language. You don't need even to use any external utility. To learn more please check XML101.

Reported Facts and Mappings

According to the each XBRL accounting Concept, each related Fact has its own mapping in the instance.
So in the second step, for each Fact we created a Decision Table capable of searching in the XBRL instance to find an existing mapping for each Fact.

For example, as you can see in the screenshot below, Assets can be reported in 2 addresses: us-gaap:Assets and us-gaap:AssetsCurrent

xbrl mapping Decision tables

If no mapping is found, then the Fact is flagged for further investigation.

Complex Dependencies

The Decision Requirement Diagram (DRD) allows us to resolve the hierarchical mappings for all reported Facts. As you can see in the screenshot below, all Facts have been added to a DRD.

xbrl mapping dependencies decision requirement diagram drd

There are multiple different DRDs in the solution that allows resolving dependencies for each individual networks. The above example is for “Balance Sheet Classified”.

Imputing Rules

In step 3, we used a decision logic (Decision Table) for imputing the rules. In this step, according to the reported Fact’s values and Impute rules, we might come up with new values for some Facts. Here is an example of one of the Impute rules:

(($Assets = 0) and not($LiabilitiesAndEquity = 0) and ($CurrentAssets = $LiabilitiesAndEquity))
($Assets = $CurrentAssets) else ($Assets = $Assets)

Consistency Rules

And in the last step, by having all Facts values (reported and imputed), we will run multiple decision logic in form of Decision Tables to find out which consistency rules will be met.

Below is an example of consistency Decision Tables:
xbrl accounting Consistency Rules

To learn more about how decision table works have a look at our resource hub.

In future posts we will talk more about our software application and the way it works.

Last updated December 15th, 2020 at 08:28 am, Published March 20th, 2017 at 08:28 am