[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [5732] Respect 'DB_WpChargeMethod' in GetModalPremMlyDed()
From: |
Greg Chicares |
Subject: |
[lmi-commits] [5732] Respect 'DB_WpChargeMethod' in GetModalPremMlyDed() |
Date: |
Sat, 18 May 2013 11:57:18 +0000 |
Revision: 5732
http://svn.sv.gnu.org/viewvc/?view=rev&root=lmi&revision=5732
Author: chicares
Date: 2013-05-18 11:57:17 +0000 (Sat, 18 May 2013)
Log Message:
-----------
Respect 'DB_WpChargeMethod' in GetModalPremMlyDed()
Modified Paths:
--------------
lmi/trunk/ihs_basicval.cpp
Modified: lmi/trunk/ihs_basicval.cpp
===================================================================
--- lmi/trunk/ihs_basicval.cpp 2013-05-18 11:11:41 UTC (rev 5731)
+++ lmi/trunk/ihs_basicval.cpp 2013-05-18 11:57:17 UTC (rev 5732)
@@ -1138,7 +1138,6 @@
/// sufficiency over minimality, but simplicity most of all.
///
/// For simplicity, certain details are disregarded:
-/// - waiver benefits are generally subject to a maximum
/// - premium loads are often stratified--the rate used here is
/// likely to be the highest that might apply, but deductions at
/// age 99 may well exceed target
@@ -1192,9 +1191,30 @@
if(yare_input_.WaiverOfPremiumBenefit)
{
- double r = MortalityRates_->WpRates()[a_year];
- z *= 1.0 + r;
- annual_charge *= 1.0 + r;
+ double const r = MortalityRates_->WpRates()[a_year];
+ switch(WaiverChargeMethod)
+ {
+ case oe_waiver_times_specamt:
+ {
+ z += r * std::min(a_specamt, WpLimit);
+ }
+ break;
+ case oe_waiver_times_deductions:
+ {
+ z *= 1.0 + r;
+ annual_charge *= 1.0 + r;
+ }
+ break;
+ default:
+ {
+ fatal_error()
+ << "Case '"
+ << WaiverChargeMethod
+ << "' not found."
+ << LMI_FLUSH
+ ;
+ }
+ }
}
z /= 1.0 - Loads_->target_premium_load_maximum_premium_tax()[a_year];
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [lmi-commits] [5732] Respect 'DB_WpChargeMethod' in GetModalPremMlyDed(),
Greg Chicares <=