FpML 4.5 Validation Rules - Rules for FX Derivatives

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

Deprecated rules

Removed rules