-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathScotiabank Mortgages.page
52 lines (45 loc) · 1.18 KB
/
Scotiabank Mortgages.page
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
---
title: Family of Scotiabank Mortgages modeled in Clafer
toc: true
...
General concepts
```clafer
abstract Currency : integer
abstract Percentage : integer
[ this >= 0 && this <= 100 ]
```
Most general concept: Mortgage
```clafer
abstract Mortgage
valueProposition : string
term -> MortgageTerm
xor kind
open
closed
principalMortgageAmount -> Currency
[ 5000 <= principalMortgageAmount && principalMortgageAmount <= 9999999 ]
balance -> Currency
[ balance <= principalMortgageAmount ]
propertyValue -> Currency
loanToValue -> Percentage
// [ loanToValue == balance / propertyValue ]
amortization : integer
[ 1 <= amortization && amortization <= 30 ]
xor interestRate
fixedForTheFullTerm
resetTogetherWithPaymentAmountEachTimeScotiabankPrimeRateChanges
currentInterestRate -> Percentage
// [ 0.5 <= currentInterestRate && currentInterestRate <= 25 ]
currentPayment -> Currency
xor paymentFrequency
weekly
biweekly
semiMonthly
monthly
xor financingAvailable
conventional
insured
```
```clafer
enum MortgageTerm = sixMonths | oneYear
```