FpML Issues Tracker
closed
Minor
Always
Validation Rules
Admin
None
Summary
The rule cd-1b has a redundancy in the expression of the rule. unadjustedDate is a mandatory field of creditDefaultSwap/generalTerms/effectiveDate, so it does not needed to be tested for existence.
The rule today is: " Context: Trade (complex type) cd-1b (Mandatory) Preconditions: CreditIndex If creditDefaultSwap/generalTerms/effectiveDate/unadjustedDate is present, tradeHeader/tradeDate must be equal or after creditDefaultSwap/generalTerms/effectiveDate/unadjustedDate. "
The fix to remove the redundancy is: " Context: Trade (complex type) cd-1b (Mandatory) Preconditions: CreditIndex If creditDefaultSwap/generalTerms/effectiveDate is present, tradeHeader/tradeDate must be equal or after creditDefaultSwap/generalTerms/effectiveDate/unadjustedDate. "
While at it we could make some other fixes: 1. "is present" should be replaced with the prevailing "exists", used elsewhere in the FpML Rules. 2. "equal or after" should be replaced with the prevailing "equal or greater", used elsewhere in the FpML Rules. 3. The "if" has a missing "else" clause causing potentially a null result. The if could be moved to the preconditions.
All fixes combined would produce: " Context: Trade (complex type) [exists(creditDefaultSwap/generalTerms/effectiveDate)] cd-1b (Mandatory) Preconditions: CreditIndex tradeHeader/tradeDate greater than or equal to creditDefaultSwap/generalTerms/effectiveDate/unadjustedDate. "
Notes:
iyermakova
05/24/08 1:32 am
As per Val WG agreement: Corrected as proposed above, but in the current style. The change was committed to trunk and branchesFpML-5-0
Context: Trade (complex type)
cd-1b (Mandatory)
Preconditions: CreditIndex
if creditDefaultSwap/generalTerms/effectiveDate exists, tradeHeader/tradeDate must be greater than or equal to creditDefaultSwap/generalTerms/effectiveDate/unadjustedDate.