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
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.
Conditions
The Validation Conditions only apply when specific rules reference them. The following conditions 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 condition.
Condition: 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.
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)]
spotRate must exist.
fx-3 (Mandatory)
Context:
ExchangeRate (complex type)
[exists(spotRate)] [exists(forwardPoints)]
rate = spotRate + forwardPoints.
fx-4 (Mandatory)
sideRates/baseCurrency != the values of both quotedCurrencyPair/currency1 and quotedCurrencyPair/currency2.
fx-5 (Mandatory)
sideRates/currency1SideRate/currency = quotedCurrencyPair/currency1.
fx-6 (Mandatory)
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 elements)]
Each observedRates/observationDate should 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)]
exchangeRate/forwardPoints must exist.
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:
FxOptionLeg (complex type)
rate > 0.
fx-25 (Mandatory)
Context:
FxSwap (complex type)
Two or more fxSingleLeg elements must exist.
fx-26 (Mandatory)
Context:
FxSwap (complex type)
[two fxSingleLeg elements exist]
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)]
spotRate must exist.
fx-30 (Mandatory)
Context:
SideRate (complex type)
[exists(spotRate)] [exists(forwardPoints)]
rate = spotRate + forwardPoints.
fx-31 (Mandatory)
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-37 (Mandatory)
Context:
Trade (complex type)
fxBarrierOption/expiryDateTime/expiryDate > tradeHeader/tradeDate.
fx-38 (Mandatory)
Context:
Trade (complex type)
fxDigitalOption/expiryDateTime/expiryDate > tradeHeader/tradeDate.
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-40 (Mandatory)
Context:
Trade (complex type)
The value of all fxSwap/fxSingleLeg/valueDate, fxswap/fxSingleLeg/valueDate1 and fxSwap/fxSingleLeg/valueDate2 instances > tradeHeader/tradeDate.
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 = either BaseCurrencyPerCurrency1 or Currency1PerBaseCurrency.
fx-47 (Mandatory)
Context:
SideRates (complex type)
currency2SideRate/sideRateBasis = either BaseCurrencyPerCurrency2 or Currency2PerBaseCurrency.
Deprecated rules
Removed rules