lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [lmi] master f804151 1/2: Rearrange member functions in a


From: Greg Chicares
Subject: [lmi-commits] [lmi] master f804151 1/2: Rearrange member functions in a more logical order
Date: Sat, 10 Jun 2017 11:23:28 -0400 (EDT)

branch: master
commit f8041510fb89a43070f8d88dc69e3dc5c3407190
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>

    Rearrange member functions in a more logical order
---
 basic_values.hpp |  2 +-
 ihs_basicval.cpp | 66 ++++++++++++++++++++++++++++----------------------------
 2 files changed, 34 insertions(+), 34 deletions(-)

diff --git a/basic_values.hpp b/basic_values.hpp
index fc4c6e2..8e54768 100644
--- a/basic_values.hpp
+++ b/basic_values.hpp
@@ -371,6 +371,7 @@ class LMI_SO BasicValues
         ,double                a_specamt
         ,oenum_modal_prem_type a_prem_type
         ) const;
+    double mly_ded_discount_factor(int year, mcenum_mode mode) const;
     double GetModalPremMlyDed
         (int         a_year
         ,mcenum_mode a_mode
@@ -381,7 +382,6 @@ class LMI_SO BasicValues
         ,oenum_modal_prem_type premium_type
         ) const;
     double GetModalSpecAmtMlyDed(double annualized_pmt, mcenum_mode) const;
-    double mly_ded_discount_factor(int year, mcenum_mode mode) const;
 
     std::vector<double> GetActuarialTable
         (std::string const& TableFile
diff --git a/ihs_basicval.cpp b/ihs_basicval.cpp
index cc1b72f..f906382 100644
--- a/ihs_basicval.cpp
+++ b/ihs_basicval.cpp
@@ -1044,6 +1044,39 @@ double BasicValues::GetModalPremGSP
     return round_max_premium()(ldbl_eps_plus_one() * z);
 }
 
+/// Calculate a monthly-deduction discount factor on the fly.
+///
+/// This factor depends on the general-account rate, which is always
+/// specified, even for separate-account-only products.
+///
+/// This concept is at the same time overelaborate and inadequate.
+/// If the crediting rate changes during a policy year, it results in
+/// a "pay-deductions" premium that varies between anniversaries, yet
+/// may not prevent the contract from lapsing; both those outcomes are
+/// likely to frustrate customers.
+
+double BasicValues::mly_ded_discount_factor(int year, mcenum_mode mode) const
+{
+    LMI_ASSERT(0.0 != mode);
+    double spread = 0.0;
+    if(mce_monthly != mode)
+        {
+        spread = MinPremIntSpread_[year] * 1.0 / mode;
+        }
+    double z = i_upper_12_over_12_from_i<double>()
+        (   yare_input_.GeneralAccountRate[year]
+        -   spread
+        );
+    double const u = 1.0 + std::max
+        (z
+        ,InterestRates_->GenAcctNetRate
+            (mce_gen_guar
+            ,mce_monthly_rate
+            )[year]
+        );
+    return 1.0 / u;
+}
+
 /// Determine an approximate "pay as you go" modal premium.
 ///
 /// This more or less represents actual monthly deductions, at least
@@ -1467,39 +1500,6 @@ std::vector<double> const& BasicValues::GetBandedCoiRates
         }
 }
 
-/// Calculate a monthly-deduction discount factor on the fly.
-///
-/// This factor depends on the general-account rate, which is always
-/// specified, even for separate-account-only products.
-///
-/// This concept is at the same time overelaborate and inadequate.
-/// If the crediting rate changes during a policy year, it results in
-/// a "pay-deductions" premium that varies between anniversaries, yet
-/// may not prevent the contract from lapsing; both those outcomes are
-/// likely to frustrate customers.
-
-double BasicValues::mly_ded_discount_factor(int year, mcenum_mode mode) const
-{
-    LMI_ASSERT(0.0 != mode);
-    double spread = 0.0;
-    if(mce_monthly != mode)
-        {
-        spread = MinPremIntSpread_[year] * 1.0 / mode;
-        }
-    double z = i_upper_12_over_12_from_i<double>()
-        (   yare_input_.GeneralAccountRate[year]
-        -   spread
-        );
-    double const u = 1.0 + std::max
-        (z
-        ,InterestRates_->GenAcctNetRate
-            (mce_gen_guar
-            ,mce_monthly_rate
-            )[year]
-        );
-    return 1.0 / u;
-}
-
 /// This forwarding function prevents the 'actuarial_table' module
 /// from needing to know about calendar dates and the database.
 ///



reply via email to

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