[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master dadc0ee: Constrain reported survival-age limi
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master dadc0ee: Constrain reported survival-age limit to maturity age |
Date: |
Thu, 9 Jul 2020 12:15:05 -0400 (EDT) |
branch: master
commit dadc0ee758bbc89d0ea21d7e4b6ee3444cd4cd33
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>
Constrain reported survival-age limit to maturity age
This limit applies only to the "ledger", which is the dataset used for
report generation. It does not apply to the GUI: if, say, a maximum age
of 97 is entered, and various products contained in the same census have
maturity ages of 95 and 100, then forcibly reducing the input value (97)
would be inappropriate. The same consideration applies if an product
with a maturity age 100 is selected, then one maturity age 95 is chosen,
and then the first one is reselected: 97 is deliberate input and should
not be altered without a really compelling rationale.
---
ledger_invariant_init.cpp | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/ledger_invariant_init.cpp b/ledger_invariant_init.cpp
index 67f8262..94a5322 100644
--- a/ledger_invariant_init.cpp
+++ b/ledger_invariant_init.cpp
@@ -207,13 +207,15 @@ void LedgerInvariant::Init(BasicValues const* b)
}
LMI_ASSERT(SurviveToExpectancy + SurviveToYear + SurviveToAge <= 1);
- // These aren't constrained to cell-specific max age or duration.
+ // This isn't constrained to the cell-specific maturity duration.
// If a composite has two cells, ages 20 and 80, and the input max
// duration for the case (and both cells) is 25 years, then the
// composite max duration really is 25: it's not limited to 20
// because the 80-year-old matures earlier.
SurvivalMaxYear = b->yare_input_.SurviveToYear;
+ // However, this one is so constrained:
SurvivalMaxAge = b->yare_input_.SurviveToAge;
+ SurvivalMaxAge = std::min(EndtAge, SurvivalMaxAge);
AvgFund = b->yare_input_.UseAverageOfAllFunds;
CustomFund = b->yare_input_.OverrideFundManagementFee;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [lmi-commits] [lmi] master dadc0ee: Constrain reported survival-age limit to maturity age,
Greg Chicares <=