FpML 4.5 Validation Rules - Rules for Loan Messages

This is the Loan part of the validation rule set accompanying the FpML 4.5 Last Call 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

Functions

The following shared functions are used in the rules.

Rules

Unique contexts:

ln-1 (Mandatory)
Context: LoanContract (complex type)
Formal Description:
currentInterestRatePeriod/startDate ge effectiveDate
Test cases: [Valid] [Invalid]
ln-2 (Mandatory)
Context: DrawdownNotice (complex type)
Formal Description:
[exists(loanContract)] [loanContract/currentInterestRatePeriod/floatingRateIndex eq "PRIME"]
loanContract/currentInterestRatePeriod/rateFixingDate eq loanContract/effectiveDate
Comment: For a LoanContract the fixing date for the rate is always the effective date of the contract.
Test cases: [Invalid]
ln-3 (Mandatory)
Context: InterestRatePeriod (complex type)
Formal Description:
endDate ge startDate ge rateFixingDate
Test cases: [Invalid]
ln-4 (Mandatory)
Context: InterestRatePeriod (complex type)
Formal Description:
[not(exists(mandatoryCostRate))] [exists(interestRate)] [exists(margin)] [exists(allInRate)]
allInRate eq margin + interestRate
Test cases: [Invalid]
ln-5 (Mandatory)
Context: InterestRatePeriod (complex type)
Formal Description:
[exists(mandatoryCostRate)] [exists(interestRate)] [exists(margin)] [exists(allInRate)]
allInRate eq margin + interestRate + mandatoryCostRate
Test cases: [Invalid]
ln-6 (Mandatory)
Context: InterestAccrualSchedule (complex type)
Formal Description:
interestRatePeriod/startDate eq lenderLoanContractPeriod/startDate eq interestAccrualPeriod/startDate, in each period
Comment: interestRatePeriod/startDate,lenderLoanContractPeriod/startDate, interestAccrualPeriod/startDate must be equal in each period.
Test cases: [Invalid]
ln-7 (Mandatory)
Context: InterestAccrualSchedule (complex type)
Formal Description:
[count(interestRatePeriod) gt 1]
Every $startDate in $interestAccrualSchedule/interestRatePeriod[startDate gt min($interestAccrualSchedule/interestRatePeriod/startDate)]/startDate satisfies $startDate - "P1D" eq $interestAccrualSchedule/interestRatePeriod/endDate
Comment: Each interestRatePeriod except the first, starts 1 day after any other interestRatePeriod
Test cases: [Invalid]
ln-8 (Mandatory)
Context: InterestAccrualSchedule (complex type)
English Description:
Each lenderLoanContractPeriod except the first, starts 1 day after any other lenderLoanContractPeriod
Formal Description:
[count(lenderLoanContractPeriod) gt 1]
Every $startDate in $interestAccrualSchedule/lenderLoanContractPeriod[startDate gt min($interestAccrualSchedule/lenderLoanContractPeriod/startDate)]/startDate satisfies $startDate - "P1D" eq $interestAccrualSchedule/lenderLoanContractPeriod/endDate
Test cases: [Invalid]
ln-9 (Mandatory)
Context: InterestAccrualSchedule (complex type)
English Description:
Each interestAccrualPeriod except the first, starts 1 day after any other interestAccrualPeriod
Formal Description:
[count(interestAccrualPeriod) gt 1]
Every $startDate in $interestAccrualSchedule/interestAccrualPeriod[startDate gt min($interestAccrualSchedule/interestAccrualPeriod/startDate)]/startDate satisfies $startDate - "P1D" eq $interestAccrualSchedule/interestAccrualPeriod/endDate
Test cases: [Invalid]
ln-10 (Mandatory)
Context: FacilityNotice (complex type)
Formal Description:
[exists(facilitySummary/originalCommitmentAmount)] [exists(facilityCommitmentPosition/loanContractPosition/loanContractSummary/originalAmount)] [same-currency((facilitySummary/originalCommitmentAmount,facilityCommitmentPosition/loanContractPosition/loanContractSummary/originalAmount))]
facilitySummary/originalCommitmentAmount/amount ge facilityCommitmentPosition/loanContractPosition/loanContractSummary/originalAmount/amount
Test cases: [Invalid]
ln-11 (Mandatory)
Context: FacilityNotice (complex type)
Formal Description:
[exists(facilityCommitmentPosition/loanContractPosition)] [same-currency((facilityCommitmentPosition/currentAmount/shareAmount/amount,//facilityCommitmentPosition/loanContractPosition/currentAmount/shareAmount/amount))]
facilityCommitmentPosition/currentAmount/shareAmount/amount ge sum(facilityCommitmentPosition/loanContractPosition/currentAmount/shareAmount/amount)
Test cases:
ln-11b (Mandatory)
Context: LoanContractNotice (complex type)
Formal Description:
[exists(facilityCommitmentPosition/loanContractPosition)] [same-currency((facilityCommitmentPosition/currentAmount/shareAmount/amount,//facilityCommitmentPosition/loanContractPosition/currentAmount/shareAmount/amount))]
facilityCommitmentPosition/currentAmount/shareAmount/amount ge sum(facilityCommitmentPosition/loanContractPosition/currentAmount/shareAmount/amount)
Test cases: [Invalid]
ln-12 (Mandatory)
Context: FacilityNotice (complex type)
Formal Description:
[exists(facilityCommitmentPosition/loanContractPosition)] [same-currency((facilityCommitmentPosition/priorAmount/shareAmount/amount,//facilityCommitmentPosition/loanContractPosition/priorAmount/shareAmount/amount))]
facilityCommitmentPosition/priorAmount/shareAmount/amount ge sum(facilityCommitmentPosition/loanContractPosition/priorAmount/shareAmount/amount)
Test cases:
ln-13 (Mandatory)
Context: LoanContractNotice (complex type)
Formal Description:
[exists(facilityCommitmentPosition/loanContractPosition)] [same-currency((facilityCommitmentPosition/priorAmount/shareAmount/amount,//facilityCommitmentPosition/loanContractPosition/priorAmount/shareAmount/amount))]
facilityCommitmentPosition/priorAmount/shareAmount/amount ge sum(facilityCommitmentPosition/loanContractPosition/priorAmount/shareAmount/amount)
Test cases: [Invalid]
ln-14 (Mandatory)
Context: DrawdownNotice (complex type)
Formal Description:
[exists(loanContract)]
drawdownPayment/paymentDate ge loanContract/effectiveDate
Test cases: [Invalid]
ln-15 (Mandatory)
Context: DrawdownNotice (complex type)
Formal Description:
[exists(dealSummary/creditAgreementDate)]
(loanContract/effectiveDate ge dealSummary/creditAgreementDate) and (drawdownPayment/paymentDate ge dealSummary/creditAgreementDate)
Test cases: [Invalid]
ln-16 (Mandatory)
Context: DrawdownNotice (complex type)
Formal Description:
[exists(facilityCommitmentPosition/priorAmount/shareAmount)] [same-currency((facilityCommitmentPosition/priorAmount/shareAmount,drawdownPayment/shareLoanContractAmount))]
drawdownPayment/shareLoanContractAmount le facilityCommitmentPosition/priorAmount/shareAmount
Test cases: [Invalid]
ln-17 (Mandatory)
Context: DrawdownNotice (complex type)
Formal Description:
[exists(loanContract)] [same-currency((loanContract/amount/amount,drawdownPayment/shareLoanContractAmount/amount))]
loanContract/amount/amount ge drawdownPayment/shareLoanContractAmount/amount
Test cases: [Invalid]
ln-18 (Mandatory)
Context: DrawdownNotice (complex type)
Formal Description:
[exists(loanContractSummary)] [same-currency((loanContractSummary/originalAmount/amount,drawdownPayment/shareLoanContractAmount/amount))]
loanContractSummary/originalAmount/amount ge drawdownPayment/shareLoanContractAmount/amount
Test cases:
ln-19 (Mandatory)
Context: DrawdownNotice (complex type)
English Description:
loanContract/currentInterestRatePeriod/interestRate and loanContract/currentInterestRatePeriod/margin and loanContract/currentInterestRatePeriod/allInRate and loanContract/currentInterestRatePeriod/interestDayBasis and loanContract/currentInterestRatePeriod/indexTenor must exist.
Formal Description:
[drawdownEventType eq "RateSetEvent"] [exists(loanContract)]
exists(loanContract/currentInterestRatePeriod/interestRate) and exists(loanContract/currentInterestRatePeriod/margin) and exists(loanContract/currentInterestRatePeriod/allInRate) and exists(loanContract/currentInterestRatePeriod/interestDayBasis) and exists(loanContract/currentInterestRatePeriod/indexTenor)
Test cases: [Invalid]
ln-20 (Mandatory)
Context: InterestPaymentNotice (complex type)
Formal Description:
[same-currency((interestPayment/amount/shareAmount/amount,//interestAccrualSchedule/interestAccrualPeriod/shareInterestAccrualAmount/amount))]
interestPayment/amount/shareAmount/amount eq sum(interestAccrualSchedule/interestAccrualPeriod/shareInterestAccrualAmount/amount)
Test cases: [Invalid]
ln-21 (Mandatory)
Context: InterestPaymentNotice (complex type)
English Description:
interestAccrualSchedule/interestRatePeriod/interestRate and interestAccrualSchedule/interestRatePeriod/margin and interestAccrualSchedule/interestRatePeriod/allInRate and interestAccrualSchedule/interestRatePeriod/interestDayBasis and interestAccrualSchedule/interestRatePeriod/indexTenor must exist.
Formal Description:
exists(interestAccrualSchedule/interestRatePeriod/interestRate) and exists(interestAccrualSchedule/interestRatePeriod/margin) and exists(interestAccrualSchedule/interestRatePeriod/allInRate) and exists(interestAccrualSchedule/interestRatePeriod/interestDayBasis) and exists(interestAccrualSchedule/interestRatePeriod/indexTenor)
Test cases: [Invalid]
ln-22 (Mandatory)
Context: LoanContractRepayment (complex type)
Formal Description:
[exists(loanContractSummary/originalAmount)] [same-currency((loanContractSummary/originalAmount/amount,amount/globalAmount/amount))]
loanContractSummary/originalAmount/amount ge amount/globalAmount/amount
Test cases: [Invalid]
ln-23 (Mandatory)
Context: Repayment (complex type)
Formal Description:
[same-currency((facilityRepayment/amount/globalAmount/amount,//loanContractRepayment/loanContractSummary/originalAmount/amount))]
facilityRepayment/amount/globalAmount/amount ge sum(loanContractRepayment/loanContractSummary/originalAmount/amount)
Test cases: [Invalid]
ln-24 (Mandatory)
Context: RepaymentNotice (complex type)
Formal Description:
[exists(facilityCommitmentPosition)] [same-currency((facilityCommitmentPosition/priorAmount/shareAmount/amount,repayment/facilityRepayment/amount/shareAmount/amount))]
facilityCommitmentPosition/priorAmount/shareAmount/amount ge repayment/facilityRepayment/amount/shareAmount/amount
Test cases: [Invalid]
ln-25 (Mandatory)
Context: Repayment (complex type)
Formal Description:
[same-currency((facilityRepayment/amount/shareAmount/amount,//loanContractRepayment/amount/shareAmount/amount))]
facilityRepayment/amount/shareAmount/amount ge sum(loanContractRepayment/amount/shareAmount/amount)
Test cases: [Invalid]
ln-26 (Mandatory)
Context: Repayment (complex type)
Formal Description:
[exists(loanContractRepayment/amount/globalAmount)] [same-currency((facilityRepayment/amount/globalAmount/amount,//loanContractRepayment/amount/globalAmount/amount))]
facilityRepayment/amount/globalAmount/amount ge sum(loanContractRepayment/amount/globalAmount/amount)
Test cases:
ln-27 (Mandatory)
Context: OneOffFeeNotice (complex type)
English Description:
loanContractSummary must exist.
Formal Description:
[feePayment/feeType eq "BreakageFee"]
exists(loanContractSummary)
Test cases: [Invalid]
ln-28 (Mandatory)
Context: OneOffFeeNotice (complex type)
English Description:
loanContractSummary must not exist.
Formal Description:
[feePayment/feeType eq "AssignmentFee"]
not(exists((loanContractSummary))
Test cases: [Invalid]
ln-29 (Mandatory)
Context: OneOffFeePayment (complex type)
Formal Description:
paymentDate ge effectiveDate
Test cases:
ln-30 (Mandatory)
Context: FacilityNotice (complex type)
Formal Description:
[exists(facilityCommitmentPosition/loanContractPosition/currentAmount/globalAmount)] [exists(facilityCommitmentPosition/currentAmount/globalAmount)] [same-currency((facilityCommitmentPosition/currentAmount/globalAmount/amount,//facilityCommitmentPosition/loanContractPosition/currentAmount/globalAmount))]
facilityCommitmentPosition/currentAmount/globalAmount/amount ge sum(facilityCommitmentPosition/loanContractPosition/currentAmount/globalAmount/amount)
Test cases:
ln-31 (Mandatory)
Context: FacilityNotice (complex type)
Formal Description:
[exists(facilityCommitmentPosition/loanContractPosition/priorAmount/globalAmount)] [exists(facilityCommitmentPosition/priorAmount/globalAmount)] [same-currency((facilityCommitmentPosition/priorAmount/globalAmount/amount,//facilityCommitmentPosition/loanContractPosition/priorAmount/globalAmount/amount))]
facilityCommitmentPosition/priorAmount/globalAmount/amount ge sum(facilityCommitmentPosition/loanContractPosition/priorAmount/globalAmount/amount)
Test cases:

Deprecated rules

Removed rules