// This is a demo of CoreFiling's Sphinx formula language // It is based on the Solvency II taxonomy // It accompanies the presentation David North gave at the // Luxembourg Eurofiling Workshop in December 2013 // The examples are meant to be illustrative only xmlns:find="http://www.eurofiling.info/xbrl/ext/filing-indicators" xmlns:s2c_dim="http://eiopa.europa.eu/xbrl/s2c/dict/dim" xmlns:s2c_pu="http://eiopa.europa.eu/xbrl/s2c/dict/dom/PU" xmlns:s2c_cs="http://eiopa.europa.eu/xbrl/s2c/dict/dom/CS" xmlns:s2c_am="http://eiopa.europa.eu/xbrl/s2c/dict/dom/AM" xmlns:s2c_dc="http://eiopa.europa.eu/xbrl/s2c/dict/dom/DC" require CorrectFilingIndicator package SolvencyIIExamples precondition CorrectFilingIndicator (values find:filingIndicator[])::contains("S.06.02") // Simple example: value restriction of aquisition price raise AquisitionPriceTooCheap [s2c_dim:TA=s2c_am:x7] < 4.0 // If quantity is reported, aquisition price must be reported too raise QuantityWithoutAquisitionPrice exists([s2c_dim:TA=s2c_am:x7]) != exists([s2c_dim:DC=s2c_dc:x3]) // checking for inconsistent duplicates raise InconsistentDuplicates count([]) > 1 // aggregation - checking roll-ups // note the formula notation - advantages include messages in terms of "expected" and "actual" formula AggregationCheck [s2c_dim:TA=none] := sum([s2c_dim:TA=*]) // Direct translation of first Solvency II assertion for S.06.02 constant ALLOWED_PORTFOLIO_VALUES = set(s2c_pu:x40, s2c_pu:x10, s2c_pu:x3) raise PortfolioNotAnAllowedValue with([s2c_dim:CS=s2c_cs:x26; s2c_dim:XA=*; s2c_dim:UI=*]) // "global filters" any(exists([ s2c_dim:PO as portfolio=* where not $ALLOWED_PORTFOLIO_VALUES::contains($portfolio) ])) message "Portfolio was reported with an invalid value"