lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master 09672e9 2/5: Simplify calculation of DCV mont


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 09672e9 2/5: Simplify calculation of DCV monthly q
Date: Thu, 4 Feb 2021 20:45:15 -0500 (EST)

branch: master
commit 09672e901804b56ee160211419c60a9aae55d25b
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>

    Simplify calculation of DCV monthly q
    
    Tested with the preceding commit 43ca9fe630f0d.
---
 ihs_basicval.cpp | 15 +++------------
 1 file changed, 3 insertions(+), 12 deletions(-)

diff --git a/ihs_basicval.cpp b/ihs_basicval.cpp
index f759ae4..f16adf8 100644
--- a/ihs_basicval.cpp
+++ b/ihs_basicval.cpp
@@ -380,18 +380,9 @@ void BasicValues::Init7702()
     max_coi_rate = 1.0 / max_coi_rate;
     assign(Mly7702qc, apply_binary(coi_rate_from_q<double>(), Mly7702qc, 
max_coi_rate));
 
-    MlyDcvqc = Mly7702qc;
-    // CURRENCY !! Isn't there a vector overload for this?
-    std::transform
-        (MlyDcvqc.begin()
-        ,MlyDcvqc.end()
-        ,MlyDcvqc.begin()
-        ,round_coi_rate()
-        );
-    // Temporary test scaffolding:
-    std::vector<double> MlyDcvqc2;
-    MlyDcvqc2 = round_coi_rate()(Mly7702qc);
-    LMI_ASSERT(std::operator==(MlyDcvqc2, MlyDcvqc));
+    // DCV follows the usual monthiversary mechanics, which involve
+    // (optionally) rounding monthly COI rates.
+    MlyDcvqc = round_coi_rate()(Mly7702qc);
 
     // Monthly guar net int for 7702, with 4 or 6% min, is
     //   greater of {4%, 6%} and annual guar int rate



reply via email to

[Prev in Thread] Current Thread [Next in Thread]