lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [lmi] master 9878b92 02/10: Refactor


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 9878b92 02/10: Refactor
Date: Fri, 4 Sep 2020 21:16:09 -0400 (EDT)

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

    Refactor
---
 account_value.hpp |  1 +
 ihs_acctval.cpp   | 71 +++++++++++++++++++++++++++++--------------------------
 2 files changed, 39 insertions(+), 33 deletions(-)

diff --git a/account_value.hpp b/account_value.hpp
index 6c1f1c3..3ec5a12 100644
--- a/account_value.hpp
+++ b/account_value.hpp
@@ -288,6 +288,7 @@ class LMI_SO AccountValue final
 
     void   set_list_bill_year_and_month();
     void   set_list_bill_premium();
+    void   set_modal_min_premium();
 
     void   SetMaxLoan              ();
     void   SetMaxWD                ();
diff --git a/ihs_acctval.cpp b/ihs_acctval.cpp
index c8bf08f..d2a6499 100644
--- a/ihs_acctval.cpp
+++ b/ihs_acctval.cpp
@@ -872,39 +872,7 @@ void AccountValue::InitializeSpecAmt()
     ActualSpecAmt       = InvariantValues().SpecAmt[Year];
     TermSpecAmt         = InvariantValues().TermSpecAmt[Year];
 
-    // These "modal minimum" premiums are designed for group plans.
-    // They are intended roughly to approximate the minimum payment
-    // (at a modal frequency chosen by the employer) necessary to
-    // prevent lapse if no other premium is paid.
-    //
-    // Some products apportion them explicitly between ee and er. For
-    // those that don't, convention deems the er to pay it all.
-    //
-    // Most other yearly values are posted to InvariantValues() in
-    // FinalizeYear(), but it seems clearer to post these here where
-    // they're calculated along with 'MlyNoLapsePrem'.
-    if(!SplitMinPrem)
-        {
-        auto const z = GetModalMinPrem
-            (Year
-            ,Outlay_->er_premium_modes()[Year]
-            ,InvariantValues().SpecAmt[Year]
-            );
-        InvariantValues().ModalMinimumPremium[Year]   = z;
-        InvariantValues().ErModalMinimumPremium[Year] = z;
-        }
-    else
-        {
-        auto const z = GetModalPremMlyDedEx
-            (Year
-            ,Outlay_->er_premium_modes()[Year]
-            ,InvariantValues().SpecAmt[Year]
-            ,InvariantValues().TermSpecAmt[Year]
-            );
-        InvariantValues().EeModalMinimumPremium[Year] = z.first;
-        InvariantValues().ErModalMinimumPremium[Year] = z.second;
-        InvariantValues().ModalMinimumPremium[Year] = z.first + z.second;
-        }
+    set_modal_min_premium();
 
     // No-lapse premium generally changes whenever specamt changes for
     // any reason (e.g., elective increases or decreases, DBO changes,
@@ -995,6 +963,43 @@ void AccountValue::set_list_bill_premium()
         }
 }
 
+void AccountValue::set_modal_min_premium()
+{
+    // These "modal minimum" premiums are designed for group plans.
+    // They are intended roughly to approximate the minimum payment
+    // (at a modal frequency chosen by the employer) necessary to
+    // prevent lapse if no other premium is paid.
+    //
+    // Some products apportion them explicitly between ee and er. For
+    // those that don't, convention deems the er to pay it all.
+    //
+    // Most other yearly values are posted to InvariantValues() in
+    // FinalizeYear(), but it seems clearer to post these here where
+    // they're calculated along with 'MlyNoLapsePrem'.
+    if(!SplitMinPrem)
+        {
+        auto const z = GetModalMinPrem
+            (Year
+            ,Outlay_->er_premium_modes()[Year]
+            ,InvariantValues().SpecAmt[Year]
+            );
+        InvariantValues().ModalMinimumPremium[Year]   = z;
+        InvariantValues().ErModalMinimumPremium[Year] = z;
+        }
+    else
+        {
+        auto const z = GetModalPremMlyDedEx
+            (Year
+            ,Outlay_->er_premium_modes()[Year]
+            ,InvariantValues().SpecAmt[Year]
+            ,InvariantValues().TermSpecAmt[Year]
+            );
+        InvariantValues().EeModalMinimumPremium[Year] = z.first;
+        InvariantValues().ErModalMinimumPremium[Year] = z.second;
+        InvariantValues().ModalMinimumPremium[Year] = z.first + z.second;
+        }
+}
+
 /// Surrender charge.
 ///
 /// The "cash value enhancement" components should be implemented as



reply via email to

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