lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [lmi] master 87ac2f8 3/8: Use product minimum for certain


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 87ac2f8 3/8: Use product minimum for certain specamt strategies
Date: Tue, 25 May 2021 20:10:59 -0400 (EDT)

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

    Use product minimum for certain specamt strategies
---
 basic_values.hpp |  7 +++++++
 gpt_specamt.cpp  | 10 +++++++++-
 2 files changed, 16 insertions(+), 1 deletion(-)

diff --git a/basic_values.hpp b/basic_values.hpp
index 508717a..df88841 100644
--- a/basic_values.hpp
+++ b/basic_values.hpp
@@ -145,6 +145,8 @@ class LMI_SO BasicValues
 
     currency GetAnnualTgtPrem(int a_year, currency a_specamt) const;
 
+    currency min_issue_spec_amt() const;
+
     std::vector<double> const& GetCorridorFactor() const;
     std::vector<double> const& GetMlyDcvqc() const;
 
@@ -534,6 +536,11 @@ inline mcenum_state BasicValues::GetPremiumTaxState() const
     return PremiumTaxState_;
 }
 
+inline currency BasicValues::min_issue_spec_amt() const
+{
+    return MinIssSpecAmt;
+}
+
 // IHS !! Use a configuration file instead. These deprecated
 // functions are used only by the antediluvian branch.
 char const* CurrentTableFile();
diff --git a/gpt_specamt.cpp b/gpt_specamt.cpp
index 613af48..02b0c21 100644
--- a/gpt_specamt.cpp
+++ b/gpt_specamt.cpp
@@ -157,8 +157,16 @@ currency gpt_specamt::CalculateSpecAmt
         );
 
     // No amount solved for can plausibly reach one billion dollars.
+    // No amount lower than the product's minimum should be used.
+    //
+    // AccountValue::Solve() case 'mce_solve_specamt' solves for the
+    // base specified amount, whereas this function sets the total;
+    // their minimums deliberately differ. Using the lower minimum
+    // might violate the "total" minimum for a product with a term
+    // rider; that's okay when the user requests a solve, but not for
+    // the strategy implemented here, which should work more robustly.
     decimal_root
-        (0.0
+        (dblize(a_Values.min_issue_spec_amt())
         ,999999999.99
         ,bias_higher
         ,z.round_min_specamt.decimals()



reply via email to

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