[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 61a3f73 4/4: Use multiplicative cash value en
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master 61a3f73 4/4: Use multiplicative cash value enhancement |
Date: |
Tue, 30 Oct 2018 11:05:58 -0400 (EDT) |
branch: master
commit 61a3f734bd61f6decc6b8a132438a09c5094b502
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>
Use multiplicative cash value enhancement
---
account_value.hpp | 2 ++
basic_values.hpp | 1 +
ihs_acctval.cpp | 2 ++
ihs_basicval.cpp | 1 +
4 files changed, 6 insertions(+)
diff --git a/account_value.hpp b/account_value.hpp
index c8243cc..3830b5c 100644
--- a/account_value.hpp
+++ b/account_value.hpp
@@ -496,6 +496,7 @@ class LMI_SO AccountValue
double YearsPrfLnIntCredRate;
double YearsRegLnIntDueRate;
double YearsPrfLnIntDueRate;
+
double YearsSurrChgPremMult;
double YearsSurrChgAVMult;
double YearsCoiRate0;
@@ -519,6 +520,7 @@ class LMI_SO AccountValue
double YearsSepAcctLoadRate;
double YearsSalesLoadRefundRate;
double YearsDacTaxLoadRate;
+ double YearsCashValueEnhMult;
double MonthsPolicyFees;
double SpecAmtLoad;
diff --git a/basic_values.hpp b/basic_values.hpp
index 4524761..e5443b9 100644
--- a/basic_values.hpp
+++ b/basic_values.hpp
@@ -330,6 +330,7 @@ class LMI_SO BasicValues
int NoLapseMinDur;
int NoLapseMinAge;
oenum_waiver_charge_method WaiverChargeMethod;
+ std::vector<double> CashValueEnhMult;
bool LapseIgnoresSurrChg;
bool SurrChgOnIncr;
bool SurrChgOnDecr;
diff --git a/ihs_acctval.cpp b/ihs_acctval.cpp
index 72f764b..473e8c4 100644
--- a/ihs_acctval.cpp
+++ b/ihs_acctval.cpp
@@ -1284,6 +1284,7 @@ double AccountValue::SurrChg()
YearsSurrChgAVMult * std::max(0.0, TotalAccountValue())
+ YearsSurrChgPremMult * std::max(0.0, CumPmts)
+ SurrChg_[Year]
+ - YearsCashValueEnhMult * std::max(0.0, TotalAccountValue())
- yare_input_.CashValueEnhancementRate[Year] * std::max(0.0,
TotalAccountValue())
;
}
@@ -1698,6 +1699,7 @@ void AccountValue::SetAnnualInvariants()
YearsSepAcctLoadRate = Loads_->separate_account_load (GenBasis_)[Year];
YearsSalesLoadRefundRate= Loads_->refundable_sales_load_proportion()[Year];
YearsDacTaxLoadRate = Loads_->dac_tax_load ()[Year];
+ YearsCashValueEnhMult = CashValueEnhMult[Year];
}
//============================================================================
diff --git a/ihs_basicval.cpp b/ihs_basicval.cpp
index 02ef4d6..2800a64 100644
--- a/ihs_basicval.cpp
+++ b/ihs_basicval.cpp
@@ -657,6 +657,7 @@ void BasicValues::SetPermanentInvariants()
AllowSAIncr = Database_->Query(DB_AllowSpecAmtIncr );
NoLapseAlwaysActive = Database_->Query(DB_NoLapseAlwaysActive );
WaiverChargeMethod =
static_cast<oenum_waiver_charge_method>(Database_->Query(DB_WpChargeMethod));
+ Database_->Query(CashValueEnhMult, DB_CashValueEnhMult);
LapseIgnoresSurrChg = Database_->Query(DB_LapseIgnoresSurrChg );
SurrChgOnIncr = Database_->Query(DB_SurrChgOnIncr );
SurrChgOnDecr = Database_->Query(DB_SurrChgOnDecr );