lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [lmi] master 9b46a92 08/15: Assume genacct and loan rates


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 9b46a92 08/15: Assume genacct and loan rates are always needed [312]
Date: Sun, 14 Feb 2021 18:24:53 -0500 (EST)

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

    Assume genacct and loan rates are always needed [312]
    
    US states generally require policy to include a loan provision, so
    loans are always needed. Loaned funds are usually held in the general
    account, so a general account is always needed, even if only for loans.
    
    Other types of interest rates are needed only conditionally, and some
    cost is saved by not calculating them when they're not needed; but these
    two categories are always needed.
---
 interest_rates.cpp | 17 -----------------
 interest_rates.hpp |  2 --
 2 files changed, 19 deletions(-)

diff --git a/interest_rates.cpp b/interest_rates.cpp
index 8bacde1..7f00555 100644
--- a/interest_rates.cpp
+++ b/interest_rates.cpp
@@ -302,8 +302,6 @@ InterestRates::InterestRates(BasicValues const& v)
     
,SepAcctSpreadMethod_{v.database().query<mcenum_spread_method>(DB_SepAcctSpreadMethod)}
     ,AmortLoad_          {Zero_}
     ,ExtraSepAcctCharge_ {Zero_}
-//    ,NeedLoanRates_      {need_loan_rates(v.yare_input_)}
-    ,NeedLoanRates_      {true} // DEPRECATED
     ,LoanRateType_       {v.yare_input_.LoanRateType}
     ,NeedPrefLoanRates_  {v.database().query<bool>(DB_AllowPrefLoan)}
     ,NeedHoneymoonRates_ {v.yare_input_.HoneymoonEndorsement}
@@ -659,21 +657,6 @@ void InterestRates::InitializeSeparateAccountRates()
 
 void InterestRates::InitializeLoanRates()
 {
-    if(!NeedLoanRates_)
-        {
-        for(int i = mce_annual_rate; i < mc_n_rate_periods; ++i)
-            {
-            for(int j = mce_gen_curr; j < mc_n_gen_bases; ++j)
-                {
-                RegLnCredRate_[i][j] = Zero_;
-                RegLnDueRate_ [i][j] = Zero_;
-                PrfLnCredRate_[i][j] = Zero_;
-                PrfLnDueRate_ [i][j] = Zero_;
-                }
-            }
-        return;
-        }
-
     // Historically, lmi has charged a singular published rate on all
     // loans, which necessarily differs for fixed vs. variable loans,
     // but was the same for both regular and preferred. In 2015, it
diff --git a/interest_rates.hpp b/interest_rates.hpp
index 3753da5..bb59094 100644
--- a/interest_rates.hpp
+++ b/interest_rates.hpp
@@ -226,7 +226,6 @@ class InterestRates
     std::vector<double> Zero_;
 
     // General account interest rates.
-//    bool NeedGenAcctRates_; // TODO ?? Would this be useful?
     bool NeedMidpointRates_;
     mcenum_gen_acct_rate_type GenAcctRateType_;
     std::vector<double> GenAcctGrossRate_
@@ -258,7 +257,6 @@ class InterestRates
     std::vector<double> MAndERate_[mc_n_gen_bases];
 
     // Loan interest rates.
-    bool NeedLoanRates_;
     mcenum_loan_rate_type LoanRateType_;
     std::vector<double> PublishedLoanRate_;
     std::vector<double> PrefLoanRateDecr_;



reply via email to

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