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:
- 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.
Functions
The following shared functions are used in the rules.
Rules
Unique contexts:
fx-1 (Mandatory)
Context:
ExchangeRate (complex type)
rate > 0.
fx-2 (Mandatory)
Context:
ExchangeRate (complex type)
[exists(forwardPoints)]
exists(spotRate).
fx-3 (Mandatory)
Context:
ExchangeRate (complex type)
[exists(spotRate)] [exists(forwardPoints)]
rate = spotRate + forwardPoints.
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.
fx-5 (Mandatory)
Context:
ExchangeRate (complex type)
[
same-currency-scheme((
sideRates/currency1SideRate/currency,
quotedCurrencyPair/currency1))]
sideRates/currency1SideRate/currency = quotedCurrencyPair/currency1.
fx-6 (Mandatory)
Context:
ExchangeRate (complex type)
[
same-currency-scheme((
sideRates/currency2SideRate/currency,
quotedCurrencyPair/currency2))]
sideRates/currency2SideRate/currency = quotedCurrencyPair/currency2.
fx-7 (Mandatory)
Context:
FxAmericanTrigger (complex type)
triggerRate > 0.
fx-8 (Mandatory)
Context:
FxAmericanTrigger (complex type)
[exists(observationStartDate)] [exists(observationEndDate)]
observationStartDate <= observationEndDate.
fx-9 (Mandatory)
Context:
FxAverageRateObservationSchedule (complex type)
[exists(observationStartDate)] [exists(observationEndDate)]
observationStartDate <= observationEndDate.
fx-10 (Mandatory)
Context:
FxAverageRateObservationSchedule (complex type)
The observation period defined by observationStartDate and observationEndDate should be an integer multiple of the calculationPeriodFrequency.
fx-11 (Mandatory)
Context:
FxAverageRateOption (complex type)
The value of each observedRates/observationDate shall be unique.
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.
fx-13 (Mandatory)
Context:
FxAverageRateOption (complex type)
[exists(averageRateObservationDate)]
Each observedRates/observationDate must match one of the dates defined by averageRateObservationDate/observationDate.
fx-14 (Mandatory)
Context:
FxBarrier (complex type)
[exists(observationStartDate)] [exists(observationEndDate)]
observationStartDate <= observationEndDate.
fx-15 (Mandatory)
Context:
FxBarrierOption (complex type)
[exists(spotRate)]
spotRate > 0.
fx-16 (Mandatory)
Context:
FxDigitalOption (complex type)
[exists(spotRate)]
spotRate > 0.
fx-17 (Mandatory)
Context:
FxEuropeanTrigger (complex type)
triggerRate > 0.
fx-18 (Mandatory)
Context:
FxLeg (complex type)
exchangedCurrency1/payerPartyReference/@href = exchangedCurrency2/receiverPartyReference/@href and exchangedCurrency1/receiverPartyReference/@href = exchangedCurrency2/payerPartyReference/@href.
fx-19 (Mandatory)
Context:
FxLeg (complex type)
[
same-currency((
exchangedCurrency1/paymentAmount,
exchangedCurrency2/paymentAmount))]
exchangedCurrency1/paymentAmount/currency != exchangedCurrency2/paymentAmount/currency.
fx-20 (Mandatory)
Context:
FxLeg (complex type)
[exists(currency1ValueDate)]
currency1ValueDate != currency2ValueDate.
fx-21 (Mandatory)
Context:
FxLeg (complex type)
[exists(nonDeliverableForward)]
exists(exchangeRate/forwardPoints).
fx-22 (Mandatory)
Context:
FxOptionLeg (complex type)
[exists(fxOptionPremium)]
buyerPartyReference/@href = fxOptionPremium/payerPartyReference/@href and sellerPartyReference/@href = fxOptionPremium/receiverPartyReference/@href.
fx-23 (Mandatory)
Context:
FxOptionLeg (complex type)
[
same-currency((
putCurrencyAmount,
callCurrencyAmount))]
putCurrencyAmount/currency != callCurrencyAmount/currency.
fx-24 (Mandatory)
Context:
FxStrikePrice (complex type)
rate > 0.
fx-25 (Mandatory)
Context:
FxSwap (complex type)
count(fxSingleLeg)>=2.
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.
fx-27 (Mandatory)
currency1 != currency2.
fx-28 (Mandatory)
Context:
SideRate (complex type)
rate > 0.
fx-29 (Mandatory)
Context:
SideRate (complex type)
[exists(forwardPoints)]
exists(spotRate).
fx-30 (Mandatory)
Context:
SideRate (complex type)
[exists(spotRate)] [exists(forwardPoints)]
rate = spotRate + forwardPoints.
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.
fx-32 (Mandatory)
Context:
TermDeposit (complex type)
initialPayerReference/@href != initialReceiverReference/@href .
fx-33 (Mandatory)
Context:
TermDeposit (complex type)
maturityDate > startDate.
fx-34 (Mandatory)
Context:
TermDeposit (complex type)
principal/amount > 0.
fx-35 (Mandatory)
Context:
TermDeposit (complex type)
fixedRate > 0.
fx-36 (Mandatory)
Context:
Trade (complex type)
fxAverageRateOption/expiryDateTime/expiryDate > tradeHeader/tradeDate.
fx-36b (Mandatory)
Context:
Contract (complex type)
fxAverageRateOption/expiryDateTime/expiryDate > header/contractDate.
fx-37 (Mandatory)
Context:
Trade (complex type)
fxBarrierOption/expiryDateTime/expiryDate > tradeHeader/tradeDate.
fx-37b (Mandatory)
Context:
Contract (complex type)
fxBarrierOption/expiryDateTime/expiryDate > header/contractDate.
fx-38 (Mandatory)
Context:
Trade (complex type)
fxDigitalOption/expiryDateTime/expiryDate > tradeHeader/tradeDate.
fx-38b (Mandatory)
Context:
Contract (complex type)
fxDigitalOption/expiryDateTime/expiryDate > header/contractDate.
fx-39 (Mandatory)
Context:
Trade (complex type)
The value of fxSingleLeg/valueDate or the value of both fxSingleLeg/valueDate1 and fxSingleLeg/valueDate2 > tradeHeader/tradeDate.
fx-39b (Mandatory)
Context:
Contract (complex type)
The value of fxSingleLeg/valueDate or the value of both fxSingleLeg/valueDate1 and fxSingleLeg/valueDate2 > header/contractDate.
fx-40 (Mandatory)
Context:
Trade (complex type)
The value of all fxSwap/fxSingleLeg/valueDate, fxswap/fxSingleLeg/valueDate1 and fxSwap/fxSingleLeg/valueDate2 instances > tradeHeader/tradeDate.
fx-40b (Mandatory)
Context:
Contract (complex type)
The value of all fxSwap/fxSingleLeg/valueDate, fxswap/fxSingleLeg/valueDate1 and fxSwap/fxSingleLeg/valueDate2 instances > header/contractDate.
fx-41 (Mandatory)
Context:
FxBarrier (complex type)
triggerRate > 0.
fx-42 (Mandatory)
Context:
FxAverageRateOption (complex type)
The value of each averageRateObservationDate/observationDate must be unique.
fx-43 (Mandatory)
Context:
FxAverageRateOption (complex type)
[
same-currency((
putCurrencyAmount,
callCurrencyAmount))]
putCurrencyAmount/currency != callCurrencyAmount/currency.
fx-44 (Mandatory)
Context:
FxAverageRateOption (complex type)
[exists(fxOptionPremium)]
buyerPartyReference/@href = fxOptionPremium/payerPartyReference/@href and sellerPartyReference/@href = fxOptionPremium/receiverPartyReference/@href.
fx-45 (Mandatory)
Context:
FxAverageRateOption (complex type)
[exists(fxOptionPremium)]
buyerPartyReference/@href = fxOptionPremium/payerPartyReference/@href and sellerPartyReference/@href = fxOptionPremium/receiverPartyReference/@href.
fx-46 (Mandatory)
Context:
SideRates (complex type)
currency1SideRate/sideRateBasis = ("BaseCurrencyPerCurrency1" | "Currency1PerBaseCurrency").
fx-47 (Mandatory)
Context:
SideRates (complex type)
currency2SideRate/sideRateBasis = ("BaseCurrencyPerCurrency2" | "Currency2PerBaseCurrency").
Deprecated rules
Removed rules