FpML 4.5 Validation Rules - Rules for FX Derivatives

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

Deprecated rules

Removed rules