FpML 4.6 Validation Rules - Rules for Loan Messages
This is the Loan part of the validation rule set accompanying the FpML 4.6 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/2009/FpML-4-6
namespace xs = http://www.w3.org/2001/XMLSchema
Functions
The following shared functions are used in the rules.
Rules
Unique contexts:
ln-1 (Mandatory)
English Description:
Context: LoanContract (complex type)
currentInterestRatePeriod/startDate is greater than or equal to effectiveDate
XPath Description:
Context: LoanContract (complex type)
currentInterestRatePeriod/startDate ge effectiveDate
ln-2 (Mandatory)
English Description:
Context: DrawdownNotice (complex type)
If loanContract exists, and if loanContract/currentInterestRatePeriod/floatingRateIndex contains the string "PRIME" then loanContract/currentInterestRatePeriod/rateFixingDate is equal to loanContract/effectiveDate.
XPath Description:
Context: DrawdownNotice (complex type)
[exists(loanContract)] [loanContract/currentInterestRatePeriod/floatingRateIndex eq "PRIME"]
loanContract/currentInterestRatePeriod/rateFixingDate eq loanContract/effectiveDate
ln-3 (Mandatory)
English Description:
Context: InterestRatePeriod (complex type)
endDate is greater than or equal to startDate is greater than or equal to rateFixingDate.
XPath Description:
Context: InterestRatePeriod (complex type)
endDate ge startDate ge rateFixingDate
ln-4 (Mandatory)
English Description:
Context: InterestRatePeriod (complex type)
If mandatoryCostRate doesn't exist, and if interestRate, and if margin and allInRate exist, then allInRate is equal to margin plus interestRate.
XPath Description:
Context: InterestRatePeriod (complex type)
[not(exists(mandatoryCostRate))] [exists(interestRate)] [exists(margin)] [exists(allInRate)]
allInRate eq margin + interestRate
ln-5 (Mandatory)
English Description:
Context: InterestRatePeriod (complex type)
If mandatoryCostRate and interestRate and margin and allInRate exist, then allInRate is equal to margin plus interestRate plus mandatoryCostRate.
XPath Description:
Context: InterestRatePeriod (complex type)
[exists(mandatoryCostRate)] [exists(interestRate)] [exists(margin)] [exists(allInRate)]
allInRate eq margin + interestRate + mandatoryCostRate
ln-6 (Mandatory)
English Description:
Context: InterestAccrualSchedule (complex type)
interestRatePeriod/startDate must be equal to lenderLoanContractPeriod/startDate must be equal to interestAccrualPeriod/startDate, in each period.
XPath Description:
Context: InterestAccrualSchedule (complex type)
interestRatePeriod/startDate eq lenderLoanContractPeriod/startDate eq interestAccrualPeriod/startDate, in each period
ln-7 (Mandatory)
English Description:
Context: InterestAccrualSchedule (complex type)
If more than one interestRatePeriod exists, then the entire chronological series must form a contiguous block of interestRatePeriod.
XPath Description:
Context: InterestAccrualSchedule (complex type)
[count(interestRatePeriod) gt 1]
Every $startDate in $interestAccrualSchedule/interestRatePeriod[startDate gt min($interestAccrualSchedule/interestRatePeriod/startDate)]/startDate satisfies $startDate - "P1D" eq $interestAccrualSchedule/interestRatePeriod/endDate
ln-8 (Mandatory)
English Description:
Context: InterestAccrualSchedule (complex type)
If more than one lenderLoanContractPeriod exists, then the entire chronological series must form a contiguous block of lenderLoanContractPeriod.
XPath Description:
Context: InterestAccrualSchedule (complex type)
[count(lenderLoanContractPeriod) gt 1]
Every $startDate in $interestAccrualSchedule/lenderLoanContractPeriod[startDate gt min($interestAccrualSchedule/lenderLoanContractPeriod/startDate)]/startDate satisfies $startDate - "P1D" eq $interestAccrualSchedule/lenderLoanContractPeriod/endDate
ln-9 (Mandatory)
English Description:
Context: InterestAccrualSchedule (complex type)
If more than one interestAccrualPeriod exists, then the entire chronological series must form a contiguous block of interestAccrualPeriod.
XPath Description:
Context: InterestAccrualSchedule (complex type)
[count(interestAccrualPeriod) gt 1]
Every $startDate in $interestAccrualSchedule/interestAccrualPeriod[startDate gt min($interestAccrualSchedule/interestAccrualPeriod/startDate)]/startDate satisfies $startDate - "P1D" eq $interestAccrualSchedule/interestAccrualPeriod/endDate
ln-10 (Mandatory)
English Description:
Context: FacilityNotice (complex type)
If
facilitySummary/originalCommitmentAmount and
facilityCommitmentPosition/loanContractPosition/loanContractSummary/originalAmount exist, and if
facilitySummary/originalCommitmentAmount and
facilityCommitmentPosition/loanContractPosition/loanContractSummary/originalAmount have the
same-currency, then
facilitySummary/originalCommitmentAmount is greater than or equal to
facilityCommitmentPosition/loanContractPosition/loanContractSummary/originalAmount.
XPath Description:
Context: FacilityNotice (complex type)
[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
ln-11 (Mandatory)
English Description:
Context: FacilityNotice (complex type)
If
facilityCommitmentPosition/loanContractPosition exists, and if
facilityCommitmentPosition/currentAmount/shareAmount/amount and all
facilityCommitmentPosition/loanContractPosition/currentAmount/shareAmount/amount have the
same-currency, then
facilityCommitmentPosition/currentAmount/shareAmount/amount is greater than or equal to the sum of all
facilityCommitmentPosition/loanContractPosition/currentAmount/shareAmount/amount.
XPath Description:
Context: FacilityNotice (complex type)
[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)
ln-11b (Mandatory)
English Description:
Context: LoanContractNotice (complex type)
If
facilityCommitmentPosition/loanContractPosition exists, and if
facilityCommitmentPosition/currentAmount/shareAmount/amount and all
facilityCommitmentPosition/loanContractPosition/currentAmount/shareAmount/amount have the
same-currency, then
facilityCommitmentPosition/currentAmount/shareAmount/amount is greater than or equal to the sum of all
facilityCommitmentPosition/loanContractPosition/currentAmount/shareAmount/amount.
XPath Description:
Context: LoanContractNotice (complex type)
[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)
ln-12 (Mandatory)
English Description:
Context: FacilityNotice (complex type)
If
facilityCommitmentPosition/loanContractPosition exists, and if
facilityCommitmentPosition/priorAmount/shareAmount/amount and all
facilityCommitmentPosition/loanContractPosition/priorAmount/shareAmount/amount have the
same-currency, then
facilityCommitmentPosition/priorAmount/shareAmount/amount must be greater than or equal to the sum of all
facilityCommitmentPosition/loanContractPosition/priorAmount/shareAmount/amount.
XPath Description:
Context: FacilityNotice (complex type)
[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)
ln-13 (Mandatory)
English Description:
Context: LoanContractNotice (complex type)
If
facilityCommitmentPosition/loanContractPosition exists, and if
facilityCommitmentPosition/priorAmount/shareAmount/amount and all
facilityCommitmentPosition/loanContractPosition/priorAmount/shareAmount/amount have the
same-currency, then
facilityCommitmentPosition/priorAmount/shareAmount/amount must be greater than or equal to the sum of all
facilityCommitmentPosition/loanContractPosition/priorAmount/shareAmount/amount.
XPath Description:
Context: LoanContractNotice (complex type)
[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)
ln-14 (Mandatory)
English Description:
Context: DrawdownNotice (complex type)
If loanContract exists, then drawdownPayment/paymentDate is greater than or equal to loanContract/effectiveDate
XPath Description:
Context: DrawdownNotice (complex type)
[exists(loanContract)]
drawdownPayment/paymentDate ge loanContract/effectiveDate
ln-15 (Mandatory)
English Description:
Context: DrawdownNotice (complex type)
If dealSummary/creditAgreementDate exists, then loanContract/effectiveDate is greater than or equal to dealSummary/creditAgreementDate and drawdownPayment/paymentDate is greater than or equal to dealSummary/creditAgreementDate.
XPath Description:
Context: DrawdownNotice (complex type)
[exists(dealSummary/creditAgreementDate)]
(loanContract/effectiveDate ge dealSummary/creditAgreementDate) and (drawdownPayment/paymentDate ge dealSummary/creditAgreementDate)
ln-16 (Mandatory)
English Description:
Context: DrawdownNotice (complex type)
If
facilityCommitmentPosition/priorAmount/shareAmount exists, and if
facilityCommitmentPosition/priorAmount/shareAmount/amount and
drawdownPayment/shareLoanContractAmount/amount have the
same-currency, then
drawdownPayment/shareLoanContractAmount/amount is less than or equal to
facilityCommitmentPosition/priorAmount/shareAmount/amount
XPath Description:
Context: DrawdownNotice (complex type)
[exists(
facilityCommitmentPosition/priorAmount/shareAmount)] [
same-currency((
facilityCommitmentPosition/priorAmount/shareAmount/amount,
drawdownPayment/shareLoanContractAmount/amount))]
drawdownPayment/shareLoanContractAmount/amount le facilityCommitmentPosition/priorAmount/shareAmount/amount
ln-17 (Mandatory)
English Description:
Context: DrawdownNotice (complex type)
If
loanContract exists, and if
loanContract/amount/amount and
drawdownPayment/shareLoanContractAmount/amount have the
same-currency, then
loanContract/amount/amount is greater than or equal to
drawdownPayment/shareLoanContractAmount/amount
XPath Description:
Context: DrawdownNotice (complex type)
[exists(
loanContract)] [
same-currency((
loanContract/amount/amount,
drawdownPayment/shareLoanContractAmount/amount))]
loanContract/amount/amount ge drawdownPayment/shareLoanContractAmount/amount
ln-18 (Mandatory)
English Description:
Context: DrawdownNotice (complex type)
If
loanContractSummary exists, and if
loanContractSummary/originalAmount/amount and
drawdownPayment/shareLoanContractAmount/amount have the
same-currency, then
loanContractSummary/originalAmount/amount is greater than or equal to
drawdownPayment/shareLoanContractAmount/amount.
XPath Description:
Context: DrawdownNotice (complex type)
[exists(
loanContractSummary)] [
same-currency((
loanContractSummary/originalAmount/amount,
drawdownPayment/shareLoanContractAmount/amount))]
loanContractSummary/originalAmount/amount ge drawdownPayment/shareLoanContractAmount/amount
ln-19 (Mandatory)
English Description:
Context: DrawdownNotice (complex type)
If drawdownEventType is equal to "RateSetEvent", and if loanContract exists, then loanContract/currentInterestRatePeriod/interestRate and loanContract/currentInterestRatePeriod/margin and loanContract/currentInterestRatePeriod/allInRate and loanContract/currentInterestRatePeriod/interestDayBasis and loanContract/currentInterestRatePeriod/indexTenor must exist.
XPath Description:
Context: DrawdownNotice (complex type)
[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)
ln-20 (Mandatory)
English Description:
Context: InterestPaymentNotice (complex type)
If
interestPayment/amount/shareAmount/amount and all
interestAccrualSchedule/interestAccrualPeriod/shareInterestAccrualAmount/amount have the
same-currency , then
interestPayment/amount/shareAmount/amount must be equal to the sum of all
interestAccrualSchedule/interestAccrualPeriod/shareInterestAccrualAmount/amount.
XPath Description:
Context: InterestPaymentNotice (complex type)
[
same-currency((
interestPayment/amount/shareAmount/amount,//
interestAccrualSchedule/interestAccrualPeriod/shareInterestAccrualAmount/amount))]
interestPayment/amount/shareAmount/amount eq sum(interestAccrualSchedule/interestAccrualPeriod/shareInterestAccrualAmount/amount)
ln-21 (Mandatory)
English Description:
Context: InterestPaymentNotice (complex type)
interestAccrualSchedule/interestRatePeriod/interestRate and interestAccrualSchedule/interestRatePeriod/margin and interestAccrualSchedule/interestRatePeriod/allInRate and interestAccrualSchedule/interestRatePeriod/interestDayBasis and interestAccrualSchedule/interestRatePeriod/indexTenor must exist.
XPath Description:
Context: InterestPaymentNotice (complex type)
exists(interestAccrualSchedule/interestRatePeriod/interestRate) and exists(interestAccrualSchedule/interestRatePeriod/margin) and exists(interestAccrualSchedule/interestRatePeriod/allInRate) and exists(interestAccrualSchedule/interestRatePeriod/interestDayBasis) and exists(interestAccrualSchedule/interestRatePeriod/indexTenor)
ln-22 (Mandatory)
English Description:
Context: LoanContractRepayment (complex type)
If
loanContractSummary/originalAmount exists, and if
loanContractSummary/originalAmount/amount and
amount/globalAmount/amount have the
same-currency, then
loanContractSummary/originalAmount/amount is greater than or equal to
amount/globalAmount/amount.
XPath Description:
Context: LoanContractRepayment (complex type)
[exists(
loanContractSummary/originalAmount)] [
same-currency((
loanContractSummary/originalAmount/amount,
amount/globalAmount/amount))]
loanContractSummary/originalAmount/amount ge amount/globalAmount/amount
ln-24 (Mandatory)
English Description:
Context: RepaymentNotice (complex type)
If
facilityCommitmentPosition exists and if
facilityCommitmentPosition/priorAmount/shareAmount/amount and
repayment/facilityRepayment/amount/shareAmount/amount have the
same-currency, then
facilityCommitmentPosition/priorAmount/shareAmount/amountis greater than or equal to
repayment/facilityRepayment/amount/shareAmount/amount.
XPath Description:
Context: RepaymentNotice (complex type)
[exists(
facilityCommitmentPosition)] [
same-currency((
facilityCommitmentPosition/priorAmount/shareAmount/amount,
repayment/facilityRepayment/amount/shareAmount/amount))]
facilityCommitmentPosition/priorAmount/shareAmount/amount ge repayment/facilityRepayment/amount/shareAmount/amount
ln-25 (Mandatory)
English Description:
Context: Repayment (complex type)
If
facilityRepayment/amount/shareAmount/amount and all
loanContractRepayment/amount/shareAmount/amount have the
same-currency, then
facilityRepayment/amount/shareAmount/amount must be greater than or equal to the sum of all
loanContractRepayment/amount/shareAmount/amount.
XPath Description:
Context: Repayment (complex type)
[
same-currency((
facilityRepayment/amount/shareAmount/amount,//
loanContractRepayment/amount/shareAmount/amount))]
facilityRepayment/amount/shareAmount/amount ge sum(loanContractRepayment/amount/shareAmount/amount)
ln-26 (Mandatory)
English Description:
Context: Repayment (complex type)
If
loanContractRepayment/amount/globalAmount exists, and if
facilityRepayment/amount/globalAmount/amount and all
loanContractRepayment/amount/globalAmount/amount have the
same-currency, then
facilityRepayment/amount/globalAmount/amount must be greater than or equal to the sum of all
loanContractRepayment/amount/globalAmount/amount.
XPath Description:
Context: Repayment (complex type)
[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)
English Description:
Context: OneOffFeeNotice (complex type)
If feePayment/feeType is equal to "BreakageFee", then loanContractSummary must exist.
XPath Description:
Context: OneOffFeeNotice (complex type)
[feePayment/feeType eq "BreakageFee"]
exists(loanContractSummary)
ln-28 (Mandatory)
English Description:
Context: OneOffFeeNotice (complex type)
If feePayment/feeType is equal to "AssignmentFee", then loanContractSummary must not exist.
XPath Description:
Context: OneOffFeeNotice (complex type)
[feePayment/feeType eq "AssignmentFee"]
not(exists((loanContractSummary))
ln-29 (Mandatory)
English Description:
Context: OneOffFeePayment (complex type)
paymentDate is greater than or equal to effectiveDate
XPath Description:
Context: OneOffFeePayment (complex type)
paymentDate ge effectiveDate
Test cases:
ln-30 (Mandatory)
English Description:
Context: FacilityNotice (complex type)
If
facilityCommitmentPosition/loanContractPosition/currentAmount/globalAmount and
facilityCommitmentPosition/currentAmount/globalAmount exist, and if
facilityCommitmentPosition/currentAmount/globalAmount/amount and all
facilityCommitmentPosition/loanContractPosition/currentAmount/globalAmount have the
same-currency, then
facilityCommitmentPosition/currentAmount/globalAmount/amount is greater than or equal to the sum of all
facilityCommitmentPosition/loanContractPosition/currentAmount/globalAmount/amount.
XPath Description:
Context: FacilityNotice (complex type)
[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)
English Description:
Context: FacilityNotice (complex type)
If
facilityCommitmentPosition/loanContractPosition/priorAmount/globalAmount and
facilityCommitmentPosition/priorAmount/globalAmount exist, and if
facilityCommitmentPosition/priorAmount/globalAmount/amount and all
facilityCommitmentPosition/loanContractPosition/priorAmount/globalAmount/amount have the
same-currency, then
facilityCommitmentPosition/priorAmount/globalAmount/amountis greater than or equal to the sum of all
facilityCommitmentPosition/loanContractPosition/priorAmount/globalAmount/amount.
XPath Description:
Context: FacilityNotice (complex type)
[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
ln-23 (Mandatory)
REMOVED:
Context: Repayment: If
facilityRepayment/amount/globalAmount/amount and all
loanContractRepayment/loanContractSummary/originalAmount/amount have the
same-currency, then
facilityRepayment/amount/globalAmount/amount must be greater than or equal to the sum of all
loanContractRepayment/loanContractSummary/originalAmount/amount.
Rationale for removal: Rule ln-23 is incorrectly defined since there is no credible relationship between the original amount
of a loan contract and the repayment occurring at a point in time in the future after that..