Rule Summary

Click on any identifier to navigate to its definition.
Global Rules fx-1 fx-2 fx-3 fx-4 fx-5 fx-6 fx-7 fx-8 fx-9 fx-10 fx-11 fx-13 fx-14 fx-15 fx-16 fx-17 fx-18 fx-19 fx-20 fx-21 fx-22 fx-23 fx-24 fx-25 fx-26 fx-27 fx-28 fx-29 fx-30 fx-31 fx-32 fx-33 fx-34 fx-35 fx-36 fx-36b fx-37 fx-37b fx-38 fx-38b fx-39 fx-39b fx-40 fx-40b fx-41 fx-42 fx-43 fx-44 fx-45 fx-46 fx-47
Properties and Macros "same scheme is specified in all three of" "same scheme is specified in"

Operators

Summary of all language extensions used in the rules.
frequency defined by Turns a start date and an end date into an FpML "Interval" by subtracting the start date from the end date. This assumes that the dates are unadjusted. The operator will always return the most coarse-grain representation possible. For example, the [frequency defined by] '2005-12-01' and '20010-12-01' will be 5Y.
is an integer multiple of Takes two FpML "Interval" objects, "a" and "b" and returns true only if "a" is an integer multiple of "b".

Model Elements

The following model elements and attributes are being referred to in the rules. Click on any element or attribute to show only rules that use them. Click the link below the table to show all rules.
Model Elements B Boolean C CalculationPeriodFrequency Contract Currency D Date E ExchangeRate F FxAmericanTrigger FxAverageRateObservationDate FxAverageRateObservationSchedule FxAverageRateOption FxBarrier FxBarrierOption FxCashSettlement FxDigitalOption FxEuropeanTrigger FxLeg FxOptionLeg FxOptionPremium FxStrikePrice FxSwap I IDREF IdentifiedDate Interval O ObservedRates Q QuotedCurrencyPair S SideRate SideRateBasisEnum SideRates T TermDeposit Trade a anyURI d date decimal
Attributes B BaseCurrencyPerCurrency1 BaseCurrencyPerCurrency2 C Currency1PerBaseCurrency Currency2PerBaseCurrency a amount averageRateObservationDate b baseCurrency buyerPartyReference c calculationPeriodFrequency callCurrencyAmount contractDate currency currency1 currency1SideRate currency1ValueDate currency2 currency2SideRate currency2ValueDate currencyScheme e exchangeRate exchangedCurrency1 exchangedCurrency2 expiryDate expiryDateTime f fixedRate forwardPoints fxAverageRateOption fxBarrierOption fxDigitalOption fxOptionPremium fxSingleLeg fxSwap h header href i initialPayerReference initialReceiverReference m maturityDate n nonDeliverableForward o observationDate observationEndDate observationStartDate observedRates p payerPartyReference paymentAmount principal putCurrencyAmount q quotedCurrencyPair r rate receiverPartyReference s sellerPartyReference sideRateBasis sideRates spotRate startDate t tradeDate tradeHeader triggerRate v valueDate

Show All Rules

All Rules

-----------------------------------------------------------------------------
-- Natural Rule Language File
-- FpML 4.5 FX Derivatives Rules
--
-- (c)2009 Model Two Zero. Licence terms:
-- http://creativecommons.org/licenses/by-nc-sa/3.0/
--
-- Original rules (c)ISDA. FpML(r) is a trademark of ISDA.
-----------------------------------------------------------------------------

Model "schema/fpml-main-4-5.xsd"
Operators "operators.nrlop"
Context: ExchangeRate
Rule "fx-1"
rate is greater than 0
Context: ExchangeRate
Rule "fx-2"
If forwardPoints are present then a spotRate is present
Context: ExchangeRate
Rule "fx-3"
If a spotRate is present and forwardPoints are present then
rate = spotRate + forwardPoints
Context: ExchangeRate
Rule "fx-4"
If the same scheme is specified in all three of sideRates.baseCurrency and
quotedCurrencyPair.currency1 and quotedCurrencyPair.currency2 then
sideRates.baseCurrency <> quotedCurrencyPair.currency1 and
sideRates.baseCurrency <> quotedCurrencyPair.currency2

Context: Currency ("currencyA"), Currency ("currencyB"), Currency ("currencyC")
Property "same scheme is specified in all three of"
(currencyA.currencyScheme is not present and
currencyB.currencyScheme is not present and
currencyC.currencyScheme is not present) or
(currencyA.currencyScheme is present and
currencyB.currencyScheme is present and
currencyC.currencyScheme is present and
currencyA.currencyScheme = currencyB.currencyScheme and
currencyA.currencyScheme = currencyC.currencyScheme)
Context: Currency ("currencyA"), Currency ("currencyB")
Property "same scheme is specified in"
(currencyA.currencyScheme is not present and
currencyB.currencyScheme is not present) or
(currencyA.currencyScheme is present and
currencyB.currencyScheme is present and
currencyA.currencyScheme = currencyB.currencyScheme)

Context: ExchangeRate
Rule "fx-5"
If the same scheme is specified in sideRates.currency1SideRate.currency and
quotedCurrencyPair.currency1 then sideRates.currency1SideRate.currency =
quotedCurrencyPair.currency1
Context: ExchangeRate
Rule "fx-6"
If the same scheme is specified in sideRates.currency2SideRate.currency and
quotedCurrencyPair.currency2 then sideRates.currency2SideRate.currency =
quotedCurrencyPair.currency2
Context: FxAmericanTrigger
Rule "fx-7"
triggerRate > 0
Context: FxAmericanTrigger
Rule "fx-8"
If observationStartDate is present and observationEndDate is present then
observationStartDate is before observationEndDate
Context: FxAverageRateObservationSchedule
Rule "fx-9"
If observationStartDate is present and observationEndDate is present then
observationStartDate is before observationEndDate
Context: FxAverageRateObservationSchedule
Rule "fx-10"
The ([frequency defined by] observationStartDate and observationEndDate)
[is an integer multiple of] the calculationPeriodFrequency
Context: FxAverageRateOption
Rule "fx-11"
The number of unique observedRates (by observationDate) is equal to the
number of observedRates


-- fx-12 cannot be described without a business day calendar

Context: FxAverageRateOption
Rule "fx-13"
If an averageRateObservationDate is present then for each "rate" in the collection of
observedRates (at least one averageRateObservationDate has observationDate =
rate.observationDate)
Context: FxBarrier
Rule "fx-14"
If observationStartDate is present and observationEndDate is present then
observationStartDate is before observationEndDate
Context: FxBarrierOption
Rule "fx-15"
If spotRate is present then spotRate > 0
Context: FxDigitalOption
Rule "fx-16"
If spotRate is present then spotRate > 0
Context: FxEuropeanTrigger
Rule "fx-17"
triggerRate > 0
Context: FxLeg
Rule "fx-18"
exchangedCurrency1.payerPartyReference.href = exchangedCurrency2.receiverPartyReference.href and
exchangedCurrency1.receiverPartyReference.href = exchangedCurrency1.payerPartyReference.href
Context: FxLeg
Rule "fx-19"
If the same scheme is specified in exchangedCurrency1.paymentAmount.currency and
exchangedCurrency2.paymentAmount.currency then exchangedCurrency1.paymentAmount.currency is not equal to
exchangedCurrency2.paymentAmount.currency
Context: FxLeg
Rule "fx-20"
If currency1ValueDate is present then currency1ValueDate <> currency2ValueDate
Context: FxLeg
Rule "fx-21"
If nonDeliverableForward is present then exchangeRate.forwardPoints is present
Context: FxOptionLeg
Rule "fx-22"
If an fxOptionPremium is present then each fxOptionPremium has (
payerPartyReference.href = FxOptionLeg.buyerPartyReference.href and
receiverPartyReference.href = FxOptionLeg.sellerPartyReference.href)
Context: FxOptionLeg
Rule "fx-23"
If the same scheme is specified in putCurrencyAmount.currency and
callCurrencyAmount.currency then putCurrencyAmount.currency <>
callCurrencyAmount.currency
Context: FxStrikePrice
Rule "fx-24"
rate > 0
Context: FxSwap
Rule "fx-25"
At least two fxSingleLeg elements are present
Context: FxSwap
Rule "fx-26"
If exactly two fxSingleLeg elements are present then the number of unique
fxSingleLeg elements (by valueDate) = 2
Context: QuotedCurrencyPair
Rule "fx-27"
If the same scheme is specified in currency1 and currency2 then
currency1 <> currency2
Context: SideRate
Rule "fx-28"
rate > 0
Context: SideRate
Rule "fx-29"
If forwardPoints are present then spotRate is present
Context: SideRate
Rule "fx-30"
If spotRate is present and forwardPoints is present then rate = spotRate + forwardPoints
Context: SideRates
Rule "fx-31"
If the same scheme is specified in all three of baseCurrency and currency1SideRate.currency
and currency2SideRate.currency then baseCurrency <> currency1SideRate.currency and
baseCurrency <> currency2SideRate.currency
Context: TermDeposit
Rule "fx-32"
initialPayerReference.href <> initialReceiverReference.href
Context: TermDeposit
Rule "fx-33"
The maturityDate is after the startDate
Context: TermDeposit
Rule "fx-34"
principal.amount > 0
Context: TermDeposit
Rule "fx-35"
fixedRate > 0
Context: Trade
Rule "fx-36"
If fxAverageRateOption is present then fxAverageRateOption.expiryDateTime.expiryDate
is after the tradeHeader.tradeDate
Context: Contract
Rule "fx-36b"
If fxAverageRateOption is present then fxAverageRateOption.expiryDateTime.expiryDate
is after the header.contractDate
Context: Trade
Rule "fx-37"
If fxBarrierOption is present then fxBarrierOption.expiryDateTime.expiryDate
is after the tradeHeader.tradeDate
Context: Contract
Rule "fx-37b"
If fxBarrierOption is present then fxBarrierOption.expiryDateTime.expiryDate
is after the header.contractDate
Context: Trade
Rule "fx-38"
If fxDigitalOption is present then fxDigitalOption.expiryDateTime.expiryDate
is after the tradeHeader.tradeDate
Context: Contract
Rule "fx-38b"
If fxDigitalOption is present then fxDigitalOption.expiryDateTime.expiryDate
is after the header.contractDate
Context: Trade
Rule "fx-39"
If fxSingleLeg is present then fxSingleLeg.valueDate > tradeHeader.tradeDate or
fxSingleLeg.currency1ValueDate> tradeHeader.tradeDate and fxSingleLeg.currency2ValueDate >
tradeHeader.tradeDate
Context: Contract
Rule "fx-39b"
If fxSingleLeg is present then fxSingleLeg.valueDate > header.contractDate or
fxSingleLeg.currency1ValueDate> header.contractDate and fxSingleLeg.currency2ValueDate >
header.contractDate
Context: Trade
Rule "fx-40"
If fxSwap is present then each of the fxSwap.fxSingleLeg elements has (
valueDate > Trade.tradeHeader.tradeDate or currency1ValueDate >
Trade.tradeHeader.tradeDate and currency2ValueDate > tradeHeader.tradeDate)
Context: Contract
Rule "fx-40b"
If fxSwap is present then each of the fxSwap.fxSingleLeg elements has (
valueDate > Contract.header.contractDate or currency1ValueDate >
Contract.header.contractDate and currency2ValueDate > Contract.header.contractDate)
Context: FxBarrier
Rule "fx-41"
triggerRate > 0
Context: FxAverageRateOption
Rule "fx-42"
The number of averageRateObservationDate elements is equal to
the number of unique averageRateObservationDate elements (by observationDate)
Context: FxAverageRateOption
Rule "fx-43"
If the same scheme is specified in putCurrencyAmount.currency and
callCurrencyAmount.currency then putCurrencyAmount.currency <>
callCurrencyAmount.currency
Context: FxAverageRateOption
Rule "fx-44"
If an fxOptionPremium is present then each fxOptionPremium has
(payerPartyReference.href = FxAverageRateOption.buyerPartyReference.href and
receiverPartyReference.href = FxAverageRateOption.sellerPartyReference.href)

Context: FxDigitalOption
Rule "fx-45"
If an fxOptionPremium is present then each fxOptionPremium has
(payerPartyReference.href = FxDigitalOption.buyerPartyReference.href and
receiverPartyReference.href = FxDigitalOption.sellerPartyReference.href)

Context: SideRates
Rule "fx-46"
currency1SideRate.sideRateBasis is one of SideRateBasisEnum.BaseCurrencyPerCurrency1,
SideRateBasisEnum.Currency1PerBaseCurrency
Context: SideRates
Rule "fx-47"
currency2SideRate.sideRateBasis is one of SideRateBasisEnum.BaseCurrencyPerCurrency2,
SideRateBasisEnum.Currency2PerBaseCurrency