Family of Scotiabank Mortgages modeled in Clafer

General concepts

abstract Currency : integer
abstract Percentage : integer
[ this >= 0 && this <= 100 ]

Most general concept: Mortgage

abstract Mortgage
valueProposition : string
term -> MortgageTerm
xor kind
open
closed
principalMortgageAmount -> Currency
balance -> Currency
propertyValue -> Currency
loanToValue -> Percentage
amortization : integer
// [ loanToValue == balance / propertyValue ]
[ 1 <= amortization && amortization <= 30 ]
xor interestRate
fixedForTheFullTerm
resetTogetherWithPaymentAmountEachTimeScotiabankPrimeRateChanges
currentInterestRate -> Percentage
currentPayment -> Currency// [ 0.5 <= currentInterestRate && currentInterestRate <= 25 ]
xor paymentFrequency
weekly
biweekly
semiMonthly
monthly
xor financingAvailable
conventional
insured
enum MortgageTerm = sixMonths | oneYear