[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [6243] Calculate premiums for group premium quotes
From: |
Greg Chicares |
Subject: |
[lmi-commits] [6243] Calculate premiums for group premium quotes |
Date: |
Thu, 13 Aug 2015 00:19:26 +0000 |
Revision: 6243
http://svn.sv.gnu.org/viewvc/?view=rev&root=lmi&revision=6243
Author: chicares
Date: 2015-08-13 00:19:25 +0000 (Thu, 13 Aug 2015)
Log Message:
-----------
Calculate premiums for group premium quotes
Modified Paths:
--------------
lmi/trunk/account_value.hpp
lmi/trunk/ihs_acctval.cpp
Modified: lmi/trunk/account_value.hpp
===================================================================
--- lmi/trunk/account_value.hpp 2015-08-12 23:20:52 UTC (rev 6242)
+++ lmi/trunk/account_value.hpp 2015-08-13 00:19:25 UTC (rev 6243)
@@ -161,9 +161,7 @@
double GetCurtateNetCoiChargeInforce () const;
void SetProjectedCoiCharge ();
double GetProjectedCoiChargeInforce () const;
- double ApportionNetMortalityReserve
- (double reserve_per_life_inforce
- );
+ double ApportionNetMortalityReserve(double reserve_per_life_inforce);
double experience_rating_amortization_years() const;
double ibnr_as_months_of_mortality_charges() const;
@@ -290,6 +288,19 @@
void ReduceSurrChg (int year, double partial_surrchg);
double SurrChg ();
+ double SuppositiveModalPremium
+ (bool with_adb
+ ,bool with_wp
+ ) const;
+ double SuppositiveModalPremium
+ (int year
+ ,mcenum_mode mode
+ ,double specamt
+ ,double termamt
+ ,bool with_adb
+ ,bool with_wp
+ ) const;
+
void SetMaxLoan ();
void SetMaxWD ();
double GetRefundableSalesLoad () const;
Modified: lmi/trunk/ihs_acctval.cpp
===================================================================
--- lmi/trunk/ihs_acctval.cpp 2015-08-12 23:20:52 UTC (rev 6242)
+++ lmi/trunk/ihs_acctval.cpp 2015-08-13 00:19:25 UTC (rev 6243)
@@ -37,7 +37,7 @@
#include "death_benefits.hpp"
#include "ihs_irc7702.hpp"
#include "ihs_irc7702a.hpp"
-#include "input.hpp" // Magic static function.
+#include "input.hpp" // magically_rectify()
#include "interest_rates.hpp"
#include "ledger.hpp"
#include "ledger_invariant.hpp"
@@ -1037,6 +1037,64 @@
// TODO ?? Perform specamt strategy here?
}
+double AccountValue::SuppositiveModalPremium
+ (bool with_adb
+ ,bool with_wp
+ ) const
+{
+ LMI_ASSERT(0 == Year);
+ return SuppositiveModalPremium
+ (Year
+ ,InvariantValues().ErMode[Year].value()
+ ,InvariantValues().SpecAmt[Year]
+ ,InvariantValues().TermSpecAmt[Year]
+ ,with_adb
+ ,with_wp
+ );
+}
+
+/// Determine modal premium on a basis possibly differing from input.
+///
+/// Motivation: to provide premiums with and without certain riders,
+/// for use with group premium quotes.
+///
+/// For now at least, only that narrow purpose is addressed. If, for
+/// that purpose, input is inappropriate, then output may be as well.
+/// For example, this function doesn't ascertain whether the riders it
+/// toggles are available for the product selected. Other riders are
+/// not inhibited here: all input is taken as deliberate, as an end
+/// user might reasonably wish to show the effect of other riders; if
+/// assertions as to input are to be made at all, then they should be
+/// made in the function that creates the group premium report.
+
+double AccountValue::SuppositiveModalPremium
+ (int year
+ ,mcenum_mode mode
+ ,double specamt
+ ,double termamt
+ ,bool with_adb
+ ,bool with_wp
+ ) const
+{
+ LMI_ASSERT(0 != Input_);
+ yare_input yi(*Input_);
+
+ yi.AccidentalDeathBenefit = with_adb;
+ yi.WaiverOfPremiumBenefit = with_wp;
+
+ if(!SplitMinPrem)
+ {
+ return GetModalPremMlyDed(year, mode, specamt, yi);
+ }
+ else
+ {
+ return
+ GetModalPremMlyDedEe(year, mode, termamt, yi)
+ + GetModalPremMlyDedEr(year, mode, specamt, yi)
+ ;
+ }
+}
+
//============================================================================
void AccountValue::AddSurrChgLayer(int year, double delta_specamt)
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [lmi-commits] [6243] Calculate premiums for group premium quotes,
Greg Chicares <=