Skip to content

Commit

Permalink
DataQualityCommittee#743 for XULE 23379
Browse files Browse the repository at this point in the history
  • Loading branch information
davidtauriello committed May 4, 2023
2 parents 48a7af3 + f02c077 commit 156337f
Show file tree
Hide file tree
Showing 49 changed files with 191 additions and 32 deletions.
Binary file modified dqc_us_rules/dqc-ifrs-2018-V20-ruleset.zip
Binary file not shown.
Binary file modified dqc_us_rules/dqc-ifrs-2019-V20-ruleset.zip
Binary file not shown.
Binary file modified dqc_us_rules/dqc-ifrs-2020-V20-ruleset.zip
Binary file not shown.
Binary file modified dqc_us_rules/dqc-ifrs-2021-V20-ruleset.zip
Binary file not shown.
Binary file modified dqc_us_rules/dqc-ifrs-2022-V20-ruleset.zip
Binary file not shown.
Binary file modified dqc_us_rules/dqc-ifrs-2023-V20-ruleset.zip
Binary file not shown.
Binary file modified dqc_us_rules/dqc-us-2018-V20-ruleset.zip
Binary file not shown.
Binary file modified dqc_us_rules/dqc-us-2019-V20-ruleset.zip
Binary file not shown.
Binary file modified dqc_us_rules/dqc-us-2020-V20-ruleset.zip
Binary file not shown.
Binary file modified dqc_us_rules/dqc-us-2021-V20-ruleset.zip
Binary file not shown.
Binary file modified dqc_us_rules/dqc-us-2022-V20-ruleset.zip
Binary file not shown.
Binary file modified dqc_us_rules/dqc-us-2023-V20-ruleset.zip
Binary file not shown.
Binary file modified dqc_us_rules/resources.zip
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -4814,7 +4814,6 @@
5564,DeferredTaxAssetsTaxDeferredExpenseReservesAndAccrualsPolicyholderLiabilities
5565,TemporaryEquityEliminationAsPartofReorganization
5566,DepositsWithClearingOrganizationsAndOthersSecurities
5567,DerivativeCostOfHedgeNetOfCashReceived
5568,TemporaryEquitySharesSubscribedButUnissuedSubscriptionsReceivable
5569,IncomeTaxReconciliationNondeductibleExpenseCharitableContributions
5570,CertainLoansAcquiredInTransferNotAccountedForAsDebtSecuritiesAccretableYieldTransfersToLoansHeldForSale
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4801,7 +4801,6 @@
5564,DeferredTaxAssetsTaxDeferredExpenseReservesAndAccrualsPolicyholderLiabilities
5565,TemporaryEquityEliminationAsPartofReorganization
5566,DepositsWithClearingOrganizationsAndOthersSecurities
5567,DerivativeCostOfHedgeNetOfCashReceived
5568,TemporaryEquitySharesSubscribedButUnissuedSubscriptionsReceivable
5569,IncomeTaxReconciliationNondeductibleExpenseCharitableContributions
5570,CertainLoansAcquiredInTransferNotAccountedForAsDebtSecuritiesAccretableYieldTransfersToLoansHeldForSale
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4729,7 +4729,6 @@
5564,DeferredTaxAssetsTaxDeferredExpenseReservesAndAccrualsPolicyholderLiabilities
5565,TemporaryEquityEliminationAsPartofReorganization
5566,DepositsWithClearingOrganizationsAndOthersSecurities
5567,DerivativeCostOfHedgeNetOfCashReceived
5568,TemporaryEquitySharesSubscribedButUnissuedSubscriptionsReceivable
5569,IncomeTaxReconciliationNondeductibleExpenseCharitableContributions
5570,CertainLoansAcquiredInTransferNotAccountedForAsDebtSecuritiesAccretableYieldTransfersToLoansHeldForSale
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4452,7 +4452,6 @@
5564,DeferredTaxAssetsTaxDeferredExpenseReservesAndAccrualsPolicyholderLiabilities
5565,TemporaryEquityEliminationAsPartofReorganization
5566,DepositsWithClearingOrganizationsAndOthersSecurities
5567,DerivativeCostOfHedgeNetOfCashReceived
5568,TemporaryEquitySharesSubscribedButUnissuedSubscriptionsReceivable
5569,IncomeTaxReconciliationNondeductibleExpenseCharitableContributions
5570,CertainLoansAcquiredInTransferNotAccountedForAsDebtSecuritiesAccretableYieldTransfersToLoansHeldForSale
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4331,7 +4331,6 @@
5564,DeferredTaxAssetsTaxDeferredExpenseReservesAndAccrualsPolicyholderLiabilities
5565,TemporaryEquityEliminationAsPartofReorganization
5566,DepositsWithClearingOrganizationsAndOthersSecurities
5567,DerivativeCostOfHedgeNetOfCashReceived
5568,TemporaryEquitySharesSubscribedButUnissuedSubscriptionsReceivable
5569,IncomeTaxReconciliationNondeductibleExpenseCharitableContributions
5570,CertainLoansAcquiredInTransferNotAccountedForAsDebtSecuritiesAccretableYieldTransfersToLoansHeldForSale
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4331,7 +4331,6 @@
5564,DeferredTaxAssetsTaxDeferredExpenseReservesAndAccrualsPolicyholderLiabilities
5565,TemporaryEquityEliminationAsPartofReorganization
5566,DepositsWithClearingOrganizationsAndOthersSecurities
5567,DerivativeCostOfHedgeNetOfCashReceived
5568,TemporaryEquitySharesSubscribedButUnissuedSubscriptionsReceivable
5569,IncomeTaxReconciliationNondeductibleExpenseCharitableContributions
5570,CertainLoansAcquiredInTransferNotAccountedForAsDebtSecuritiesAccretableYieldTransfersToLoansHeldForSale
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4331,7 +4331,6 @@
5564,DeferredTaxAssetsTaxDeferredExpenseReservesAndAccrualsPolicyholderLiabilities
5565,TemporaryEquityEliminationAsPartofReorganization
5566,DepositsWithClearingOrganizationsAndOthersSecurities
5567,DerivativeCostOfHedgeNetOfCashReceived
5568,TemporaryEquitySharesSubscribedButUnissuedSubscriptionsReceivable
5569,IncomeTaxReconciliationNondeductibleExpenseCharitableContributions
5570,CertainLoansAcquiredInTransferNotAccountedForAsDebtSecuritiesAccretableYieldTransfersToLoansHeldForSale
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4331,7 +4331,6 @@
5564,DeferredTaxAssetsTaxDeferredExpenseReservesAndAccrualsPolicyholderLiabilities
5565,TemporaryEquityEliminationAsPartofReorganization
5566,DepositsWithClearingOrganizationsAndOthersSecurities
5567,DerivativeCostOfHedgeNetOfCashReceived
5568,TemporaryEquitySharesSubscribedButUnissuedSubscriptionsReceivable
5569,IncomeTaxReconciliationNondeductibleExpenseCharitableContributions
5570,CertainLoansAcquiredInTransferNotAccountedForAsDebtSecuritiesAccretableYieldTransfersToLoansHeldForSale
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4331,7 +4331,6 @@
5564,DeferredTaxAssetsTaxDeferredExpenseReservesAndAccrualsPolicyholderLiabilities
5565,TemporaryEquityEliminationAsPartofReorganization
5566,DepositsWithClearingOrganizationsAndOthersSecurities
5567,DerivativeCostOfHedgeNetOfCashReceived
5568,TemporaryEquitySharesSubscribedButUnissuedSubscriptionsReceivable
5569,IncomeTaxReconciliationNondeductibleExpenseCharitableContributions
5570,CertainLoansAcquiredInTransferNotAccountedForAsDebtSecuritiesAccretableYieldTransfersToLoansHeldForSale
Expand Down
3 changes: 2 additions & 1 deletion dqc_us_rules/source/ifrs/2018/DQC_IFRS_0118.xule
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,12 @@ for $cube in $statementCubes.sort

$LegalEntityAxisInCube = filter $dimObjects where $item.local-name == 'LegalEntityAxis'returns $item
$ContinuingAndDiscontinuedOperationsInCube = filter $dimObjects where $item == ContinuingAndDiscontinuedOperationsAxis returns $item
$InvestmentAxisUsed = filter $dimObjects where $item == SignificantInvestmentsInAssociatesAxis returns $item

/** Dimension to check **/
/** Identify the axis that indicate their default values should not have a calculation check
Add $ContinuingAndDiscontinuedOperationsInCube for those calc on the income statement that are always continuing ops.**/
$AxisDefaultsNotToCheck = $MissingDefaultLabel + $MissingDefaults + $LegalEntityAxisInCube + $ContinuingAndDiscontinuedOperationsInCube
$AxisDefaultsNotToCheck = $MissingDefaultLabel + $MissingDefaults + $LegalEntityAxisInCube + $ContinuingAndDiscontinuedOperationsInCube + $InvestmentAxisUsed

/** Identify if the current iteration is a default by taking the table dimensions deducting the dimensions
of the fact and seeing if the resulting set intersects with the axis that are not checked. If this is greater than zero
Expand Down
3 changes: 2 additions & 1 deletion dqc_us_rules/source/ifrs/2019/DQC_IFRS_0118.xule
Original file line number Diff line number Diff line change
Expand Up @@ -139,11 +139,12 @@ for $cube in $statementCubes.sort
$LegalEntityAxisInCube = filter $dimObjects where $item.local-name == 'LegalEntityAxis'returns $item
$ConsolidatedEntityAxisInCube = filter $dimObjects where $item == srt:ConsolidatedEntitiesAxis returns $item
$ContinuingAndDiscontinuedOperationsInCube = filter $dimObjects where $item == ContinuingAndDiscontinuedOperationsAxis returns $item
$InvestmentAxisUsed = filter $dimObjects where $item == SignificantInvestmentsInAssociatesAxis returns $item

/** Dimension to check **/
/** Identify the axis that indicate their default values should not have a calculation check
Add $ContinuingAndDiscontinuedOperationsInCube for those calc on the income statement that are always continuing ops.**/
$AxisDefaultsNotToCheck = $MissingDefaultLabel + $MissingDefaults + $LegalEntityAxisInCube + $ConsolidatedEntityAxisInCube + $ContinuingAndDiscontinuedOperationsInCube
$AxisDefaultsNotToCheck = $MissingDefaultLabel + $MissingDefaults + $LegalEntityAxisInCube + $ConsolidatedEntityAxisInCube + $ContinuingAndDiscontinuedOperationsInCube + $InvestmentAxisUsed

/** Identify if the current iteration is a default by taking the table dimensions deducting the dimensions
of the fact and seeing if the resulting set intersects with the axis that are not checked. If this is greater than zero
Expand Down
3 changes: 2 additions & 1 deletion dqc_us_rules/source/ifrs/2020/DQC_IFRS_0118.xule
Original file line number Diff line number Diff line change
Expand Up @@ -139,11 +139,12 @@ for $cube in $statementCubes.sort
$LegalEntityAxisInCube = filter $dimObjects where $item.local-name == 'LegalEntityAxis'returns $item
$ConsolidatedEntityAxisInCube = filter $dimObjects where $item == srt:ConsolidatedEntitiesAxis returns $item
$ContinuingAndDiscontinuedOperationsInCube = filter $dimObjects where $item == ContinuingAndDiscontinuedOperationsAxis returns $item
$InvestmentAxisUsed = filter $dimObjects where $item == SignificantInvestmentsInAssociatesAxis returns $item

/** Dimension to check **/
/** Identify the axis that indicate their default values should not have a calculation check
Add $ContinuingAndDiscontinuedOperationsInCube for those calc on the income statement that are always continuing ops.**/
$AxisDefaultsNotToCheck = $MissingDefaultLabel + $MissingDefaults + $LegalEntityAxisInCube + $ConsolidatedEntityAxisInCube + $ContinuingAndDiscontinuedOperationsInCube
$AxisDefaultsNotToCheck = $MissingDefaultLabel + $MissingDefaults + $LegalEntityAxisInCube + $ConsolidatedEntityAxisInCube + $ContinuingAndDiscontinuedOperationsInCube + $InvestmentAxisUsed

/** Identify if the current iteration is a default by taking the table dimensions deducting the dimensions
of the fact and seeing if the resulting set intersects with the axis that are not checked. If this is greater than zero
Expand Down
3 changes: 2 additions & 1 deletion dqc_us_rules/source/ifrs/2021/DQC_IFRS_0118.xule
Original file line number Diff line number Diff line change
Expand Up @@ -139,11 +139,12 @@ for $cube in $statementCubes.sort
$LegalEntityAxisInCube = filter $dimObjects where $item.local-name == 'LegalEntityAxis'returns $item
$ConsolidatedEntityAxisInCube = filter $dimObjects where $item == srt:ConsolidatedEntitiesAxis returns $item
$ContinuingAndDiscontinuedOperationsInCube = filter $dimObjects where $item == ContinuingAndDiscontinuedOperationsAxis returns $item
$InvestmentAxisUsed = filter $dimObjects where $item == SignificantInvestmentsInAssociatesAxis returns $item

/** Dimension to check **/
/** Identify the axis that indicate their default values should not have a calculation check
Add $ContinuingAndDiscontinuedOperationsInCube for those calc on the income statement that are always continuing ops.**/
$AxisDefaultsNotToCheck = $MissingDefaultLabel + $MissingDefaults + $LegalEntityAxisInCube + $ConsolidatedEntityAxisInCube + $ContinuingAndDiscontinuedOperationsInCube
$AxisDefaultsNotToCheck = $MissingDefaultLabel + $MissingDefaults + $LegalEntityAxisInCube + $ConsolidatedEntityAxisInCube + $ContinuingAndDiscontinuedOperationsInCube + $InvestmentAxisUsed

/** Identify if the current iteration is a default by taking the table dimensions deducting the dimensions
of the fact and seeing if the resulting set intersects with the axis that are not checked. If this is greater than zero
Expand Down
3 changes: 2 additions & 1 deletion dqc_us_rules/source/ifrs/2022/DQC_IFRS_0118.xule
Original file line number Diff line number Diff line change
Expand Up @@ -139,11 +139,12 @@ for $cube in $statementCubes.sort
$LegalEntityAxisInCube = filter $dimObjects where $item.local-name == 'LegalEntityAxis'returns $item
$ConsolidatedEntityAxisInCube = filter $dimObjects where $item == srt:ConsolidatedEntitiesAxis returns $item
$ContinuingAndDiscontinuedOperationsInCube = filter $dimObjects where $item == ContinuingAndDiscontinuedOperationsAxis returns $item
$InvestmentAxisUsed = filter $dimObjects where $item == SignificantInvestmentsInAssociatesAxis returns $item;

/** Dimension to check **/
/** Identify the axis that indicate their default values should not have a calculation check
Add $ContinuingAndDiscontinuedOperationsInCube for those calc on the income statement that are always continuing ops.**/
$AxisDefaultsNotToCheck = $MissingDefaultLabel + $MissingDefaults + $LegalEntityAxisInCube + $ConsolidatedEntityAxisInCube + $ContinuingAndDiscontinuedOperationsInCube
$AxisDefaultsNotToCheck = $MissingDefaultLabel + $MissingDefaults + $LegalEntityAxisInCube + $ConsolidatedEntityAxisInCube + $ContinuingAndDiscontinuedOperationsInCube + $InvestmentAxisUsed

/** Identify if the current iteration is a default by taking the table dimensions deducting the dimensions
of the fact and seeing if the resulting set intersects with the axis that are not checked. If this is greater than zero
Expand Down
3 changes: 2 additions & 1 deletion dqc_us_rules/source/ifrs/2023/DQC_IFRS_0118.xule
Original file line number Diff line number Diff line change
Expand Up @@ -139,11 +139,12 @@ for $cube in $statementCubes.sort
$LegalEntityAxisInCube = filter $dimObjects where $item.local-name == 'LegalEntityAxis'returns $item
$ConsolidatedEntityAxisInCube = filter $dimObjects where $item == srt:ConsolidatedEntitiesAxis returns $item
$ContinuingAndDiscontinuedOperationsInCube = filter $dimObjects where $item == ContinuingAndDiscontinuedOperationsAxis returns $item
$InvestmentAxisUsed = filter $dimObjects where $item == SignificantInvestmentsInAssociatesAxis returns $item

/** Dimension to check **/
/** Identify the axis that indicate their default values should not have a calculation check
Add $ContinuingAndDiscontinuedOperationsInCube for those calc on the income statement that are always continuing ops.**/
$AxisDefaultsNotToCheck = $MissingDefaultLabel + $MissingDefaults + $LegalEntityAxisInCube + $ConsolidatedEntityAxisInCube + $ContinuingAndDiscontinuedOperationsInCube
$AxisDefaultsNotToCheck = $MissingDefaultLabel + $MissingDefaults + $LegalEntityAxisInCube + $ConsolidatedEntityAxisInCube + $ContinuingAndDiscontinuedOperationsInCube + $InvestmentAxisUsed

/** Identify if the current iteration is a default by taking the table dimensions deducting the dimensions
of the fact and seeing if the resulting set intersects with the axis that are not checked. If this is greater than zero
Expand Down
2 changes: 1 addition & 1 deletion dqc_us_rules/source/lib/version.xule
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ DQC Rules

/** Define the rule version **/

constant $ruleVersion = '20.0.5'
constant $ruleVersion = '20.0.6'

/** Define Additional Attribute types that can be associated with a rule **/

Expand Down
4 changes: 3 additions & 1 deletion dqc_us_rules/source/us/2018/DQC_0043.xule
Original file line number Diff line number Diff line change
Expand Up @@ -141,19 +141,21 @@ for $IncomeItem in (($income_items) - set(DiscontinuedOperationGainLossOnDisposa
false
else
$signFlag = "negative"
$messageText = "The company has reported the concept " + $IncomeItem.local-name + " as part of the cash flow statement. This income item is being deducted from the value of operating cash flows in the calculation defined by the filer. This implies that the resulting operating cash flow calculation excludes this income item from cash flow from operations. If " + $IncomeItem.local-name + " represents income from discontinued operations then the element NetCashProvidedByUsedInOperatingActivitiesContinuingOperations should be used as the total rather than the current total element of NetCashProvidedByUsedInOperatingActivities. If the item is an income item and is being deducted because the value is negative then consider changing the sign and weight of the element."
effective_weight_is_negative($Operating, $IncomeItem)
else
$discOPs = set(DiscontinuedOperationIncomeLossFromDiscontinuedOperationBeforeIncomeTax, IncomeLossFromDiscontinuedOperationsNetOfTax,
IncomeLossFromDiscontinuedOperationsNetOfTaxAttributableToNoncontrollingInterest,
IncomeLossFromDiscontinuedOperationsNetOfTaxAttributableToReportingEntity)
if $IncomeItem in $discOPs
$signFlag = "positive"
$messageText = "The company has reported the concept " + $IncomeItem.local-name + " as part of the cash flow statement. This income item is being added to the value of operating cash flows in the calculation defined by the filer. This implies that the resulting operating cash flow calculation includes this income item in cash flow from operations. If " + $IncomeItem.local-name + " represents income from discontinued operations then the element NetCashProvidedByUsedInOperatingActivities should be used as the total rather than the current total element of NetCashProvidedByUsedInOperatingActivitiesContinuingOperations."
effective_weight_is_positive($Operating, $IncomeItem)
else
false

message
"The company has reported the concept {$IncomeItem} as a {$signFlag} weight descendant of Operating cash flows in the calculation linkbase of the filing. This element must make a {$signFlag} cash contribution to operating cash flows when the element {$Operating} is used.
"{$messageText}

Rule Element Id:{$ruleId}
Rule version: {$ruleVersion}"
Expand Down
23 changes: 22 additions & 1 deletion dqc_us_rules/source/us/2018/DQC_0060.xule
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,30 @@ assert US.0060.7497 satisfied

$rule_id = (rule-name().split('.'))[rule-name().split('.').length];

/** The discOpsMaterialityFlag is added to address those cases where the value has used cashflow from continuing ops, but the filer has no disc ops from cash flow
because it is immaterial. We asses this situation if the filer reported discontinued operations from income and the value of this is less than 5% of
cash flow from continuing ops. If the filer has used continuing ops by mistake this will get picked up if they have no Disc ops income and if disc ops
income is more than 5% of cash flow from continuing ops. **/

$discOpsValue = (list([nonils @concept in $DISCONTINUED_INCOME_ITEMS]))
$continuingOpsValue = list([@concept = NetCashProvidedByUsedInOperatingActivitiesContinuingOperations])
$MaxValueOfDiscOps = if $discOpsValue.length > 0
max($discOpsValue)
else
if $continuingOpsValue.length > 0
max($continuingOpsValue)
else
skip

$discOpsMaterialityFlag = if (abs($MaxValueOfDiscOps) > abs(max($continuingOpsValue)) * 0.05)
true
else
false

count(list([@NetCashProvidedByUsedInOperatingActivities])) == 0 and
count(list([@NetCashProvidedByUsedInOperatingActivitiesContinuingOperations]#fact1))!= 0 and
count(list([@CashProvidedByUsedInOperatingActivitiesDiscontinuedOperations]))== 0
count(list([@CashProvidedByUsedInOperatingActivitiesDiscontinuedOperations]))== 0 and
$discOpsMaterialityFlag

message
"This rule reflects updated guidance from the Data Quality Committee which contradicts with historical rules. This is a change based on the changes in the cashflow ASU published by FASB.
Expand Down
4 changes: 4 additions & 0 deletions dqc_us_rules/source/us/2018/constant.xule
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,10 @@ constant $income_items = set(ProfitLoss,
DiscontinuedOperationGainLossOnDisposalOfDiscontinuedOperationNetOfTax
)

constant $DISCONTINUED_INCOME_ITEMS = set(IncomeLossFromDiscontinuedOperationsNetOfTax,
IncomeLossFromDiscontinuedOperationsNetOfTaxAttributableToNoncontrollingInterest,
IncomeLossFromDiscontinuedOperationsNetOfTaxAttributableToReportingEntity)

constant $MONETARY_NON_NEGS = filter $non_neg_items.keys where taxonomy().concept($item).is-monetary returns taxonomy().concept($item)

constant $BANKING_MEASURES_BETWEEN_ZERO_AND_ONE = navigate parent-child descendants from list(RiskBasedRatiosAbstract, LeverageRatiosAbstract) taxonomy $us-gaap where $relationship.target.data-type.name == xbrli:pureItemType returns set (target-name)
Expand Down

0 comments on commit 156337f

Please sign in to comment.