[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master d99f5b1 3/5: Conditionally forbid multiplicat
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master d99f5b1 3/5: Conditionally forbid multiplicative cash-value enhancement |
Date: |
Thu, 4 Feb 2021 20:45:15 -0500 (EST) |
branch: master
commit d99f5b139c79b42647eea898931de68d2b7fde7d
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>
Conditionally forbid multiplicative cash-value enhancement
---
basic_values.hpp | 1 +
db_sort.sed | 13 +++++++------
dbdict.cpp | 2 ++
dbdict.hpp | 1 +
dbnames.hpp | 1 +
dbnames.xpp | 1 +
ihs_acctval.cpp | 3 ++-
ihs_basicval.cpp | 1 +
input_harmonization.cpp | 2 +-
9 files changed, 17 insertions(+), 8 deletions(-)
diff --git a/basic_values.hpp b/basic_values.hpp
index d71db68..9bb237f 100644
--- a/basic_values.hpp
+++ b/basic_values.hpp
@@ -351,6 +351,7 @@ class LMI_SO BasicValues
int NoLapseMinDur;
int NoLapseMinAge;
oenum_waiver_charge_method WaiverChargeMethod;
+ bool AllowCashValueEnh;
std::vector<double> CashValueEnhMult;
bool LapseIgnoresSurrChg;
bool SurrChgOnIncr;
diff --git a/db_sort.sed b/db_sort.sed
index 3657252..298a216 100644
--- a/db_sort.sed
+++ b/db_sort.sed
@@ -336,12 +336,13 @@
/DB_NoLongerIssued\>/ s/^/R03/
/DB_AgeLastOrNearest\>/ s/^/R04/
/DB_MaturityAge\>/ s/^/R05/
-/DB_CashValueEnhMult\>/ s/^/R06/
-/DB_LapseIgnoresSurrChg\>/ s/^/R07/
-/DB_DefaultProcessOrder\>/ s/^/R08/
-/DB_GroupProxyRateTable\>/ s/^/R09/
-/DB_PartialMortTable\>/ s/^/R10/
-/DB_AllowGroupQuote\>/ s/^/R11/
+/DB_AllowCashValueEnh\>/ s/^/R06/
+/DB_CashValueEnhMult\>/ s/^/R07/
+/DB_LapseIgnoresSurrChg\>/ s/^/R08/
+/DB_DefaultProcessOrder\>/ s/^/R09/
+/DB_GroupProxyRateTable\>/ s/^/R10/
+/DB_PartialMortTable\>/ s/^/R11/
+/DB_AllowGroupQuote\>/ s/^/R12/
# DB_Topic_Lingo
/DB_PolicyForm\>/ s/^/S01/
# DB_Topic_Weights
diff --git a/dbdict.cpp b/dbdict.cpp
index 83d06cf..b3c62aa 100644
--- a/dbdict.cpp
+++ b/dbdict.cpp
@@ -406,6 +406,7 @@ void DBDictionary::ascribe_members()
ascribe("NoLongerIssued" , &DBDictionary::NoLongerIssued
);
ascribe("AgeLastOrNearest" , &DBDictionary::AgeLastOrNearest
);
ascribe("MaturityAge" , &DBDictionary::MaturityAge
);
+ ascribe("AllowCashValueEnh" , &DBDictionary::AllowCashValueEnh
);
ascribe("CashValueEnhMult" , &DBDictionary::CashValueEnhMult
);
ascribe("LapseIgnoresSurrChg" , &DBDictionary::LapseIgnoresSurrChg
);
ascribe("DefaultProcessOrder" , &DBDictionary::DefaultProcessOrder
);
@@ -1492,6 +1493,7 @@ sample2xyz::sample2xyz()
int dims_1111113[e_number_of_axes] = {1, 1, 1, 1, 1, 1, 3};
double loanrate[3] = {0.06, 0.05, 0.04};
Add({DB_FixedLoanRate, e_number_of_axes, dims_1111113, loanrate});
+ Add({DB_AllowCashValueEnh , true});
double cv_enh[3] = {0.10, 0.05, 0.00};
Add({DB_CashValueEnhMult, e_number_of_axes, dims_1111113, cv_enh});
Add({DB_FnMaturityAge , superior::FnMaturityAge});
diff --git a/dbdict.hpp b/dbdict.hpp
index 4ce2f92..7d301fa 100644
--- a/dbdict.hpp
+++ b/dbdict.hpp
@@ -387,6 +387,7 @@ class LMI_SO DBDictionary
database_entity NoLongerIssued ;
database_entity AgeLastOrNearest ;
database_entity MaturityAge ;
+ database_entity AllowCashValueEnh ;
database_entity CashValueEnhMult ;
database_entity LapseIgnoresSurrChg ;
database_entity DefaultProcessOrder ;
diff --git a/dbnames.hpp b/dbnames.hpp
index 3f0ed32..1d926c4 100644
--- a/dbnames.hpp
+++ b/dbnames.hpp
@@ -508,6 +508,7 @@ enum e_database_key
,DB_AgeLastOrNearest
,DB_MaturityAge
+ ,DB_AllowCashValueEnh
,DB_CashValueEnhMult
,DB_LapseIgnoresSurrChg
diff --git a/dbnames.xpp b/dbnames.xpp
index 5bc3ec6..ce9c631 100644
--- a/dbnames.xpp
+++ b/dbnames.xpp
@@ -342,6 +342,7 @@
{DB_NoLongerIssued,DB_Topic_Miscellanea,"NoLongerIssued","Forbid new-business
illustrations: 0=no, 1=yes",}, \
{DB_AgeLastOrNearest,DB_Topic_Miscellanea,"AgeLastOrNearest","Age calculated
as of last or nearest birthday: 0=ALB, 1=ANB (ties --> younger), 2=ANB (ties
--> older)",}, \
{DB_MaturityAge,DB_Topic_Miscellanea,"MaturityAge","Normal maturity age",}, \
+{DB_AllowCashValueEnh,DB_Topic_Miscellanea,"AllowCashValueEnh","Allow
multiplicative cash value enhancement: 0=no, 1=yes",}, \
{DB_CashValueEnhMult,DB_Topic_Miscellanea,"CashValueEnhMult","Cash value
enhancement multiple: e.g. 0.03 to make cash value three percent higher than
account value",}, \
{DB_LapseIgnoresSurrChg,DB_Topic_Miscellanea,"LapseIgnoresSurrChg","Ignore
tabular surrender charge for lapse processing",}, \
{DB_DefaultProcessOrder,DB_Topic_Miscellanea,"DefaultProcessOrder","Default
processing order: 0=life by life, 1=month by month [not yet implemented]",}, \
diff --git a/ihs_acctval.cpp b/ihs_acctval.cpp
index 7dfa2d8..dc82620 100644
--- a/ihs_acctval.cpp
+++ b/ihs_acctval.cpp
@@ -1028,10 +1028,11 @@ currency AccountValue::SurrChg() const
/// Cash value augmentation--like a negative surrender charge.
///
-/// Probably the input field should be expunged.
+/// INPUT !! Probably the input field should be expunged.
currency AccountValue::CSVBoost() const
{
+ if(!AllowCashValueEnh) return C0;
double const z =
CashValueEnhMult[Year]
+ yare_input_.CashValueEnhancementRate[Year]
diff --git a/ihs_basicval.cpp b/ihs_basicval.cpp
index f16adf8..9ca74f1 100644
--- a/ihs_basicval.cpp
+++ b/ihs_basicval.cpp
@@ -614,6 +614,7 @@ void BasicValues::SetPermanentInvariants()
database().query_into(DB_AllowSpecAmtIncr , AllowSAIncr);
database().query_into(DB_NoLapseAlwaysActive , NoLapseAlwaysActive);
database().query_into(DB_WpChargeMethod , WaiverChargeMethod);
+ database().query_into(DB_AllowCashValueEnh , AllowCashValueEnh);
database().query_into(DB_CashValueEnhMult , CashValueEnhMult);
database().query_into(DB_LapseIgnoresSurrChg , LapseIgnoresSurrChg);
database().query_into(DB_SurrChgOnIncr , SurrChgOnIncr);
diff --git a/input_harmonization.cpp b/input_harmonization.cpp
index 5a0faf3..b7c2f9b 100644
--- a/input_harmonization.cpp
+++ b/input_harmonization.cpp
@@ -195,7 +195,7 @@ void Input::DoHarmonize()
PartialMortalityTable .enable(part_mort_used);
PartialMortalityMultiplier.enable(part_mort_used);
- CashValueEnhancementRate .enable(home_office_only);
+ CashValueEnhancementRate .enable(home_office_only &&
database_->query<bool>(DB_AllowCashValueEnh));
SurviveToType .allow(mce_no_survival_limit ,
part_mort_used);
SurviveToType .allow(mce_survive_to_age ,
part_mort_used);