Rule Summary

Click on any identifier to navigate to its definition.
Global Rules ird-1 ird-2 ird-3 ird-4 ird-5 ird-6 ird-7 ird-8 ird-9 ird-10-a ird-10-b ird-11-a ird-11-b ird-12-a ird-12-b ird-12-c ird-12-d ird-14 ird-16 ird-17 ird-18 ird-19 ird-20 ird-21 ird-22 ird-23 ird-24 ird-25 ird-27 ird-29 ird-30 ird-31 ird-32 ird-33 ird-34 ird-35 ird-36 ird-39 ird-40 ird-41 ird-42 ird-43 ird-44 ird-46 ird-47 ird-48 ird-49 ird-50 ird-51 ird-52 ird-53 ird-54 ird-57 ird-58 ird-59 ird-60
Properties and Macros "no stub is specified by" "no initial stub is specified by" "an initial stub is specified by" "no final stub is specified by" "a final stub is specified by"

Operators

Summary of all language extensions used in the rules.
is not equivalent to Returns true only if the FpML "Interval" supplied as the first parameter is equivalent to the second. The following (commutative) equivalences exist: 12M = 1Y, 7D = 1W, 1T = any interval
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".
last day of the month of Given a date, returns the last day of the month of that date. For example, for '2009-01-05', returns '31'.
is one of the dates defined by This is an interest-rate derivative specific operator: it checks whether the date passed as the first parameter is one of the unadjusted calculation period dates implied by the structure passed as the second parameter.
day of Given a date, returns the day specified in the date. For example, for '2009-01-05' returns 5.
a number is specified in Given a roll convention, determine if a number (i.e. day of the month) was specified.

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 A AdjustableDate AmericanExercise B BermudaExercise Boolean C Calculation CalculationPeriod CalculationPeriodDates CalculationPeriodFrequency CashSettlementPaymentDate CompoundingMethodEnum D Date DayCountFraction Discounting E EarlyTerminationEvent EuropeanExercise ExtensionEvent F FloatingRateCalculation Fra FxLinkedNotionalAmount I ID IDREF IdentifiedDate InflationRateCalculation InterestRateStream Interval M MandatoryEarlyTermination MandatoryEarlyTerminationAdjustedDates O OptionalEarlyTermination P PaymentCalculationPeriod PaymentDates PeriodEnum R RequiredIdentifierDate ResetDates ResetFrequency RollConventionEnum S Schedule Step StrikeSchedule String StubCalculationPeriodAmount StubValue Swaption W WeeklyRollConventionEnum d date decimal
Attributes F FRI M M MON N NONE S SFE T T THU TUE W W WED Y Y a adjustedCashSettlementPaymentDate adjustedCashSettlementValuationDate adjustedEarlyTerminationDate adjustedEffectiveDate adjustedEndDate adjustedExerciseDate adjustedExtendedTerminationDate adjustedFxSpotFixingDate adjustedPaymentDate adjustedStartDate adjustedTerminationDate americanExercise b bermudaExercise c calculation calculationPeriodAmount calculationPeriodDates calculationPeriodDatesReference calculationPeriodFrequency capRateSchedule cashSettlement cashSettlementPaymentDate cashSettlementValuationDate compoundingMethod d dateRelativeTo discountRate discountRateDayCountFraction e effectiveDate europeanExercise f finalStub firstPaymentDate firstPeriodStartDate firstRegularPeriodStartDate fixedRateSchedule floatingRateCalculation floorRateSchedule h href i id inflationRateCalculation initialStub initialValue k knownAmountSchedule l lastRegularPaymentDate lastRegularPeriodEndDate n notionalAmount notionalSchedule notionalStepSchedule o observedFxSpotRate p payerPartyReference paymentDates paymentFrequency period r receiverPartyReference relativeDate resetDate resetDates resetFrequency rollConvention s step stepDate t terminationDate u unadjustedDate unadjustedEndDate unadjustedPaymentDate unadjustedStartDate w weeklyRollConvention

Show All Rules

All Rules

-----------------------------------------------------------------------------
-- Natural Rule Language File
-- FpML 4.5 Interest Rates 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: InterestRateStream
Rule "ird-1"
resetDates are present only if calculationPeriodAmount.calculation.floatingRateCalculation is present or
calculationPeriodAmount.calculation.inflationRateCalculation is present
Context: InterestRateStream
Rule "ird-2"
paymentDates.paymentFrequency [is an integer multiple of] calculationPeriodDates.calculationPeriodFrequency
Context: InterestRateStream
Rule "ird-3"
paymentDates.firstPaymentDate [is one of the dates defined by] the calculationPeriodDates
Context: InterestRateStream
Rule "ird-4"
paymentDates.lastRegularPaymentDate [is one of the dates defined by] the calculationPeriodDates
Context: InterestRateStream
Rule "ird-5"
If resetDates are present then calculationPeriodDates.calculationPeriodFrequency [is an integer multiple of]
resetDates.resetFrequency
Context: InterestRateStream
Rule "ird-6"
If paymentDates.firstPaymentDate is present then paymentDates.firstPaymentDate
is after calculationPeriodDates.effectiveDate.unadjustedDate
Context: InterestRateStream
Rule "ird-7"
calculationPeriodAmount.calculation.compoundingMethod is present only if paymentDates.paymentFrequency
[is not equivalent to] calculationPeriodDates.calculationPeriodFrequency
Context: InterestRateStream
Rule "ird-8"
payerPartyReference.href is not equal to receiverPartyReference.href
Context: InterestRateStream
Rule "ird-9"
If calculationPeriodAmount.calculation.compoundingMethod is present then resetDates are present
Context: CalculationPeriodDates
Rule "ird-10-a"
If [a number is specified in] calculationPeriodFrequency.rollConvention and firstPeriodStartDate is present and
calculationPeriodFrequency.rollConvention is less than or equal to the [last day of the month of] firstPeriodStartDate.unadjustedDate then
the [day of] the firstPeriodStartDate.unadjustedDate is equal to calculationPeriodFrequency.rollConvention
else the [day of] firstPeriodStartDate.unadjustedDate is equal to the [last day of the month of] the firstPeriodStartDate.unadjustedDate
Context: CalculationPeriodDates
Rule "ird-10-b"
If [a number is specified in] calculationPeriodFrequency.rollConvention and firstPeriodStartDate is not present and
calculationPeriodFrequency.rollConvention is less than or equal to the [last day of the month of] effectiveDate.unadjustedDate then
the [day of] the effectiveDate.unadjustedDate is equal to calculationPeriodFrequency.rollConvention
else the [day of] effectiveDate.unadjustedDate is equal to the [last day of the month of] the effectiveDate.unadjustedDate
Context: CalculationPeriodDates
Rule "ird-11-a"
If [a number is specified in] calculationPeriodFrequency.rollConvention and lastRegularPeriodEndDate is present and
calculationPeriodFrequency.rollConvention is less than or equal to the [last day of the month of] lastRegularPeriodEndDate then
the [day of] the lastRegularPeriodEndDate is equal to calculationPeriodFrequency.rollConvention
else the [day of] lastRegularPeriodEndDate is equal to the [last day of the month of] the lastRegularPeriodEndDate
Context: CalculationPeriodDates
Rule "ird-11-b"
If [a number is specified in] calculationPeriodFrequency.rollConvention and lastRegularPeriodEndDate is not present and
calculationPeriodFrequency.rollConvention is less than or equal to the [last day of the month of] terminationDate.unadjustedDate then
the [day of] the terminationDate.unadjustedDate is equal to calculationPeriodFrequency.rollConvention
else the [day of] terminationDate.unadjustedDate is equal to the [last day of the month of] the terminationDate.unadjustedDate
Context: CalculationPeriodDates
Rule "ird-12-a"
If no stub is specified by the CalculationPeriodDates then
the ([frequency defined by] the effectiveDate.unadjustedDate and the terminationDate.unadjustedDate)
[is an integer multiple of] the calculationPeriodFrequency
Context: CalculationPeriodDates
Rule "ird-12-b"
If (an initial stub is specified by the CalculationPeriodDates) and
(no final stub is specified by the CalculationPeriodDates) then
the ([frequency defined by] the firstRegularPeriodStartDate and the terminationDate.unadjustedDate)
[is an integer multiple of] the calculationPeriodFrequency
Context: CalculationPeriodDates
Rule "ird-12-c"
If (no initial stub is specified by the CalculationPeriodDates) and
(a final stub is specified by the CalculationPeriodDates) then
the ([frequency defined by] the effectiveDate.unadjustedDate and the lastRegularPeriodEndDate)
[is an integer multiple of] the calculationPeriodFrequency
Context: CalculationPeriodDates
Rule "ird-12-d"
If (an initial stub is specified by the CalculationPeriodDates) and
(a final stub is specified by the CalculationPeriodDates) then
the ([frequency defined by] the firstRegularPeriodStartDate and the lastRegularPeriodEndDate)
[is an integer multiple of] the calculationPeriodFrequency
Context: CalculationPeriodDates
Rule "ird-14"
terminationDate.unadjustedDate is after effectiveDate.unadjustedDate
Context: CalculationPeriodDates
Rule "ird-16"
If firstRegularPeriodStartDate is present then terminationDate.unadjustedDate is after firstRegularPeriodStartDate
Context: CalculationPeriodDates
Rule "ird-17"
If lastRegularPeriodEndDate is present then terminationDate.unadjustedDate is after lastRegularPeriodEndDate
Context: CalculationPeriodDates
Rule "ird-18"
If lastRegularPeriodEndDate is present and firstRegularPeriodStartDate is present then
lastRegularPeriodEndDate is after firstRegularPeriodStartDate
Context: CalculationPeriodDates
Rule "ird-19"
If lastRegularPeriodEndDate is present then lastRegularPeriodEndDate is after
firstPeriodStartDate.unadjustedDate
Context: CalculationPeriodDates
Rule "ird-20"
If lastRegularPeriodEndDate is present then lastRegularPeriodEndDate is after
effectiveDate.unadjustedDate
Context: CalculationPeriodDates
Rule "ird-21"
firstPeriodStartDate.unadjustedDate is before effectiveDate.unadjustedDate
Context: CalculationPeriodDates
Rule "ird-22"
If firstRegularPeriodStartDate is present then firstPeriodStartDate.unadjustedDate
is before firstRegularPeriodStartDate
Context: StubCalculationPeriodAmount
Rule "ird-23"
An initialStub is present only if there are CalculationPeriodDates (the "dates") where
(dates.id is equal to calculationPeriodDatesReference.href and dates.firstPeriodStartDate is present or
dates.firstRegularPeriodStartDate is present)
Context: StubCalculationPeriodAmount
Rule "ird-24"
A finalStub is present only if there are CalculationPeriodDates (the "dates") where
(dates.id is equal to calculationPeriodDatesReference.href and dates.lastRegularPeriodEndDate is present)
Context: Schedule
Rule "ird-25"
If no step is present then initialValue is not equal to 0
Context: MandatoryEarlyTermination
Rule "ird-27"
cashSettlement.cashSettlementPaymentDate is not present
Context: Calculation
Rule "ird-29"
If compoundingMethod is present then fixedRateSchedule is not present
Context: CalculationPeriod
Rule "ird-30"
unadjustedStartDate is present or adjustedStartDate is present
Context: CalculationPeriod
Rule "ird-31"
unadjustedEndDate is present or adjustedEndDate is present
Context: Discounting
Rule "ird-32"
If discountRate is not present then discountRateDayCountFraction is not present
Context: Fra
Rule "ird-33"
adjustedTerminationDate is after adjustedEffectiveDate
Context: PaymentCalculationPeriod
Rule "ird-34"
unadjustedPaymentDate is present or adjustedPaymentDate is present
Context: PaymentDates
Rule "ird-35"
If firstPaymentDate is present and lastRegularPaymentDate is present then
firstPaymentDate is before lastRegularPaymentDate
Context: PaymentDates
Rule "ird-36"
If a firstPaymentDate is present and a lastRegularPaymentDate is present then
the ([frequency defined by] the firstPaymentDate and the lastRegularPaymentDate)
[is an integer multiple of] the paymentFrequency
Context: EarlyTerminationEvent
Rule "ird-39"
The adjustedExerciseDate is less than or equal to the adjustedEarlyTerminationDate
Context: EarlyTerminationEvent
Rule "ird-40"
The adjustedExerciseDate is less than or equal to the adjustedCashSettlementValuationDate
Context: EarlyTerminationEvent
Rule "ird-41"
The adjustedCashSettlementValuationDate is less than or equal to the adjustedCashSettlementPaymentDate
Context: ExtensionEvent
Rule "ird-42"
The adjustedExerciseDate is before the adjustedExtendedTerminationDate
Context: FxLinkedNotionalAmount
Rule "ird-43"
adjustedFxSpotFixingDate is present or notionalAmount is present or observedFxSpotRate is present or
resetDate is present
Context: MandatoryEarlyTerminationAdjustedDates
Rule "ird-44"
adjustedEarlyTerminationDate is less than or equal to adjustedCashSettlementValuationDate and
adjustedCashSettlementValuationDate is less than or equal to adjustedCashSettlementPaymentDate
Context: OptionalEarlyTermination
Rule "ird-46"
cashSettlement.cashSettlementValuationDate.dateRelativeTo.href is equal to
cashSettlement.cashSettlementPaymentDate.id
Context: OptionalEarlyTermination
Rule "ird-47"
If americanExercise is present then
cashSettlement.cashSettlementPaymentDate.relativeDate.dateRelativeTo.href is equal to americanExercise.id
else if europeanExercise is present then
cashSettlement.cashSettlementPaymentDate.relativeDate.dateRelativeTo.href is equal to europeanExercise.id
else if bermudaExercise is present then
cashSettlement.cashSettlementPaymentDate.relativeDate.dateRelativeTo.href is equal to bermudaExercise.id
Context: Swaption
Rule "ird-48"
If americanExercise is present then
cashSettlement.cashSettlementPaymentDate.relativeDate.dateRelativeTo.href is equal to americanExercise.id
else if europeanExercise is present then
cashSettlement.cashSettlementPaymentDate.relativeDate.dateRelativeTo.href is equal to europeanExercise.id
else if bermudaExercise is present then
cashSettlement.cashSettlementPaymentDate.relativeDate.dateRelativeTo.href is equal to bermudaExercise.id
Context: ResetFrequency
Rule "ird-49"
weeklyRollConvention is present only if period is equal to PeriodEnum.W
Context: InterestRateStream
Rule "ird-50"
If calculationPeriodAmount.calculation.notionalSchedule.notionalStepSchedule.step is present then
in each calculationPeriodAmount.calculation.notionalSchedule.notionalStepSchedule.step
the stepDate [is one of the dates defined by] the calculationPeriodDates
Context: InterestRateStream
Rule "ird-51"
If calculationPeriodAmount.calculation.fixedRateSchedule.step is present then
in each calculationPeriodAmount.calculation.fixedRateSchedule.step
the stepDate [is one of the dates defined by] the calculationPeriodDates
Context: InterestRateStream
Rule "ird-52"
If calculationPeriodAmount.calculation.floatingRateCalculation.capRateSchedule is present then
In each calculationPeriodAmount.calculation.floatingRateCalculation.capRateSchedule (in each
step stepDate [is one of the dates defined by] the calculationPeriodDates)
Context: InterestRateStream
Rule "ird-53"
If calculationPeriodAmount.calculation.floatingRateCalculation.floorRateSchedule is present then
In each calculationPeriodAmount.calculation.floatingRateCalculation.floorRateSchedule (in each
step stepDate [is one of the dates defined by] the calculationPeriodDates)
Context: InterestRateStream
Rule "ird-54"
If calculationPeriodAmount.knownAmountSchedule.step is present then
in each calculationPeriodAmount.knownAmountSchedule.step
the stepDate [is one of the dates defined by] the calculationPeriodDates
Context: CalculationPeriodFrequency
Rule "ird-57"
If the period is one of PeriodEnum.M, PeriodEnum.Y then
rollConvention is not one of RollConventionEnum.MON, RollConventionEnum.TUE,
RollConventionEnum.WED, RollConventionEnum.THU, RollConventionEnum.FRI,
RollConventionEnum.NONE, RollConventionEnum.SFE
Context: CalculationPeriodFrequency
Rule "ird-58"
If period = PeriodEnum.W then rollConvention is one of
RollConventionEnum.MON, RollConventionEnum.TUE, RollConventionEnum.WED,
RollConventionEnum.THU, RollConventionEnum.FRI, RollConventionEnum.NONE,
RollConventionEnum.SFE
Context: InterestRateStream
Rule "ird-59"
If resetDates are present then resetDates.calculationPeriodDatesReference.href is equal to
calculationPeriodDates.id
Context: CalculationPeriodFrequency
Rule "ird-60"
If the period is equal to PeriodEnum.T then rollConvention = RollConventionEnum.NONE
Context: CalculationPeriodDates ("dates")
Property "no stub is specified by"
dates.firstRegularPeriodStartDate is not present and
dates.lastRegularPeriodEndDate is not present
Context: CalculationPeriodDates ("dates")
Property "no initial stub is specified by"
dates.firstRegularPeriodStartDate is not present
Context: CalculationPeriodDates ("dates")
Property "an initial stub is specified by"
dates.firstRegularPeriodStartDate is present
Context: CalculationPeriodDates ("dates")
Property "no final stub is specified by"
dates.lastRegularPeriodEndDate is not present
Context: CalculationPeriodDates ("dates")
Property "a final stub is specified by"
dates.lastRegularPeriodEndDate is present