Implemented interest rates

This commit is contained in:
didier amyot committed 2020-09-10 10:33:57 -04:00
1 parent d5c6360f88
commit 1fa115db79
2 files changed
+49 -41

No files matched your search

+7 -7
View File
@@ -244,13 +244,13 @@
interest-rates [[10 d] [15 d+1d] [20 d+2d]]]
(compute-face-value amount interest-rates d+½d d+½d) => amount
(compute-face-value amount interest-rates d-1d d-½d) => amount
(compute-face-value amount interest-rates d-1d d+3d) => 10045101)))
;(split-interest-rates interest-rates d+3d d+½d) => [[10 d d+½d]])))
;; TOD
(compute-face-value amount interest-rates d-1d d+3d) => 10045101))
(fact "we had bugs... we need to fix them"
(let [deposit-date #inst"2020-09-09T18:49:47.205-00:00"
value-date #inst"2020-09-09T18:52:56.760-00:00"
amount 105402100
interest-rates (list [1000 #inst "2020-09-09T18:47:34.152-00:00"])]
(compute-face-value amount interest-rates deposit-date value-date) => 105424060)))
;; 4. transfer sec from one account to the other.