1 16 th XBRL International Conference Demystifying XBRL Formulas December 5, 2007 Herm Fischer.

Slides:



Advertisements
Similar presentations
1 Formula Status Update New Usage Patterns for FINREP Herm Fischer Formula Working Group
Advertisements

Herman Fischer, UBMatrix, Inc and Mark V Systems 19 November, 2009.
Large Instance Points 16th Eurofiling Workshop Wednesday 12 December Herm Fischer Mark V Systems Limited and Arelle open source XBRL processor.
Information Systems and Processes XBRL Formulae in a Nutshell Víctor Morilla VIII European Banking Supervisors XBRL Workshop Amsterdam November 2007.
XBRL Versioning Committee of European Banking Supervisors XBRL Network Vice-Chair VWG Katrin Schmehl Amsterdam, th European Banking Supervisors.
INFORMATION SYSTEMS AND PROCESSES XBRL FORMULAE MOTIVATION Víctor Morilla Member of CEBS XBRL Network IX European Banking Supervisors XBRL Workshop Paris.
Advanced XSLT. Branching in XSLT XSLT is functional programming –The program evaluates a function –The function transforms one structure into another.
XML Data Management 8. XQuery Werner Nutt. Requirements for an XML Query Language David Maier, W3C XML Query Requirements: Closedness: output must be.
XBRL Discussion Material A summary of discussions to date related to the components of a taxonomy for SEC EDGAR filing purposes.
XBRL Technology Track TECH7, Formula CR Extensions Update Herm Fischer October 20, 2010.
Bottom-up Evaluation of XPath Queries Stephanie H. Li Zhiping Zou.
Semantics Static semantics Dynamic semantics attribute grammars
Abstract Model PWD th Eurofiling Workshop 12 December 2012 Herm Fischer Abstract Model Task Force.
Features and Status May 31, 2012 open source xbrl platform.
XBRL Pacific Rim Technology WorkShop & Summit Intern program Hiroaki Sakakibara Fujitsu Limited.
Open Source and XBRL the Arelle Project 5th University of Kansas International Conference on XBRL April 29, 2011 open source xbrl platform.
XSLT XML DBs, and Schemas Week 18 DSA. The Whisky Case study XSLT can be applied in the client. –Add a xml processing instruction to the xml to bind to.
Program design example Task: Develop an algorithm expressed in pseudocode for a specified problem specified problem.
September 15, 2003Houssam Haitof1 XSL Transformation Houssam Haitof.
The views expressed in this presentation are those of the presenter, not necessarily those of the IASB or IFRS Foundation. International Financial Reporting.
Case Studies in XBRL Solutions Formula developments for Multiple Instance processing Herman Fischer, UBMatrix and Mark V Systems.
Introduction to XPath Bun Yue Professor, CS/CIS UHCL.
Sphinx a user-friendly assertion language David North Senior Developer, CoreFiling Eurofiling Workshop, Luxembourg, December 2013.
JSP Standard Tag Library
CSE3201/CSE4500 XPath. 2 XPath A locator for elements or attributes in an XML document. XPath expression gives direction.
Lecture 6 of Advanced Databases XML Schema, Querying & Transformation Instructor: Mr.Ahmed Al Astal.
TDDD43 XML and RDF Slides based on slides by Lena Strömbäck and Fang Wei-Kleiner 1.
CSE3201/CSE4500 Information Retrieval Systems
XP New Perspectives on XML Tutorial 6 1 TUTORIAL 6 XSLT Tutorial – Carey ISBN
WORKING WITH XSLT AND XPATH
1 CIS336 Website design, implementation and management (also Semester 2 of CIS219, CIS221 and IT226) Lecture 6 XSLT (Based on Møller and Schwartzbach,
Processing of structured documents Spring 2002, Part 2 Helena Ahonen-Myka.
Functional Modeling Question How do you know if you have enough information to compute the necessary output values? How do you know if you have.
Lecture 22 XML querying. 2 Example 31.5 – XQuery FLWOR Expressions ‘=’ operator is a general comparison operator. XQuery also defines value comparison.
1 16 th XBRL International Conference Practical Dimensions “No Primary Item Left Behind” December 5, 2007 Herm Fischer.
CSE3201/CSE4500 Information Retrieval Systems XSLT – Part 2.
“Convergence, Communication and Interactive Data” December 3-6, 2007 Vancouver, British Columbia, Canada.
Processing of structured documents Spring 2003, Part 7 Helena Ahonen-Myka.
XPath. Why XPath? Common syntax, semantics for [XSLT] [XPointer][XSLT] [XPointer] Used to address parts of an XML document Provides basic facilities for.
XSLT part of XSL (Extensible Stylesheet Language) –includes also XPath and XSL Formatting Objects used to transform an XML document into: –another XML.
Bill Payment Optimization Algorithms. Purpose To find and/or construct algorithms that will optimize the decision process of paying bills from an account.
Object-Oriented Program Development Using Java: A Class-Centered Approach, Enhanced Edition.
Consolidation and Entity Mapping: New XBRL Solutions David vun Kannon KPMG LLP.
EXist Indexing Using the right index for you data Date: 9/29/2008 Dan McCreary President Dan McCreary & Associates (952) M.
Database Systems Part VII: XML Querying Software School of Hunan University
Dimensions and Formulas for Financial Professionals Charles Hoffman, CPA – UBmatrix.
Tutorial 13 Validating Documents with Schemas
1 XML Data Management XPath Principles Werner Nutt.
XML Query: xQuery Reference: Xquery By Priscilla Walmsley, Published by O’Reilly.
XP New Perspectives on XML, 2 nd Edition Tutorial 7 1 TUTORIAL 7 CREATING A COMPUTATIONAL STYLESHEET.
Session II Chapter 3 – Chapter 3 – XPath Patterns & Expressions Chapter 4 – XPath Functions Chapter 15 – XPath 2.0http://
CSE3201/CSE4500 Information Retrieval Systems XSLT – Part 2.
University of Nottingham School of Computer Science & Information Technology Introduction to XML 2. XSLT Tim Brailsford.
XBRL Abstract Model Update PWD 2.0 progress (as of) Herm Fischer, Dave Frankel, Warwick Foster (the 3 F’s) Copyright © XBRL International.
CSE3201/CSE4500 XPath. 2 XPath A locator for items in XML document. XPath expression gives direction of navigation.
XPath --XML Path Language Motivation of XPath Data Model and Data Types Node Types Location Steps Functions XPath 2.0 Additional Functionality and its.
Lecture 23 XQuery 1.0 and XPath 2.0 Data Model. 2 Example 31.7 – User-Defined Function Function to return staff at a given branch. DEFINE FUNCTION staffAtBranch($bNo)
1 GL trial balance check balance-brought-forward D … standard D … account balances period’s changes D – debit C - credit Check if sections.
Advanced Accounting Information Systems Day 34 XBRL Instance Documents and Taxonomies November 13, 2009.
XML Schema – XSLT Week 8 Web site:
1 XSL Transformations (XSLT). 2 XSLT XSLT is a language for transforming XML documents into XHTML documents or to other XML documents. XSLT uses XPath.
UMass Lowell Computer Science Java and Distributed Computing Prof. Karen Daniels Fall, 2000 Lecture 10 Java Fundamentals Objects/ClassesMethods.
Business rules.
Formula Linkbase Tutorial (afternoon)
Formula Linkbase Tutorial
Querying and Transforming XML Data
CWA3 Standardized roll-out package Part 2: XBRL Handbook for Declarers
Data Modeling II XML Schema & JAXB Marc Dumontier May 4, 2004
Type & Typeclass Syntax in function
Public How to self-diagnose consolidation failures and performance issues in Financial Consolidation and Close (FCCS)? Question: How to self diagnose consolidation.
Presentation transcript:

1 16 th XBRL International Conference Demystifying XBRL Formulas December 5, 2007 Herm Fischer

2  Why, who needs formulas for what?  Historical perspectives  Process flow of formulas  Formula Linkbase  Contents  Formula processing  Features by use case example  DTS discovery  Functions  Built-in  End-user  Roadmap

3 Calculation Linkbase is Enough  Roll-ups validates item sums  Addition within equal context ◦ Period, entity, dimension are equal Calculation Linkbase Can ’ t Do  Cross context ◦ Movement (start + changes = end) ◦ Dimensions  Business rules

4  FDIC contract motivates solutions oConceptual prototype based on XSL oExcel-like, implicit matching (now in use)  “ - Rule base Requirements IWD  XPath syntax chosen  “ - Functions spec drafted.  Formula drafts, some implementations  Alternative approach with XQuery  2007 Jan- Issued Formula PWD  Feb, Mar - Survey of users, feedback  June – PWD update based on survey feedback  Dec (late) – PWD-2

5  Information producer oValidate data types and values oConsistency and quality checks  Information consumer o (ditto) oCompleteness checks oAugment received data with calculated values oAugment received data with annotations

6  Calculation linkbase oWell behaved roll-ups of compatible numerical values o(Proposed) Aggregation of dimensional values  Calculation linkbase can’t do oCross-context (ending bal = starting bal + changes) oCross-unit (dollars = price per share X nbr shares) oDimensional aggregation (all = red wine + white wine) oMissing items checks oThreshold and limits (sum amounts ± € 5)

7 Input inst. DTS contexts units fact items Formula LB* Formula Processor Output inst. computed fact items *Formula LB is part of DTS

8  Instance provides producer’s taxonomy, facts, and producer’s formulas  Consumer may have their own formulas, their own resulting items taxonomy  Formula processor ‘fires’ formulas that match to input fact items  Formula processor produces output instance with result fact items

9 Input inst. DTS contexts units fact items Formula Processor Output inst. computed fact items Formula LB* Parameter ( select expr.) custom function variable filter loclabelref. formula arc precondition *Formula LB is part of DTS

10 Input inst. DTS contexts units fact items Formula LB* For each/any formula (unordered) Evaluate parameters (if any) Filter/bind variables in their order Nested variable iteration Test precondition (if any) Evaluate value Produce output fact Output inst. computed fact items Formula Processor *Formula LB is part of DTS

11  Test that “assets = liabilities + equity” oInput instance has assets, liabilities, and equity oOutput boolean test result, true or false

12  Processing flow Input inst. DTS assets, liab, equity Formula LB* Formula Processor Output inst. Test result boolean *Formula LB is part of DTS

13  Instance document input has values to test  Output is the boolean result of testing the sum same context units match

14

15

16

17

18

19  Prior example tested assets = equity + liabilities ◦ 3 inputs (assets, equity, liabilities) ◦ 1 output (boolean test)  Now no input sum - compute sum as the result ◦ 2 inputs (equity, liabilities) ◦ 1 output (monetary assets)

20  Taxonomy has monetary concepts for assets, liabilities, equity  Here output is the assets concept (vs. boolean) Last example:

21  Instance document input has values to add  Output is the monetary result of adding the sum same context units match

22

23  Parameter  Function declaration  Formula  Variables  Filters  Precondition  Generic label  Generic reference

24  Provide input parameters to formula processor ◦ From external source (invocation of processor) ◦ Or from XPath expression in Parameter  May be required (or optional)  Evaluated before any formula variable (Parameter resources can have arcs to labels & references)

25  Declare functions usable in XPath expressions ◦ May be user-supplied ◦ May be built-in to formula processor ◦ May relate to formula registry  Function input parameters ◦ Order, data type  Function name  Function output data type (Function declarations can have arcs to labels & references)

26  Value expression  Concept (either fact variable name or arc to loc)  Context & Unit (where needed) ◦ Fact variable reference (copy from fact variable) ◦ Override facets by xml (e.g., period, measure)  Arcs to variables, precondition (Formula resources can have arcs to labels & references)

27  Fact variables ◦ Bind to input instance fact items/tuples ◦ Arcs to filters constrain which input facts to bind to ◦ Iterates through filtered input facts or returns sequence  General variables ◦ An XPath expression (not to input fact nodes) ◦ Produce sequence or individual atomic results ◦ No arcs to filters  Order in formula by dependency of variables & filters (Variables may have arcs to labels & references)

28  Specify a facet to use as fact predicate ◦ Have arc(s) from fact variable(s)  Available filter facets ◦ Concept, Dimension, Entity, Period, Tuple, Unit, Value, and General (XPath expression)  Implicit filtering ◦ Automates matching non-explicitly filtered facets  Variable-set ◦ PWD 2 feature facilitating filter grouping (Filters can have arcs to labels & references)

29  Provides an XPath expression to test  Runs after parameters and variables are bound  Arc-connected from formula resource(s)  PWD 2 adds variable-set precondition feature (Preconditions can have arcs to labels & references)

30  Annotates descriptive text on any ◦ Resource (e.g., any in formula LB) ◦ Element in xsd (e.g., concept, arc type, etc.)  Arc connected (from resource or element)  Unconstrained contents

31  Provides link:part’s to any ◦ Resource (e.g., any in formula LB) ◦ Element in xsd (e.g., concept, arc type, etc.)  Arc connected (from resource or element)

32  Concept filter  Dimension filter  Entity filter  General filter  Period filter  Tuple filter  Unit filter  Value filter  PWD-2 additions: Boolean, Match, Relative

33  Filter by name of concept  Filter by facet of concept ◦ Balance ◦ Data type ◦ Substitution group ◦ Period type ◦ Custom attribute

34  Sum test uses a concept filter on each variable eg:assets

35  Match completely another variable’s period  Match date date/time of: ◦ periodStart ◦ periodEnd ◦ periodInstant ◦ periodInstantDuration  Matching by an XPath 2 expression

36  Ending balance = beginning balance + changes  Inputs have cross-context matching oStarting balance’s date matches duration’s start oEnding balance’s date comes from duration’s end

37

38  PeriodStart filter matches change’s duration start date to beginningBalance’s instant date <pf:periodStart date=“xfi:period-instant( xfi:period($beginningBalance))” />

39  Location (tuple nesting) (both tuple & item)  Concept (namespace & name) ( “ )  Entity identifier (item only)  Period ( “ )  Segment (complete, nonXDT, or dimension) ( “ )  Scenario ( “ ) ( “ )  Unit (numeric items only)

40 Context Entity - IdentifierAll - SegmentAll PeriodAll ScenarioAll Unit Name MeasureAll ConceptAll Default Implicit Search Criteria + Explicit Criteria from Variable Definition Context Entity - Identifier - Segment Period Scenario Unit Name Measure Concept‘Balance’ = Search Criteria for Variable Context Entity - IdentifierAll - SegmentAll PeriodAll ScenarioAll Unit Name MeasureAll Concept‘Balance’ Carried forward Implicit Search Criteria Context Entity - Identifier01 - SegmentNone PeriodI-2007 ScenarioNone Unit Name MeasureUSD ConceptAll LocationAll Location All LocationNot tuple

41 Context Entity - Identifier01 - SegmentNone PeriodI-2007 ScenarioNone Unit Name MeasureUSD ConceptAll Beginning Balance Implicit Search Criteria + Explicit Criteria from Variable Definition Context Entity - Identifier - Segment PeriodInst match duration start Scenario Unit Name Measure Concept‘Changes’ = Search Criteria for Variable Context Entity - Identifier01 - SegmentNone PeriodD-2008 ScenarioNone Unit Name MeasureUSD Concept‘Changes’ Carried forward Implicit Search Criteria Context Entity - Identifier01 - SegmentNone PeriodD-2008 ScenarioNone Unit Name MeasureUSD ConceptAll LocationNot tupleLocation not tuple LocationNot tuple

42  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

43  Result concept takes concept of a bound variable instead of loc & arc

44  Try it, examine it, execute it online: ◦ Directory …\xml\examples\0004 Movement

45  Ending stock = starting stock + inflow – outflow ◦ Starting context (instant at start date) ◦ Flow/change context (duration from start to end) ◦ Ending context (instant at end date)  Inputs have cross-context period matching ◦ Starting stock’s instant date matches inflow & outflow duration starts ◦ Both inflow & outflow need periodStart matching  Output result (ending stock) gets inflow/outflow duration ending date ◦ Formula specifies period for ending stock

46 result’s period is duration end period start filtering

47  Try it, examine it, execute it online: ◦ Directory …\xml\examples\0003 Stock Flow

48  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

49  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)

50 balance-brought-forward D … standard D … account balances period’s changes D – debit C - credit Check if sections are in balance: sum(amts with ‘D’ siblings) = sum(amts with ‘C’ siblings)

51  Just an XPath 2 expression ◦ Need to test if sibling of amount is credit code D ◦ test=“../gl-cor:debitCreditCode eq ‘D’”

52

53  Value matches an XPath 2 expression  Not Nil test  Nil test  Precision expression

54 balance-brought-forward 5100 Supplies account D beginning_balance … standard … … aggregate by account skip ending_balances

55

56  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

57  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

58  Explicit Dimension filter ◦ Fact has QNamed dimension (in context or default) ◦ Constrained if arcs to allowed member concepts  Dimension Member filter ◦ Constrains to member’s children or its descendants  Typed Dimension filter ◦ Typed dimension is specified by QName ◦ XPath 2 expression tests dimension value

59  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

60  Test aggregation of each member  Products & region dimensions have member hierarchy

61  Multiple periods for used dimensions  Multiple dimensions per contexts (Charlie’s aggregation example)

62  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

63

64  Try it, examine it, execute it online: ◦ Directory …examples\0005 Pharmaceutical

65  Weighted average of its dimensional children by another primary item

66  Excel formulas:  Make PD controlling fact, get PD and EV of dimensional children  General variable for PDxEV member matching

67

68  Try it, examine it, execute it online: ◦ Directory …\xml\examples\0006 Weighted Avg

69  Boolean filter ◦ Allows grouping and/or filter expressions  Match filter ◦ Specifies specific aspects to match  Relative filter ◦ Specify matching all non-covered aspects

70  Assertions are alternate to formula item production  Fact Consistency assertion ◦ Produced fact matches corresponding fact(s), in value  Existence assertion ◦ Filtering constructs find existing fact item  Value assertion ◦ Value-assertion expression is true

71  Built-in functions ◦ Functions 1.0 December 7, htm  User-defined functions ◦ Signatures provided in linkbase resources ◦ Code provided to formula processor somehow  Maybe XQuery  Maybe Java or other coding language

72  Precision ◦ xfi:precision( item ) ◦ xfi:decimals( item )  Accessors ◦ xfi:context( item ) ◦ xfi:unit( item ) ◦ xfi:period( context ) ◦ xfi:period-start, :period-end, :period-instant( period )

73  Comments to re-issued PWD  Implement formula processors  Implement formula editors  Discuss additional desired features ◦ Formula chaining ◦ Tuple output production ◦ Multiple-input instances, DTSes ◦ other

74 Herm Fischer THANK YOU! Let us help you get your first formulas easily!