1 / 65

XBRL Technology Track TECH7, Formula Formula Overview Herm Fischer October 20, 2010

21 st XBRL International Conference “One Language, Common Vision: Role of XBRL Technology in the Post Crisis Era” 19-21 October 2010 Beijing, China. XBRL Technology Track TECH7, Formula Formula Overview Herm Fischer October 20, 2010. Historical Perspectives.

Download Presentation

XBRL Technology Track TECH7, Formula Formula Overview Herm Fischer October 20, 2010

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 21st XBRL International Conference“One Language, Common Vision: Role of XBRL Technology in the Post Crisis Era”19-21 October 2010Beijing, China XBRL Technology Track TECH7, Formula Formula Overview Herm Fischer October 20, 2010

  2. Historical Perspectives • 2002 - FDIC contract motivates solutions • “ - Rule base Requirements IWD • 2003 - XPath syntax chosen • “ - Functions spec drafted. • 2004 - Formula drafts, some implementations • 2006 - Alternative approach with XQuery • 2007 Jan- Issued Formula PWD • Feb, Mar - Survey of users, feedback • June, Dec, Feb – PWD updates after PWD feedbacks • Mar 2008 – Candidate Release (spec) & Test Suite • May 2008 – Implementations of processors • Sept 2008 – Production formulas (COREP, FINREP) • Dec 2008 – CR-2 (dimensions and other fixes) • Jun 2009– Recommendation • 2010– CR extension modules

  3. Formulas & Assertions • Formula • Results in an fact item • For an output instance document • For consistency checking of corresponding input • Assertion • Consistency check computed item to source item • Existence check for source item • Value check based on source items

  4. Process flow of formula linkbase Formula LB* Output inst.computedfact items Input inst.DTS contextsunitsfact items FormulaProcessor Assertionsconsistency existence value *Formula LB is part of DTS

  5. Input instance processing • Instance: producer’s taxonomy, facts, and producer’s formulas • Consumer may have their own formulas • Processor evaluates formulas and assertions • Processor may produce output instance with result fact items • User’s application may report based on assertion test results

  6. Formula linkbase contents Formula LB* arc formula assertion Parameter(select expr.) variable filter customfunction precondition label ref. Input inst.DTS contextsunitsfact items Output inst. computed fact items FormulaProcessor Assertionsconsistencyexistence value *Formula LB is part of DTS

  7. Four processing models

  8. Examples of each model

  9. Consistency assertion processing Formula LB* • For each consistency assertion • For each arc-connected formula • Evaluate variables to produce resulting fact item • Compare to matching item in source instance document FormulaProcessor Assertionsconsistencyresult Input inst.DTS contextsunitsfact items Output inst.computedfact items *Formula LB is part of DTS

  10. Formula processing Formula LB* • For each/any formula (unordered) • Evaluate parameters (if any) • Filter/bind variables by dependency • Nested variable iteration • Test precondition (if any) • Evaluate value • Produce output fact FormulaProcessor Input inst.DTS contextsunitsfact items Output inst.computedfact items *Formula LB is part of DTS

  11. Value assertion processing Formula LB* • For any value assertion • Evaluate parameters (if any) • Filter/bind variables by dependency • Nested variable iteration • Test precondition (if any) • Evaluate value assertion expression FormulaProcessor Input inst.DTS contextsunitsfact items Assertionsvaluetestingresult *Formula LB is part of DTS

  12. Existence assertion processing Formula LB* • For each existence assertion • For each set of evaluated variables • Count successful evaluations • Apply a test to the count FormulaProcessor Input inst.DTS contextsunitsfact items Assertionscount testresult *Formula LB is part of DTS

  13. Value assertion test of assets • Test that “assets = liabilities + equity” • Input instance has assets, liabilities, and equity • Value assertion tests to threshold(assets – (liabilities + equity)) < threshold

  14. Assets sum test, flow • Processing flow Formula LB* FormulaProcessor Assertion.result Input inst.DTS assets, liab, equity *Formula LB is part of DTS

  15. Input instance <context id="context"> <entity> <identifier scheme="http://xbrl.org/entity/identification/scheme">01</identifier> </entity> <period> <instant>2007-12-31</instant> </period> </context> <unit id="unit"> <measure>iso4217:EUR</measure> </unit> <eg:assets precision="0" contextRef="context" unitRef="unit">12345.60</eg:assets> <eg:equity precision="0" contextRef="context" unitRef="unit">23456.70</eg:equity> <eg:liabilities precision="0" contextRef="context" unitRef="unit">-11111.10 </eg:liabilities>

  16. Assets sum test, instances • Instance document input has values to test • Output assertion results

  17. Assets sum test, formula

  18. Assets sum test, assertion <va:valueAssertionxlink:type="resource" xlink:label="assertion" id="assertion" aspectModel="dimensional" implicitFiltering="true" test="abs($assets - ($equity + $liabilities)) le 0.01"/>

  19. Fact variables <va:valueAssertionxlink:type="resource" xlink:label="assertion" id="assertion" aspectModel="dimensional" implicitFiltering="true" test="abs($assets - ($equity + $liabilities)) le 0.01"/> <variable:variableArcxlink:type="arc“ xlink:arcrole="http://xbrl.org/arcrole/2008/variable-set" name="assets" xlink:from="assertion" xlink:to="vAssets" order="1.0"/> <variable:factVariablexlink:type="resource" xlink:label="vAssets" bindAsSequence="false"/>

  20. Concept filter • Filter by name of concept • Filter by facet of concept • Balance • Data type • Substitution group • Period type • Custom attribute

  21. Concept name filter • Use a concept filter on each variable <cf:conceptNamexlink:type="resource" xlink:label="filter_assets“> <cf:name strict=“true”> <cf:qname>c:assets</cf:qname> </cf:name> </cf:conceptName>

  22. Assets sum test, formula execution

  23. Alternatives • We have used a value assertion • A formula produces an output fact item • E.g., produce result assets = equity + liabilities (instead of value assertion) • A consistence assertion compares formula to input fact • E.g., produce result assets and compare to input assets

  24. Formula computes result fact

  25. Consistency assertion compares formula to fact

  26. Period filter • Match completely another variable’s period • Match date date/time of: • periodStart • periodEnd • periodInstant • forever • instantDuration (to a duration factVariable) • Matching by an XPath expression

  27. Period filter - Movement example • Ending balance = starting balance + changes • Inputs have cross-context matching • Starting balance’s date matches duration’s start • Ending balance’s date comes from duration’s end

  28. Movement example <eg:balance precision="0" contextRef="I-2007" unitRef="unit">12345.60</eg:balance> <eg:changes precision="0" contextRef="D-2008" unitRef="unit">11111.10</eg:changes> <eg:balance precision="0" contextRef="I-2008" unitRef="unit">23456.70</eg:balance>

  29. Assertion and results

  30. Formula execution

  31. Use case, movement example <pf:instantDuration variable="changes" boundary=“start" /> <pf:instantDuration variable="changes" boundary="end" />

  32. Implicit filter, changes Carried forward uncovered aspects Default implicit search aspects Explicit aspect from variable definition Search aspects for Variable = + covered aspect

  33. Implicit filter, beginning balance Uncovered aspects search criteria Explicit aspects from variable definition Carried forward uncovered aspects Search aspects for variable = + covered aspect

  34. Aspects • Location (tuple nesting) (both tuple & item) • Concept (namespace & name) ( “ ) • Entity identifier (item only) • Period ( “ ) • Dimension (seg/scen agnostic) • Segment (complete, or nonXDT) ( “ ) • Scenario ( “ ) ( “ ) • Unit (numeric items only)

  35. Implicit scenario & segment issues • Dimensional implicit filters • Dimension contents are matched with d-equals • Remaining contents matched with s-equals • Non-dimensional implicit filters • Contents matched with s-equals

  36. Tuple filter • ParentTuple • Concept name of the fact’s tuple parent • AncestorTuple • Concept name of a fact’s ancestor • TupleSibling • Another variable’s fact is a sibling of this fact • TupleLocation • Another variable’s fact is a given relation to this fact • E.g., $a is “../eg:tupleB/*” related to this fact

  37. GL-based tuple examples (tuples in, non-tuples out) • Trial balance in-balance checks • For each entry details section check if in-balance • Output string result item (for this example) • Trial balance ending balances report • For each account add changes to balance brought fwd • Aggregate account across entry detail sections • Output string result item (acct name & ending balance) • (Research into tuple generation is discussed later)

  38. GL trial balance check <xbrli:xbrl> <gl-cor:accountingEntries> <gl-cor:entryHeader> <gl-cor:qualifierEntry …>balance-brought-forward</ …> <gl-cor:entryDetail> <gl-cor:amount …>242678.26</ …> <gl-cor:debitCreditCode …">D</ …> </gl-cor:entryDetail> … </ gl-cor:entryHeader> <gl-cor:entryHeader> <gl-cor:qualifierEntry …>standard</ …> <gl-cor:entryDetail> <gl-cor:amount …>242678.26</ …> <gl-cor:debitCreditCode …">D</ …> </gl-cor:entryDetail> … </ gl-cor:entryHeader> </ gl-cor:accountingEntries> </ xbrli:xbrl> accountbalances D – debit C - credit period’schanges Check if sections are in balance: sum(amts with ‘D’ siblings) = sum(amts with ‘C’ siblings)

  39. General filter • Just an XPath 2 expression • Need to test if sibling of amount is credit code <gl-cor:entryDetail> <gl-cor:amount …>242678.26</ …> <gl-cor:debitCreditCode …">D</ …> </gl-cor:entryDetail> • test=“../gl-cor:debitCreditCode eq ‘D’”

  40. Trial balance checks

  41. Value filter • Value matches an XPath 2 expression • Not Nil test • Nil test • Precision expression

  42. GL ending balance computation <xbrli:xbrl> <gl-cor:accountingEntries> <gl-cor:entryHeader> <gl-cor:qualifierEntry …>balance-brought-forward</ …> <gl-cor:entryDetail> <gl-cor:account> <gl-cor:accountMainID …>5100</ …> <gl-cor:accountMainDescription …>Supplies</ …> <gl-cor:accountType …>account</ …> </gl-cor:account> <gl-cor:amount …>242678.26</ …> <gl-cor:debitCreditCode …">D</ …> <gl-cor:xbrlInfo> <gl-cor:xbrlInclude …>beginning_balance</…> </gl-cor:xbrlInfo> </gl-cor:entryDetail> … </ gl-cor:entryHeader> <gl-cor:entryHeader> <gl-cor:qualifierEntry …>standard</ …> <gl-cor:entryDetail> … </gl-cor:entryDetail> … </ gl-cor:entryHeader> </ gl-cor:accountingEntries> </ xbrli:xbrl> aggregate by account skip ending_balances

  43. GL ending balance computation

  44. GL ending balance test • Added 2 more variables • For each account • Get amount for ending-balance entry with ‘C’ (credit) code • Get amount for ending-balance entry with ‘D’ (debit) code • Change equation to test • Sum (credits which are not ending-balance - debits which are not ending-balance + credit which is ending-balance – debit which is not ending-balance) < 1.00

  45. GL example code • Try it, examine it, execute it online: • Directory …examples\0007 GL Examples • Instance-trial-balance-check.xml • Instance-test-ending-balance.xml • Instance-compute-ending-balance.xml

  46. Dimension filter • Explicit Dimension filter • Fact has QNamed dimension (in context or default) • Constrains to QNamed member(s), or their children or descendants • Typed Dimension filter • Typed dimension is specified by QName • XPath 2 expression tests dimension value

  47. Dimension filter, implicit interactions • Primary items with multiple dimensions • Dimensions explicity filtered • Remaining dimensions implict matched • Remainder of segment/scenario implicit matched • Example has 2 dimensions (product, region) • Aggregation check by product or region requires implicit matching of other dimension

  48. Dimension aggregation • Test aggregation of each member • Products & region dimensions have member hierarchy

  49. Pharmaceutical example • Multiple periods for used dimensions • Multiple dimensions per contexts (Charlie’s aggregation example)

  50. Two dimensions to check • Will require checking of aggregation for • Product dimension • Region dimension • Formula shown for product dimension(region is same except for dimension name) • Demonstrates mixed explicit/implicit dimension filtering

More Related