lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [lmi] master ad762d4 18/25: Remove dead code


From: Greg Chicares
Subject: [lmi-commits] [lmi] master ad762d4 18/25: Remove dead code
Date: Wed, 24 Feb 2021 19:00:54 -0500 (EST)

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

    Remove dead code
---
 ihs_basicval.cpp | 80 --------------------------------------------------------
 1 file changed, 80 deletions(-)

diff --git a/ihs_basicval.cpp b/ihs_basicval.cpp
index 7483713..3bbf2a8 100644
--- a/ihs_basicval.cpp
+++ b/ihs_basicval.cpp
@@ -435,86 +435,6 @@ void BasicValues::Init7702()
         || mce_variable_loan_rate != yare_input_.LoanRateType
         );
 
-#if 1 // 7702 !! moved to class i7702
-    std::vector<double> const SpreadFor7702_
-        (Length
-        ,StratifiedCharges_->minimum_tiered_spread_for_7702()
-        );
-#endif // 1 // 7702 !! moved to class i7702
-
-#if 1 // 7702 !! moved to class i7702
-    // Monthly guar net int for 7702 is
-    //   greater of {iglp(), igsp()} and annual guar int rate
-    //   less 7702 spread
-    //   transformed to monthly (simple subtraction?).
-    // These interest rates belong here because they're used by
-    // DCV calculations in the account value class as well as
-    // GPT calculations in the 7702 class.
-
-    std::vector<double> statutory7702i;
-    database().query_into(DB_AnnInterestRate7702, statutory7702i);
-
-    std::vector<double> guar_int;
-    database().query_into(DB_GuarInt, guar_int);
-
-    // For 7702 purposes, the rate guaranteed by the contract is the
-    // highest rate on any potential path, at each duration; thus,
-    // it is no less than the guaranteed fixed loan rate, i.e.:
-    //   (fixed rate charged on loans) - (guaranteed loan spread)
-    if(!database().query<bool>(DB_IgnoreLoanRateFor7702))
-        {
-        std::vector<double> allow_fixed_loan;
-        database().query_into(DB_AllowFixedLoan, allow_fixed_loan);
-        if(!each_equal(allow_fixed_loan, false))
-            {
-            std::vector<double> gross_loan_rate;
-            database().query_into(DB_FixedLoanRate    , gross_loan_rate);
-            std::vector<double> guar_loan_spread;
-            database().query_into(DB_GuarRegLoanSpread, guar_loan_spread);
-            assign
-                (guar_int
-                ,apply_binary
-                    (greater_of<double>()
-                    ,guar_int
-                    ,gross_loan_rate - guar_loan_spread
-                    )
-                );
-            }
-        }
-
-    // If lmi someday implements VLR, then the current VLR rate on
-    // the issue date constitutes a short-term guarantee that must be
-    // reflected in the 7702 interest rates (excluding the GLP rate).
-
-    std::vector<double> Mly7702iGlp;
-    std::vector<double> Mly7702iGsp;
-    std::vector<double> Mly7702ig;
-
-    Mly7702iGlp.assign(Length, 0.0);
-    assign
-        (Mly7702iGlp
-        ,apply_unary
-            (i_upper_12_over_12_from_i<double>()
-            ,apply_binary(greater_of<double>(), statutory7702i, guar_int) - 
SpreadFor7702_
-            )
-        );
-
-    Mly7702iGsp.assign(Length, 0.0);
-    assign
-        (Mly7702iGsp
-        ,apply_unary
-            (i_upper_12_over_12_from_i<double>()
-            ,apply_binary(greater_of<double>(), 0.02 + statutory7702i, 
guar_int) - SpreadFor7702_
-            )
-        );
-
-    database().query_into(DB_NaarDiscount, Mly7702ig);
-#endif // 1 // 7702 !! moved to class i7702
-    LMI_ASSERT(i7702_->gross  () == Mly7702ig);
-    LMI_ASSERT(i7702_->net_glp() == Mly7702iGlp);
-    LMI_ASSERT(i7702_->net_gsp() == Mly7702iGsp);
-    LMI_ASSERT(i7702_->spread () == SpreadFor7702_);
-
     // TODO ?? We should avoid reading the rate file again; but
     // the GPT server doesn't initialize a MortalityRates object
     // that would hold those rates. TAXATION !! Rework this.



reply via email to

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