FpML 4.4 Validation Rules - Rules for FX Derivatives
This is the FX part of the validation rule set accompanying the FpML 4.4 Recommendation. The introductory section in the
validation section of the specifications contains background information and documentation for this page.
The rules contained on this page contain links to cut down versions of valid and invalid test cases. The cut down test cases
are non-normative and are provided for the purpose of documentation only.
Content
Namespace
default element namespace = http://www.fpml.org/2007/FpML-4-4
Definitions
Term: calculated schedule dates
Correctly evaluating rule fx-12 requires generation of a schedule of observation dates based on the observation start date,
the observation end date, a calculation period frequency, a date roll convention, and a business day calendar for business
center where fixing occurs. The calculation should proceed as follows:
- generatedDates := [null];
- unadjustedDate := observationStartDate;
- while unadjustedDate <= observationEndDate do
- begin
- adjustedDate := dateRoll (unadjustedDate,dateRollConvention,businessDayCalendar);
- if adjustedDate [doesn't belong at] generatedDates then
- generatedDates := generatedDate [union] adjustedDate;
- unadjustedDate := unadjustedDate + calculationPeriodFrequency;
- end;
- return (generatedDates);
The algorithm assumes that implementations can add a time period (e.g. 1D, 1W, 2M, 6M, 1Y, etc.) to dates and understands
how perform standard financial date rolls (e.g. following, modified preceding, etc.) against a business day calendar.
Implementations must be capable of working with dates that MAY contain time zone offset information.
Preconditions
The Validation Preconditions only apply when specific rules reference them. The following preconditions are always to be executed
relative to the root of the FpML document being validated. The context of the rule is NOT carried through to the precondition.
Precondition: SameCurrencyScheme Elements containing currency code values (e.g. GBP, USD, etc.) can only be tested for equality or inequality if they are
both reference the same currency scheme URI in their currencyScheme attribute.
Rules
Unique contexts:
Context:
ExchangeRate (complex type)
fx-1 (Mandatory)
The value of rate must be positive.
fx-2 (Mandatory)
If forwardPoints exists then spotRate should also exist.
fx-3 (Mandatory)
If spotRate and forwardPoints both exist then rate should be equal to spotRate + forwardPoints.
fx-4 (Mandatory)
The value of sideRates/baseCurrency must be different from the values of both quotedCurrencyPair/currency1 and quotedCurrencyPair/currency2.
fx-5 (Mandatory)
The value of sideRates/currency1SideRate/currency must be the same as the value of quotedCurrencyPair/currency1.
fx-6 (Mandatory)
The value of sideRates/currency2SideRate/currency must be the same as the value of quotedCurrencyPair/currency2.
Context:
FxAmericanTrigger (complex type)
fx-7 (Mandatory)
The value of triggerRate must be positive.
fx-8 (Mandatory)
If observationStartDate and observationEndDate both exist then observationStartDate <= observationEndDate.
Context:
FxAverageRateObservationSchedule (complex type)
fx-9 (Mandatory)
If observationStartDate and observationEndDate both exist then observationStartDate <= observationEndDate.
fx-10 (Mandatory)
The observation period defined by observationStartDate and observationEndDate should be an integer multiple of the calculationPeriodFrequency.
Context:
FxAverageRateOption (complex type)
fx-11 (Mandatory)
The value of each observedRates/observationDate shall be unique.
fx-12 (Mandatory)
If
averageRateObservationSchedule exists then the values of
observedRates/observationDate should match the
calculated schedule dates derived from parameters defined within the
averageRateObservationSchedule element and the business day calendar implied by
fixingTime/businessCenter.
fx-13 (Mandatory)
If averageRateObservationDate elements exist then each observedRates/observationDate should match one of the dates defined by averageRateObservationDate/observationDate.
fx-42 (Mandatory)
The value of each averageRateObservationDate/observationDate must be unique.
fx-43 (Mandatory)
The value of putCurrencyAmount/currency and the value of callCurrencyAmount/currency must be different.
fx-44 (Mandatory)
If fxOptionPremium exists then the value of buyerPartyReference/@href and fxOptionPremium/payerPartyReference/@href must be the same and the value of sellerPartyReference/@href must be the same as fxOptionPremium/receiverPartyReference/@href.
fx-45 (Mandatory)
If fxOptionPremium exists then the value of buyerPartyReference/@href and fxOptionPremium/payerPartyReference/@href must be the same and the value of sellerPartyReference/@href must be the same as fxOptionPremium/receiverPartyReference/@href.
Context:
FxBarrier (complex type)
fx-14 (Mandatory)
If observationStartDate and observationEndDate both exist then observationStartDate <= observationEndDate.
fx-41 (Mandatory)
The value of triggerRate must be positive.
Context:
FxBarrierOption (complex type)
fx-15 (Mandatory)
If spotRate exists it must be positive.
Context:
FxDigitalOption (complex type)
fx-16 (Mandatory)
If spotRate exists it must be positive.
Context:
FxEuropeanTrigger (complex type)
fx-17 (Mandatory)
The value of triggerRate must be positive.
Context:
FxLeg (complex type)
fx-18 (Mandatory)
The value of exchangedCurrency1/payerPartyReference/@href must be the same as exchangedCurrency2/receiverPartyReference/@href and exchangedCurrency1/receiverPartyReference/@href must be the same as exchangedCurrency2/payerPartyReference/@href.
fx-19 (Mandatory)
The value of exchangedCurrency1/paymentAmount/currency and the value of exchangedCurrency2/paymentAmount/currency must be different.
fx-20 (Mandatory)
If currency1ValueDate exists then it must be different from currency2ValueDate.
fx-21 (Mandatory)
If nonDeliverableForward exists then exchangeRate/forwardPoints should also exist.
Context:
FxOptionLeg (complex type)
fx-22 (Mandatory)
If fxOptionPremium exists then the value of buyerPartyReference/@href and fxOptionPremium/payerPartyReference/@href must be the same and the value of sellerPartyReference/@href must be the same as fxOptionPremium/receiverPartyReference/@href.
fx-23 (Mandatory)
The value of putCurrencyAmount/currency and the value of callCurrencyAmount/currency must be different.
fx-24 (Mandatory)
The value of rate must be positive.
Context:
FxSwap (complex type)
fx-25 (Mandatory)
Two or more fxSingleLeg elements must exist.
fx-26 (Mandatory)
If two fxSingleLeg elements exist, the fxSingleLeg\valueDate for each one of the legs must be different.
Context:
QuotedCurrencyPair (complex type)
fx-27 (Mandatory)
The values of currency1 and currency2 must be different.
Context:
SideRate (complex type)
fx-28 (Mandatory)
The value of rate must be positive.
fx-29 (Mandatory)
If forwardPoints exists then spotRate should also exist.
fx-30 (Mandatory)
If spotRate and forwardPoints both exist then rate should be equal to spotRate + forwardPoints.
Context:
SideRates (complex type)
fx-31 (Mandatory)
The value of baseCurrency must be different from the values of both currency1SideRate/currency and currency2SideRate/currency.
fx-46 (Mandatory)
The value of currency1SideRate/sideRateBasis must be either BaseCurrencyPerCurrency1 or Currency1PerBaseCurrency.
fx-47 (Mandatory)
The value of currency2SideRate/sideRateBasis must be either BaseCurrencyPerCurrency2 or Currency2PerBaseCurrency.
Context:
TermDeposit (complex type)
fx-32 (Mandatory)
The value of initialPayerReference/@href and initialReceiverReference/@href must be different.
fx-33 (Mandatory)
The maturityDate must be after the startDate.
fx-34 (Mandatory)
The value of principal/amount must be positive.
fx-35 (Mandatory)
The fixedRate must be positive.
Context:
Trade (complex type)
fx-36 (Mandatory)
The value of fxAverageRateOption/expiryDateTime/expiryDate should be after tradeHeader/tradeDate.
fx-37 (Mandatory)
The value of fxBarrierOption/expiryDateTime/expiryDate should be after tradeHeader/tradeDate.
fx-38 (Mandatory)
The value of fxDigitalOption/expiryDateTime/expiryDate should be after tradeHeader/tradeDate.
fx-39 (Mandatory)
The value of fxSingleLeg/valueDate or the value of both fxSingleLeg/valueDate1 and fxSingleLeg/valueDate2 should be after tradeHeader/tradeDate.
fx-40 (Mandatory)
The value of all fxSwap/fxSingleLeg/valueDate, fxswap/fxSingleLeg/valueDate1 and fxSwap/fxSingleLeg/valueDate2 instances should be after tradeHeader/tradeDate.
Deprecated rules
Removed rules