FpML 4.5 Validation Rules - Rules for FX Derivatives

This is the FX part of the validation rule set accompanying the FpML 4.5 Trial 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/2008/FpML-4-5

namespace xs = http://www.w3.org/2001/XMLSchema

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: 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.

Functions

The following shared functions are used in the rules.

Rules

Unique contexts:

fx-1 (Mandatory)
English Description:
Context: ExchangeRate (complex type)
rate must be positive
Formal Description:
Context: ExchangeRate (complex type)
rate gt 0
Test cases: [Invalid] [Invalid] [Invalid] [Invalid]
fx-2 (Mandatory)
English Description:
Context: ExchangeRate (complex type)
If forwardPoints exists, then spotRate must exist
Formal Description:
Context: ExchangeRate (complex type)
[exists(forwardPoints)]
exists(spotRate)
Test cases: [Invalid] [Invalid] [Invalid]
fx-3 (Mandatory)
English Description:
Context: ExchangeRate (complex type)
If spotRate exists, and if forwardPoints exists, then rate is equal to the sum of spotRate and forwardPoints
Formal Description:
Context: ExchangeRate (complex type)
[exists(spotRate)] [exists(forwardPoints)]
rate eq spotRate + forwardPoints
Test cases: [Invalid] [Invalid]
fx-4 (Mandatory)
English Description:
Context: ExchangeRate (complex type)
If sideRates/baseCurrency, quotedCurrencyPair/currency1 and quotedCurrencyPair/currency2 have the same same-currency-scheme, then sideRates/baseCurrency is not equal to the values of both quotedCurrencyPair/currency1 and quotedCurrencyPair/currency2
Formal Description:
Context: ExchangeRate (complex type)
[same-currency-scheme((sideRates/baseCurrency,quotedCurrencyPair/currency1,quotedCurrencyPair/currency2))]
sideRates/baseCurrency ne the values of both quotedCurrencyPair/currency1 and quotedCurrencyPair/currency2
Test cases: [Invalid]
fx-5 (Mandatory)
English Description:
Context: ExchangeRate (complex type)
If sideRates/currency1SideRate/currency and quotedCurrencyPair/currency1 have the same-currency-scheme, then sideRates/currency1SideRate/currency must be equal to quotedCurrencyPair/currency1
Formal Description:
Context: ExchangeRate (complex type)
[same-currency-scheme((sideRates/currency1SideRate/currency,quotedCurrencyPair/currency1))]
sideRates/currency1SideRate/currency eq quotedCurrencyPair/currency1
Test cases: [Invalid]
fx-6 (Mandatory)
English Description:
Context: ExchangeRate (complex type)
If sideRates/currency2SideRate/currency and quotedCurrencyPair/currency2 have the same-currency-scheme, then sideRates/currency2SideRate/currency must be equal to quotedCurrencyPair/currency2
Formal Description:
Context: ExchangeRate (complex type)
[same-currency-scheme((sideRates/currency2SideRate/currency,quotedCurrencyPair/currency2))]
sideRates/currency2SideRate/currency eq quotedCurrencyPair/currency2
Test cases: [Invalid]
fx-7 (Mandatory)
English Description:
Context: FxAmericanTrigger (complex type)
triggerRate must be positive
Formal Description:
Context: FxAmericanTrigger (complex type)
triggerRate gt 0
Test cases: [Invalid] [Invalid] [Invalid] [Invalid]
fx-8 (Mandatory)
English Description:
Context: FxAmericanTrigger (complex type)
If observationStartDate exists, and if observationEndDate exists, then observationStartDate must be before observationEndDate
Formal Description:
Context: FxAmericanTrigger (complex type)
[exists(observationStartDate)] [exists(observationEndDate)]
observationStartDate le observationEndDate
Test cases: [Invalid] [Invalid] [Invalid] [Invalid]
fx-9 (Mandatory)
English Description:
Context: FxAverageRateObservationSchedule (complex type)
If observationStartDate exists, and if observationEndDate exists, then observationStartDate must be before observationEndDate
Formal Description:
Context: FxAverageRateObservationSchedule (complex type)
[exists(observationStartDate)] [exists(observationEndDate)]
observationStartDate le observationEndDate
Test cases: [Invalid]
fx-10 (Mandatory)
English Description:
Context: FxAverageRateObservationSchedule (complex type)
The observation period defined by observationStartDate and observationEndDate should be an integer multiple of the calculationPeriodFrequency
Test cases: [Invalid] [Invalid]
fx-11 (Mandatory)
English Description:
Context: FxAverageRateOption (complex type)
The value of each observedRates/observationDate must be unique
Formal Description:
Context: FxAverageRateOption (complex type)
count(distinct-values(observedRates/observationDate)) eq count(observedRates/observationDate)
Test cases: [Invalid]
fx-12 (Mandatory)
English Description:
Context: FxAverageRateOption (complex type)
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
Test cases: [Invalid]
fx-13 (Mandatory)
English Description:
Context: FxAverageRateOption (complex type)
If averageRateObservationDate exists, then each observedRates/observationDate must match one of the dates defined by averageRateObservationDate/observationDate
Test cases: [Invalid]
fx-14 (Mandatory)
English Description:
Context: FxBarrier (complex type)
If observationStartDate exists, and if observationEndDate exists, then observationStartDate must be before observationEndDate
Formal Description:
Context: FxBarrier (complex type)
[exists(observationStartDate)] [exists(observationEndDate)]
observationStartDate le observationEndDate
Test cases: [Invalid] [Invalid]
fx-15 (Mandatory)
English Description:
Context: FxBarrierOption (complex type)
If spotRate exists, then spotRate must be positive
Formal Description:
Context: FxBarrierOption (complex type)
[exists(spotRate)]
spotRate gt 0
Test cases: [Invalid] [Invalid]
fx-16 (Mandatory)
English Description:
Context: FxDigitalOption (complex type)
If spotRate exists, then spotRate must be positive
Formal Description:
Context: FxDigitalOption (complex type)
[exists(spotRate)]
spotRate gt 0
Test cases: [Invalid] [Invalid]
fx-17 (Mandatory)
English Description:
Context: FxEuropeanTrigger (complex type)
triggerRate must be positive
Formal Description:
Context: FxEuropeanTrigger (complex type)
triggerRate gt 0
Test cases: [Invalid] [Invalid]
fx-18 (Mandatory)
English Description:
Context: FxLeg (complex type)
exchangedCurrency1/payerPartyReference/@href must be equal to exchangedCurrency2/receiverPartyReference/@href and exchangedCurrency1/receiverPartyReference/@href must be equal to exchangedCurrency2/payerPartyReference/@href
Formal Description:
Context: FxLeg (complex type)
(exchangedCurrency1/payerPartyReference/@href eq exchangedCurrency2/receiverPartyReference/@href) and (exchangedCurrency1/receiverPartyReference/@href eq exchangedCurrency2/payerPartyReference/@href)
Test cases: [Invalid]
fx-19 (Mandatory)
English Description:
Context: FxLeg (complex type)
If exchangedCurrency1/paymentAmount and exchangedCurrency2/paymentAmount have the same-currency, then exchangedCurrency1/paymentAmount/currency must not be equal to exchangedCurrency2/paymentAmount/currency
Formal Description:
Context: FxLeg (complex type)
[same-currency((exchangedCurrency1/paymentAmount,exchangedCurrency2/paymentAmount))]
exchangedCurrency1/paymentAmount/currency ne exchangedCurrency2/paymentAmount/currency
Test cases: [Invalid]
fx-20 (Mandatory)
English Description:
Context: FxLeg (complex type)
If currency1ValueDate exists, then currency1ValueDate must not be equal to currency2ValueDate
Formal Description:
Context: FxLeg (complex type)
[exists(currency1ValueDate)]
currency1ValueDate ne currency2ValueDate
Test cases: [Invalid]
fx-21 (Mandatory)
English Description:
Context: FxLeg (complex type)
If nonDeliverableForward exists, then exchangeRate/forwardPoints must exist
Formal Description:
Context: FxLeg (complex type)
[exists(nonDeliverableForward)]
exists(exchangeRate/forwardPoints)
Test cases: [Invalid]
fx-22 (Mandatory)
English Description:
Context: FxOptionLeg (complex type)
If fxOptionPremium exists, then buyerPartyReference/@href must be equal to fxOptionPremium/payerPartyReference/@href and sellerPartyReference/@href must be equal to fxOptionPremium/receiverPartyReference/@href
Formal Description:
Context: FxOptionLeg (complex type)
[exists(fxOptionPremium)]
(buyerPartyReference/@href eq fxOptionPremium/payerPartyReference/@href) and (sellerPartyReference/@href eq fxOptionPremium/receiverPartyReference/@href)
Test cases: [Invalid] [Invalid] [Invalid]
fx-23 (Mandatory)
English Description:
Context: FxOptionLeg (complex type)
If putCurrencyAmount and callCurrencyAmount have the same-currency, then putCurrencyAmount/currency must not be equal to callCurrencyAmount/currency
Formal Description:
Context: FxOptionLeg (complex type)
[same-currency((putCurrencyAmount,callCurrencyAmount))]
putCurrencyAmount/currency ne callCurrencyAmount/currency
Test cases: [Invalid] [Invalid]
fx-24 (Mandatory)
English Description:
Context: FxStrikePrice (complex type)
rate must be positive
Formal Description:
Context: FxStrikePrice (complex type)
rate gt 0
Test cases: [Invalid] [Invalid]
fx-25 (Mandatory)
English Description:
Context: FxSwap (complex type)
Two or more fxSingleLeg elements must exist
Formal Description:
Context: FxSwap (complex type)
count(fxSingleLeg) ge 2
Test cases: [Invalid]
fx-26 (Mandatory)
English Description:
Context: FxSwap (complex type)
If there are two fxSingleLeg, and if there are two fxSingleLeg\valueDate, then the fxSingleLeg\valueDate for each one of the legs must be different
Formal Description:
Context: FxSwap (complex type)
[count(fxSingleLeg)=2] [count(fxSingleLeg\valueDate)=2]
fxSingleLeg[1]/valueDate ne fxSingleLeg[2]/valueDate
Test cases: [Invalid]
fx-27 (Mandatory)
English Description:
Context: QuotedCurrencyPair (complex type)
If currency1 and currency2 have the same-currency-scheme, then currency1 must not be equal to currency2
Formal Description:
Context: QuotedCurrencyPair (complex type)
[same-currency-scheme((currency1,currency2))]
currency1 ne currency2
Test cases: [Invalid] [Invalid]
fx-28 (Mandatory)
English Description:
Context: SideRate (complex type)
rate must be positive
Formal Description:
Context: SideRate (complex type)
rate gt 0
Test cases: [Invalid]
fx-29 (Mandatory)
English Description:
Context: SideRate (complex type)
If forwardPoints exists, then spotRate must exist
Formal Description:
Context: SideRate (complex type)
[exists(forwardPoints)]
exists(spotRate)
Test cases: [Invalid]
fx-30 (Mandatory)
English Description:
Context: SideRate (complex type)
If spotRate exists, and if forwardPoints exists, then rate must be equal to the sum of spotRate and forwardPoints
Formal Description:
Context: SideRate (complex type)
[exists(spotRate)] [exists(forwardPoints)]
rate eq spotRate + forwardPoints
Test cases: [Invalid]
fx-31 (Mandatory)
English Description:
Context: SideRates (complex type)
If baseCurrency, currency1SideRate/currency, currency2SideRate/currency have the same-currency-scheme, then baseCurrency must not be equal to currency1SideRate/currency, and baseCurrency must not be equal to currency2SideRate/currency
Formal Description:
Context: SideRates (complex type)
[same-currency-scheme((baseCurrency,currency1SideRate/currency,currency2SideRate/currency))]
(baseCurrency ne currency1SideRate/currency) and (baseCurrency ne currency2SideRate/currency)
Test cases: [Invalid]
fx-32 (Mandatory)
English Description:
Context: TermDeposit (complex type)
The @href attribute of initialPayerReference must not be equal to the @href attribute of initialReceiverReference
Formal Description:
Context: TermDeposit (complex type)
initialPayerReference/@href ne initialReceiverReference/@href
Test cases: [Invalid]
fx-33 (Mandatory)
English Description:
Context: TermDeposit (complex type)
maturityDate must be after startDate
Formal Description:
Context: TermDeposit (complex type)
maturityDate gt startDate
Test cases: [Invalid] [Invalid]
fx-34 (Mandatory)
English Description:
Context: TermDeposit (complex type)
principal/amount must be positive
Formal Description:
Context: TermDeposit (complex type)
principal/amount gt 0
Test cases: [Invalid] [Invalid]
fx-35 (Mandatory)
English Description:
Context: TermDeposit (complex type)
fixedRate must be positive
Formal Description:
Context: TermDeposit (complex type)
fixedRate gt 0
Test cases: [Invalid] [Invalid]
fx-36 (Mandatory)
English Description:
Context: Trade (complex type)
If fxAverageRateOption exists, then fxAverageRateOption/expiryDateTime/expiryDate must be after tradeHeader/tradeDate
Formal Description:
Context: Trade (complex type)
[exists(fxAverageRateOption)]
fxAverageRateOption/expiryDateTime/expiryDate gt tradeHeader/tradeDate
Test cases: [Invalid] [Invalid]
fx-36b (Mandatory)
English Description:
Context: Contract (complex type)
If fxAverageRateOption exists, then fxAverageRateOption/expiryDateTime/expiryDate must be after header/contractDate
Formal Description:
Context: Contract (complex type)
[exists(fxAverageRateOption)]
fxAverageRateOption/expiryDateTime/expiryDate gt header/contractDate
Test cases: [Invalid] [Invalid]
fx-37 (Mandatory)
Formal Description:
Context: Trade (complex type)
[exists(fxBarrierOption)]
If fxBarrierOption exists, then fxBarrierOption/expiryDateTime/expiryDate must be after tradeHeader/tradeDatefxBarrierOption/expiryDateTime/expiryDate gt tradeHeader/tradeDate
Test cases: [Invalid] [Invalid]
fx-37b (Mandatory)
English Description:
Context: Contract (complex type)
If fxBarrierOption exists, then fxBarrierOption/expiryDateTime/expiryDate must be after header/contractDate
Formal Description:
Context: Contract (complex type)
[exists(fxBarrierOption)]
fxBarrierOption/expiryDateTime/expiryDate gt header/contractDate
Test cases: [Invalid] [Invalid]
fx-38 (Mandatory)
English Description:
Context: Trade (complex type)
If fxDigitalOption exists, then fxDigitalOption/expiryDateTime/expiryDate must be after tradeHeader/tradeDate
Formal Description:
Context: Trade (complex type)
[exists(fxDigitalOption)]
fxDigitalOption/expiryDateTime/expiryDate gt tradeHeader/tradeDate
Test cases: [Invalid] [Invalid]
fx-38b (Mandatory)
English Description:
Context: Contract (complex type)
If fxDigitalOption exists, then fxDigitalOption/expiryDateTime/expiryDate must be after header/contractDate
Formal Description:
Context: Contract (complex type)
[exists(fxDigitalOption)]
fxDigitalOption/expiryDateTime/expiryDate gt header/contractDate
Test cases: [Invalid] [Invalid]
fx-39 (Mandatory)
English Description:
Context: Trade (complex type)
If fxSingleLeg exists, then the value of fxSingleLeg/valueDate or the value of both fxSingleLeg/valueDate1 and fxSingleLeg/valueDate2 must be after tradeHeader/tradeDate
Formal Description:
Context: Trade (complex type)
[exists(fxSingleLeg)]
(fxSingleLeg/valueDate gt tradeHeader/tradeDate) or ((fxSingleLeg/valueDate1, fxSingleLeg/valueDate2) gt tradeHeader/tradeDate)
Test cases: [Invalid] [Invalid]
fx-39b (Mandatory)
English Description:
Context: Contract (complex type)
If fxSingleLeg exists, then the value of fxSingleLeg/valueDate or the value of both fxSingleLeg/valueDate1 and fxSingleLeg/valueDate2 must be after header/contractDate
Formal Description:
Context: Contract (complex type)
[exists(fxSingleLeg)]
fxSingleLeg/valueDate gt header/contractDate) or ((fxSingleLeg/valueDate1, fxSingleLeg/valueDate2) gt header/contractDate)
Test cases: [Invalid] [Invalid]
fx-40 (Mandatory)
English Description:
Context: Trade (complex type)
The value of all fxSwap/fxSingleLeg/valueDate, fxswap/fxSingleLeg/valueDate1 and fxSwap/fxSingleLeg/valueDate2 instances must be after tradeHeader/tradeDate
Formal Description:
Context: Trade (complex type)
for all $vd in fxSwap/fxSingleLeg/(valueDate|valueDate1|valueDate2) satisfies $vd gt tradeHeader/tradeDate
Test cases: [Invalid] [Invalid]
fx-40b (Mandatory)
English Description:
Context: Contract (complex type)
The value of all fxSwap/fxSingleLeg/valueDate, fxswap/fxSingleLeg/valueDate1 and fxSwap/fxSingleLeg/valueDate2 instances must be after header/contractDate
Formal Description:
Context: Contract (complex type)
for all $vd in fxSwap/fxSingleLeg/(valueDate|valueDate1|valueDate2) satisfies $vd gt header/contractDate
Test cases: [Invalid] [Invalid]
fx-41 (Mandatory)
English Description:
Context: FxBarrier (complex type)
triggerRate must be positive
Formal Description:
Context: FxBarrier (complex type)
triggerRate gt 0
Test cases: [Invalid] [Invalid]
fx-42 (Mandatory)
English Description:
Context: FxAverageRateOption (complex type)
The value of each averageRateObservationDate/observationDate must be unique
Formal Description:
Context: FxAverageRateOption (complex type)
count(distinct-values(averageRateObservationDate/observationDate)) eq count(averageRateObservationDate/observationDate)
Test cases: [Invalid]
fx-43 (Mandatory)
English Description:
Context: FxAverageRateOption (complex type)
If putCurrencyAmount and callCurrencyAmount have the same-currency, then putCurrencyAmount/currency must not be equal to callCurrencyAmount/currency
Formal Description:
Context: FxAverageRateOption (complex type)
[same-currency((putCurrencyAmount,callCurrencyAmount))]
putCurrencyAmount/currency ne callCurrencyAmount/currency
Test cases: [Invalid]
fx-44 (Mandatory)
English Description:
Context: FxAverageRateOption (complex type)
If fxOptionPremium exists, then buyerPartyReference/@href must be equal to fxOptionPremium/payerPartyReference/@href and sellerPartyReference/@href must be equal to fxOptionPremium/receiverPartyReference/@href
Formal Description:
Context: FxAverageRateOption (complex type)
[exists(fxOptionPremium)]
(buyerPartyReference/@href eq fxOptionPremium/payerPartyReference/@href) and (sellerPartyReference/@href eq fxOptionPremium/receiverPartyReference/@href)
Test cases: [Invalid]
fx-45 (Mandatory)
English Description:
Context: FxDigitalOption (complex type)
If fxOptionPremium exists, then buyerPartyReference/@href must be equal to fxOptionPremium/payerPartyReference/@href, and sellerPartyReference/@href must be equal to fxOptionPremium/receiverPartyReference/@href
Formal Description:
Context: FxDigitalOption (complex type)
[exists(fxOptionPremium)]
buyerPartyReference/@href eq fxOptionPremium/payerPartyReference/@href and sellerPartyReference/@href eq fxOptionPremium/receiverPartyReference/@href
Test cases: [Invalid]
fx-46 (Mandatory)
English Description:
Context: SideRates (complex type)
currency1SideRate/sideRateBasis is equal to either "BaseCurrencyPerCurrency1" or "Currency1PerBaseCurrency".
Formal Description:
Context: SideRates (complex type)
currency1SideRate/sideRateBasis = ("BaseCurrencyPerCurrency1" , "Currency1PerBaseCurrency")
Test cases: [Invalid]
fx-47 (Mandatory)
English Description:
Context: SideRates (complex type)
currency2SideRate/sideRateBasis is equal to either "BaseCurrencyPerCurrency2" or "Currency2PerBaseCurrency".
Formal Description:
Context: SideRates (complex type)
currency2SideRate/sideRateBasis = ("BaseCurrencyPerCurrency2" , "Currency2PerBaseCurrency")
Test cases: [Invalid]

Deprecated rules

Removed rules