Birelle and BCDL XBRL assertion generation Régis
Description: Birelle and BCDL XBRL assertion generation Régis Décamps, ACP - BdF 16122012 1 Generate XBRL assertions directly? var:factVariable xlink:typeresource xlink:labelvar26 bindAsSequencefalse fallbackValue0
Related Topics
Download Presentation
"Birelle and BCDL XBRL assertion generation Régis" is the property of its rightful owner. Permission is granted to download and print the materials on this website for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.
Presentation Transcript
slide1. Birelle and BCDL XBRL assertion generationRégis Décamps, ACP - BdF 16/12/2012 1<br>
slide2. Generate XBRL assertions directly? <var:factVariable xlink:type="resource" xlink:label="var_26" bindAsSequence="false" fallbackValue="0"/>
<var:variableFilterArc xlink:arcrole="http://xbrl.org/arcrole/2008/variable-filter" xlink:from="var_A26" xlink:to="Concept_s2md_met_mi_AS_D1_A26" xlink:type="arc" complement="false" cover="true" order="1"/>
<cf:conceptName xlink:type="resource" xlink:label="Concept_s2md_met_mi_AS_D1_A26">
<cf:concept>
<cf:qname>s2md_met:mi_AS_D1_A26</cf:qname>
</cf:concept>
</cf:conceptName>
<!--Assertion AS_D1_P100: A26 = A22 * A23-->
<va:valueAssertion id="AS_D1_P100" xlink:label="AS_D1_P100" xlink:type="resource" implicitFiltering="true" aspectModel="dimensional" test="abs( ($var_A26) - (($var_A22 * $var_A23)) ) le 3000"/>
<!--Assertion AS_D1_P100: References to factVariables-->
<var:variableArc xlink:arcrole="http://xbrl.org/arcrole/2008/variable-set" xlink:from="AS_D1_P100" xlink:to="va_A26" xlink:type="arc" name="var_A26"/> 16/12/2012<br>
slide3. Use a taxonomy designer? Help to write XBRL
But still tedious
Cannot apply templates
eg: a design pattern for a tolerance margin 16/12/2012<br>
slide4. Our approach: a Domain specific language Express the checks in a configuration file 4 16/12/2012<br>
slide5. From BCDL to XBRL assertions 16/12/2012 XBRL
taxonomy BCDL files XBRL assertion
Linkbases XBRL assertions generation process with BCDL files Birelle<br>
slide6. The BCDL grammar The BCDL grammar is defined with BNF
It can express all types of checks seen in Solvency II:
Type of fact value
belongs to an enumeration
constraint on string length
Item aggregation
Dimension aggregation
Custom business check 16/12/2012<br>
slide7. BCDL examples in Solvency II PoC Primary item aggregation
A14 = A14B + A14C
Type: Enumeration
A16 in {‘PU:N', ’PU:YNGNS', ’PU:YNGS'}
Type: string length
Length(AS_D1_A10) <= 20
Type: Value restriction
A22A[SS:x1][PLID][IDX] >= 0
Type: regex match
A15[SS:x1][IDX] =~ '[A-Z]{2}[0-9][A-F]' 7 16/12/2012<br>
slide8. BCDL examples in Solvency II PoC Dimension Item aggregation
Assertion = X[OC;x0] = sum(X[!OX:x0])
X = {A4, A12, A16, L10, L25A}
Custom business check:
A26[PLID] = A23A * A22A[PLID] + A30[PLID])
For-all sum
A3[VG:x2] = SUM({(A3[PLID][IDX] = 'N') && (A15[IDX] =~ '..9(3|5)')}A26[PLID][IDX])
Inter-table checks 8 16/12/2012<br>
slide9. Questions?<br>
slide10. Birelle improves assertions Detect Global dimension filters:
A[D][E] = B[D][E] + C[D]
Global filter: [D]A[E] = B[E] + C
Tolerance margin pattern
A = B
abs(A-B) < M<br>
slide11. Our own abstract model Detect reused ConceptVariable
If a variable is used in two assertions, it is defined once, and reused.
Including filters<br>
slide12. xlink:type: arcxlink:arcrole:…//variable-set(order: nnn) xlink:from variable:arc xlink:to PreCond_%FilingInd xlink:type: arcxlink:arcrole:…//variable-setname: xxxx (order: nnn) xlink:from variable:arc xlink:to %1 %1Total xlink:type: arcxlink:arcrole:…//variable-filtercomplement: falsecover: true
order: nnn xlink:from variable:variableFilterArc xlink:to %1_%pi[_%dv[_%dv…]] xlink:type: resource
test: xpath expression gf:general xlink:to Generql_filter S_0032 xlink:type: resource
bindAsSequence: false/true
select:{generated} xlink:label: variable:generalVariable Assertion Messages Filing Indicators Concept Variables General variables Concept Filters Concept Dimension Filters General Filter S_0011 xlink:type: arcxlink:arcrole:…//variable-set-precondition(order: nnn) xlink:from variable:arc xlink:to id:
test:{generated} xlink:label: variable:precondition %1 Preconditions PreCond_%FilingInd General_filter xlink:type: arcxlink:arcrole:…//variable-filtercomplement: falsecover: true
order: nnn xlink:from variable:variableFilterArc xlink:to %1DetailDimFilter %1_%pi[_%dv[_%dv…]] xlink:type: arcxlink:arcrole:…//variable-set-precondition(order: nnn) xlink:from variable:arc xlink:to id:
xlink:type: resource
test:: … xlink:label: Period/Unit_Filter Period/Unit filter Period/Unit_Filter pf:period/uf:singleMeasure Period/Unit_Filter %1_%pi[_%dv[_%dv…]] xlink:type: arcxlink:arcrole:…//variable-set-precondition(order: nnn) xlink:from variable:arc xlink:to S_0041 id:
xlink:type: resource
test:: … xlink:label: Period/Unit_Filter S_0040 Period/Unit filter Period_Filter pf:period/uf:singleMeasure Period/Unit_Filter %1_%pi[_%dv[_%dv…]] S_0032 Exclusion Dimension Filter xlink:type: arcxlink:arcrole:…//variable-filtercomplement: truecover: true
order: nnn xlink:from variable:variableFilterArc xlink:to %1DetailDimFilter %1_%pi[_%dv[_%dv…]] xlink:type: arcxlink:arcrole:…//variable-set-filtercomplement: falseorder: nnn xlink:from variable:variableSetFilterArc xlink:to %1_%pi[_%dv[_%dv…]] xlink:type: resource
df:dimensiondf:member (0…n) df:explicitDimension xlink:to Group_filter Group Filters Group_filter Group_filter Unit filter can only be used for numerique variable<br>
slide13. What was easy to do Programming with python
Parsing a INI configuration file
Parsing a taxonomy
Serializing XBRL, once the model is created
Having acceptable performances<br>
slide14. What was challenging Writing a DSL
pyparsing creates conflicts with DSL inheritance
Generating XBRL models
bindAsSequence=true|false
Handling of typed dimension<br>
slide2. Generate XBRL assertions directly? <var:factVariable xlink:type="resource" xlink:label="var_26" bindAsSequence="false" fallbackValue="0"/>
<var:variableFilterArc xlink:arcrole="http://xbrl.org/arcrole/2008/variable-filter" xlink:from="var_A26" xlink:to="Concept_s2md_met_mi_AS_D1_A26" xlink:type="arc" complement="false" cover="true" order="1"/>
<cf:conceptName xlink:type="resource" xlink:label="Concept_s2md_met_mi_AS_D1_A26">
<cf:concept>
<cf:qname>s2md_met:mi_AS_D1_A26</cf:qname>
</cf:concept>
</cf:conceptName>
<!--Assertion AS_D1_P100: A26 = A22 * A23-->
<va:valueAssertion id="AS_D1_P100" xlink:label="AS_D1_P100" xlink:type="resource" implicitFiltering="true" aspectModel="dimensional" test="abs( ($var_A26) - (($var_A22 * $var_A23)) ) le 3000"/>
<!--Assertion AS_D1_P100: References to factVariables-->
<var:variableArc xlink:arcrole="http://xbrl.org/arcrole/2008/variable-set" xlink:from="AS_D1_P100" xlink:to="va_A26" xlink:type="arc" name="var_A26"/> 16/12/2012<br>
slide3. Use a taxonomy designer? Help to write XBRL
But still tedious
Cannot apply templates
eg: a design pattern for a tolerance margin 16/12/2012<br>
slide4. Our approach: a Domain specific language Express the checks in a configuration file 4 16/12/2012<br>
slide5. From BCDL to XBRL assertions 16/12/2012 XBRL
taxonomy BCDL files XBRL assertion
Linkbases XBRL assertions generation process with BCDL files Birelle<br>
slide6. The BCDL grammar The BCDL grammar is defined with BNF
It can express all types of checks seen in Solvency II:
Type of fact value
belongs to an enumeration
constraint on string length
Item aggregation
Dimension aggregation
Custom business check 16/12/2012<br>
slide7. BCDL examples in Solvency II PoC Primary item aggregation
A14 = A14B + A14C
Type: Enumeration
A16 in {‘PU:N', ’PU:YNGNS', ’PU:YNGS'}
Type: string length
Length(AS_D1_A10) <= 20
Type: Value restriction
A22A[SS:x1][PLID][IDX] >= 0
Type: regex match
A15[SS:x1][IDX] =~ '[A-Z]{2}[0-9][A-F]' 7 16/12/2012<br>
slide8. BCDL examples in Solvency II PoC Dimension Item aggregation
Assertion = X[OC;x0] = sum(X[!OX:x0])
X = {A4, A12, A16, L10, L25A}
Custom business check:
A26[PLID] = A23A * A22A[PLID] + A30[PLID])
For-all sum
A3[VG:x2] = SUM({(A3[PLID][IDX] = 'N') && (A15[IDX] =~ '..9(3|5)')}A26[PLID][IDX])
Inter-table checks 8 16/12/2012<br>
slide9. Questions?<br>
slide10. Birelle improves assertions Detect Global dimension filters:
A[D][E] = B[D][E] + C[D]
Global filter: [D]A[E] = B[E] + C
Tolerance margin pattern
A = B
abs(A-B) < M<br>
slide11. Our own abstract model Detect reused ConceptVariable
If a variable is used in two assertions, it is defined once, and reused.
Including filters<br>
slide12. xlink:type: arcxlink:arcrole:…//variable-set(order: nnn) xlink:from variable:arc xlink:to PreCond_%FilingInd xlink:type: arcxlink:arcrole:…//variable-setname: xxxx (order: nnn) xlink:from variable:arc xlink:to %1 %1Total xlink:type: arcxlink:arcrole:…//variable-filtercomplement: falsecover: true
order: nnn xlink:from variable:variableFilterArc xlink:to %1_%pi[_%dv[_%dv…]] xlink:type: resource
test: xpath expression gf:general xlink:to Generql_filter S_0032 xlink:type: resource
bindAsSequence: false/true
select:{generated} xlink:label: variable:generalVariable Assertion Messages Filing Indicators Concept Variables General variables Concept Filters Concept Dimension Filters General Filter S_0011 xlink:type: arcxlink:arcrole:…//variable-set-precondition(order: nnn) xlink:from variable:arc xlink:to id:
test:{generated} xlink:label: variable:precondition %1 Preconditions PreCond_%FilingInd General_filter xlink:type: arcxlink:arcrole:…//variable-filtercomplement: falsecover: true
order: nnn xlink:from variable:variableFilterArc xlink:to %1DetailDimFilter %1_%pi[_%dv[_%dv…]] xlink:type: arcxlink:arcrole:…//variable-set-precondition(order: nnn) xlink:from variable:arc xlink:to id:
xlink:type: resource
test:: … xlink:label: Period/Unit_Filter Period/Unit filter Period/Unit_Filter pf:period/uf:singleMeasure Period/Unit_Filter %1_%pi[_%dv[_%dv…]] xlink:type: arcxlink:arcrole:…//variable-set-precondition(order: nnn) xlink:from variable:arc xlink:to S_0041 id:
xlink:type: resource
test:: … xlink:label: Period/Unit_Filter S_0040 Period/Unit filter Period_Filter pf:period/uf:singleMeasure Period/Unit_Filter %1_%pi[_%dv[_%dv…]] S_0032 Exclusion Dimension Filter xlink:type: arcxlink:arcrole:…//variable-filtercomplement: truecover: true
order: nnn xlink:from variable:variableFilterArc xlink:to %1DetailDimFilter %1_%pi[_%dv[_%dv…]] xlink:type: arcxlink:arcrole:…//variable-set-filtercomplement: falseorder: nnn xlink:from variable:variableSetFilterArc xlink:to %1_%pi[_%dv[_%dv…]] xlink:type: resource
df:dimensiondf:member (0…n) df:explicitDimension xlink:to Group_filter Group Filters Group_filter Group_filter Unit filter can only be used for numerique variable<br>
slide13. What was easy to do Programming with python
Parsing a INI configuration file
Parsing a taxonomy
Serializing XBRL, once the model is created
Having acceptable performances<br>
slide14. What was challenging Writing a DSL
pyparsing creates conflicts with DSL inheritance
Generating XBRL models
bindAsSequence=true|false
Handling of typed dimension<br>