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:
- generatedDates := [null];
- unadjustedDate := observationStartDate;
- while unadjustedDate le 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)
English Description:
Context: ExchangeRate (complex type)
rate must be positive
fx-2 (Mandatory)
English Description:
Context: ExchangeRate (complex type)
If forwardPoints exists, then spotRate must exist
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
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
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
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
fx-7 (Mandatory)
English Description:
Context: FxAmericanTrigger (complex type)
triggerRate must be positive
fx-8 (Mandatory)
English Description:
Context: FxAmericanTrigger (complex type)
If observationStartDate exists, and if observationEndDate exists, then observationStartDate must be before observationEndDate
fx-9 (Mandatory)
English Description:
Context: FxAverageRateObservationSchedule (complex type)
If observationStartDate exists, and if observationEndDate exists, then observationStartDate must be before observationEndDate
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
fx-11 (Mandatory)
English Description:
Context: FxAverageRateOption (complex type)
The value of each observedRates/observationDate must be unique
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
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
fx-14 (Mandatory)
English Description:
Context: FxBarrier (complex type)
If observationStartDate exists, and if observationEndDate exists, then observationStartDate must be before observationEndDate
fx-15 (Mandatory)
English Description:
Context: FxBarrierOption (complex type)
If spotRate exists, then spotRate must be positive
fx-16 (Mandatory)
English Description:
Context: FxDigitalOption (complex type)
If spotRate exists, then spotRate must be positive
fx-17 (Mandatory)
English Description:
Context: FxEuropeanTrigger (complex type)
triggerRate must be positive
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
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
fx-20 (Mandatory)
English Description:
Context: FxLeg (complex type)
If currency1ValueDate exists, then currency1ValueDate must not be equal to currency2ValueDate
fx-21 (Mandatory)
English Description:
Context: FxLeg (complex type)
If nonDeliverableForward exists, then exchangeRate/forwardPoints must exist
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
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
fx-24 (Mandatory)
English Description:
Context: FxStrikePrice (complex type)
rate must be positive
fx-25 (Mandatory)
English Description:
Context: FxSwap (complex type)
Two or more fxSingleLeg elements must exist
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
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
fx-28 (Mandatory)
English Description:
Context: SideRate (complex type)
rate must be positive
fx-29 (Mandatory)
English Description:
Context: SideRate (complex type)
If forwardPoints exists, then spotRate must exist
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
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
fx-32 (Mandatory)
English Description:
Context: TermDeposit (complex type)
The @href attribute of initialPayerReference must not be equal to the @href attribute of initialReceiverReference
fx-33 (Mandatory)
English Description:
Context: TermDeposit (complex type)
maturityDate must be after startDate
fx-34 (Mandatory)
English Description:
Context: TermDeposit (complex type)
principal/amount must be positive
fx-35 (Mandatory)
English Description:
Context: TermDeposit (complex type)
fixedRate must be positive
fx-36 (Mandatory)
English Description:
Context: Trade (complex type)
If fxAverageRateOption exists, then fxAverageRateOption/expiryDateTime/expiryDate must be after tradeHeader/tradeDate
fx-36b (Mandatory)
English Description:
Context: Contract (complex type)
If fxAverageRateOption exists, then fxAverageRateOption/expiryDateTime/expiryDate must be after header/contractDate
fx-37b (Mandatory)
English Description:
Context: Contract (complex type)
If fxBarrierOption exists, then fxBarrierOption/expiryDateTime/expiryDate must be after header/contractDate
fx-38 (Mandatory)
English Description:
Context: Trade (complex type)
If fxDigitalOption exists, then fxDigitalOption/expiryDateTime/expiryDate must be after tradeHeader/tradeDate
fx-38b (Mandatory)
English Description:
Context: Contract (complex type)
If fxDigitalOption exists, then fxDigitalOption/expiryDateTime/expiryDate must be after header/contractDate
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
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
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
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
fx-41 (Mandatory)
English Description:
Context: FxBarrier (complex type)
triggerRate must be positive
fx-42 (Mandatory)
English Description:
Context: FxAverageRateOption (complex type)
The value of each averageRateObservationDate/observationDate must be unique
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
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
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
fx-46 (Mandatory)
English Description:
Context: SideRates (complex type)
currency1SideRate/sideRateBasis is equal to either "BaseCurrencyPerCurrency1" or "Currency1PerBaseCurrency".
fx-47 (Mandatory)
English Description:
Context: SideRates (complex type)
currency2SideRate/sideRateBasis is equal to either "BaseCurrencyPerCurrency2" or "Currency2PerBaseCurrency".
Deprecated rules
Removed rules