[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master cfab248 3/3: Deduct all asset-based loads as
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master cfab248 3/3: Deduct all asset-based loads as appropriate for 7702 [293] |
Date: |
Thu, 25 Feb 2021 16:36:07 -0500 (EST) |
branch: master
commit cfab2488bd9826d77976e17941dd08412818a2e3
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>
Deduct all asset-based loads as appropriate for 7702 [293]
The expunged comment about "CurrSepAcctLoadBandedByPrem" was wrong:
that load is indeed based on assets. Numerically, it is 'k * assets',
where 'k' is a scalar constant determined by premium, but here premium
is disregarded and the lowest value of 'k' is used. A load that is
calculated as a constant times assets is an asset-based load.
---
stratified_charges.cpp | 19 +++++++++++++++----
1 file changed, 15 insertions(+), 4 deletions(-)
diff --git a/stratified_charges.cpp b/stratified_charges.cpp
index 219bbae..9ff5e14 100644
--- a/stratified_charges.cpp
+++ b/stratified_charges.cpp
@@ -413,16 +413,27 @@ double
stratified_charges::tiered_guar_sepacct_load(double assets, double) const
/// changed on a block of business to produce a more front-loaded
/// pattern in general, with the inadvertent effect of reducing future
/// compensation on a particular contract.
-///
-/// TODO ?? TAXATION !! Missing "CurrSepAcctLoadBandedByAssets".
-/// But "CurrSepAcctLoadBandedByPrem" is deliberately excluded,
-/// because it's not based on assets.
double stratified_charges::minimum_tiered_sepacct_load_for_7702() const
{
stratified_entity const& z = datum("CurrSepAcctLoadTieredByAssets");
LMI_ASSERT(!z.values().empty());
return *std::min_element(z.values().begin(), z.values().end());
+
+ stratified_entity const& z0 = datum("CurrSepAcctLoadBandedByAssets");
+ stratified_entity const& z1 = datum("CurrSepAcctLoadBandedByPrem");
+ stratified_entity const& z2 = datum("CurrSepAcctLoadTieredByAssets");
+ // SOMEDAY !! Probably these assertions can never fire, but it
+ // would be better to make them ctor postconditions--which they
+ // already are, except for the default ctor.
+ LMI_ASSERT(!z0.values().empty());
+ LMI_ASSERT(!z1.values().empty());
+ LMI_ASSERT(!z2.values().empty());
+ return
+ *std::min_element(z0.values().begin(), z0.values().end())
+ + *std::min_element(z1.values().begin(), z1.values().end())
+ + *std::min_element(z2.values().begin(), z2.values().end())
+ ;
}
namespace