lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [lmi] master 3c341a6 10/25: Remove more dead code


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 3c341a6 10/25: Remove more dead code
Date: Wed, 24 Feb 2021 19:00:52 -0500 (EST)

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

    Remove more dead code
    
    7702 rates are sui generis: they don't follow the {guar, curr, mdpt}
    paradigm, but obey rules of their own, so they don't really belong in
    class InterestRates.
    
    In commit 9b46a92129ad of 20210214T1413Z it was already decided that
    "loans are always needed".
---
 interest_rates.cpp | 35 -----------------------------------
 interest_rates.hpp |  2 --
 2 files changed, 37 deletions(-)

diff --git a/interest_rates.cpp b/interest_rates.cpp
index c5867e6..d063bdf 100644
--- a/interest_rates.cpp
+++ b/interest_rates.cpp
@@ -42,8 +42,6 @@
 //
 // Permit variable loan rate.
 //
-// Calculate all 7702 and 7702A interest rates here.
-//
 // The InterestRates(BasicValues) ctor requires many headers; improve
 // physical design by replacing it with a ctor that takes all required
 // data as arguments. That redesign is more conducive to unit tests,
@@ -246,32 +244,6 @@ void convert_interest_rates
         monthly_gross_rate[j] = cached_monthly_gross_rate;
         }
 }
-
-#if 0
-/// Determine whether loan rates are needed; else they can be zero.
-///
-/// Loan rates can potentially affect GPT calculations.
-///
-/// SOMEDAY !! Is this function worthwhile, or should it be expunged?
-/// An error in its implementation could have severe consequences, and
-/// the benefit seems slight. At present, it's never called anyway,
-/// because BasicValues::Init7702() is called unconditionally--so the
-/// test for 'DefinitionOfLifeInsurance' is incorrect.
-
-bool need_loan_rates(yare_input const& yi)
-{
-    return
-            mce_gpt                == yi.DefinitionOfLifeInsurance
-        ||  mce_solve_loan         == yi.SolveType
-        ||  true                   == yi.WithdrawToBasisThenLoan
-        ||  0.0                    != yi.InforceRegularLoanValue
-        ||  0.0                    != yi.InforcePreferredLoanValue
-        ||  0.0                    != yi.InforceRegularLoanBalance
-        ||  0.0                    != yi.InforcePreferredLoanBalance
-        ||  !each_equal(yi.NewLoan, 0.0)
-        ;
-}
-#endif // 0
 } // Unnamed namespace.
 
 #if 0
@@ -281,14 +253,12 @@ instead of passing BasicValues, pass these requirements 
only:
     v.InvestmentManagementFee()
     v.GetLength()
     v.round_interest_rate()
-    v.round_interest_rate_7702()
     v.IsSubjectToIllustrationReg()
 #endif // 0
 
 InterestRates::InterestRates(BasicValues const& v)
     :Length_             {v.GetLength()}
     ,RoundIntRate_       {v.round_interest_rate()}
-    ,Round7702Rate_      {v.round_interest_rate_7702()}
     ,Zero_               (Length_)
     ,NeedMidpointRates_  {v.IsSubjectToIllustrationReg()}
     ,GenAcctRateType_    {v.yare_input_.GeneralAccountRateType}
@@ -394,7 +364,6 @@ void InterestRates::Initialize(BasicValues const& v)
     InitializeSeparateAccountRates();
     InitializeLoanRates();
     InitializeHoneymoonRates();
-    Initialize7702Rates();
 
     // Paranoid check.
     for(int i = mce_annual_rate; i < mc_n_rate_periods; ++i)
@@ -795,7 +764,3 @@ void InterestRates::DynamicMlySepAcctRate
             }
         }
 }
-
-void InterestRates::Initialize7702Rates()
-{
-}
diff --git a/interest_rates.hpp b/interest_rates.hpp
index 34fe220..5213a18 100644
--- a/interest_rates.hpp
+++ b/interest_rates.hpp
@@ -213,11 +213,9 @@ class InterestRates
     void InitializeSeparateAccountRates();
     void InitializeLoanRates();
     void InitializeHoneymoonRates();
-    void Initialize7702Rates();
 
     int                Length_;
     round_to<double>   RoundIntRate_;
-    round_to<double>   Round7702Rate_;
 
     std::vector<double> Zero_;
 



reply via email to

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