[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 2bcf8d3 08/14: Move commentary outside functi
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master 2bcf8d3 08/14: Move commentary outside function body |
Date: |
Sun, 6 Sep 2020 07:50:38 -0400 (EDT) |
branch: master
commit 2bcf8d3aadf0ea8cd0f428dcc81b17b1ac9e92bf
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>
Move commentary outside function body
---
ihs_acctval.cpp | 29 ++++++++++++++++-------------
1 file changed, 16 insertions(+), 13 deletions(-)
diff --git a/ihs_acctval.cpp b/ihs_acctval.cpp
index d08c5e2..e14bc28 100644
--- a/ihs_acctval.cpp
+++ b/ihs_acctval.cpp
@@ -1431,25 +1431,28 @@ void AccountValue::SetAnnualInvariants()
YearsDacTaxLoadRate = Loads_->dac_tax_load ()[Year];
}
+/// Calculate and store actuarial functions for partial mortality.
+///
+/// Iff partial mortality is used, save yearly values in a vector
+/// for use elsewhere in this class, and store yearly inforce lives
+/// (assuming no one ever lapses) in the invariant ledger object.
+///
+/// A contract may be in force at the end of its maturity year,
+/// and it's necessary to treat it that way because other year-end
+/// composite values are multiplied by the number of lives inforce.
+/// Of course, a contract is not normally in force after maturity.
+///
+/// TODO ?? These actuarial functions may be thought of as
+/// counting potential inforce lives: they do not reflect lapses.
+/// InforceLivesBoy() and InforceLivesEoy() may be used where
+/// lapses should be taken into account.
+
void AccountValue::set_partial_mortality()
{
- // Iff partial mortality is used, save yearly values in a vector
- // for use elsewhere in this class, and store yearly inforce lives
- // (assuming no one ever lapses) in the invariant ledger object.
- //
- // A contract may be in force at the end of its maturity year,
- // and it's necessary to treat it that way because other year-end
- // composite values are multiplied by the number of lives inforce.
- // Of course, a contract is not normally in force after maturity.
-
double const inforce_lives = yare_input_.NumberOfIdenticalLives;
partial_mortality_qx .resize( BasicValues::GetLength());
partial_mortality_tpx.resize(1 + BasicValues::GetLength(), 1.0);
partial_mortality_lx .resize(1 + BasicValues::GetLength(), inforce_lives);
- // TODO ?? These actuarial functions may be thought of as
- // counting potential inforce lives: they do not reflect lapses.
- // InforceLivesBoy() and InforceLivesEoy() may be used where
- // lapses should be taken into account.
if(yare_input_.UsePartialMortality)
{
// partial_mortality_lx[0] was set above.
- [lmi-commits] [lmi] master updated (c4f84b4 -> 59860e3), Greg Chicares, 2020/09/06
- [lmi-commits] [lmi] master 123b572 01/14: Avoid reading back from ledger in class AccountValue, Greg Chicares, 2020/09/06
- [lmi-commits] [lmi] master b4eb422 02/14: Rename a variable, Greg Chicares, 2020/09/06
- [lmi-commits] [lmi] master 14c2920 07/14: Factor out partial-mortality calculations, Greg Chicares, 2020/09/06
- [lmi-commits] [lmi] master 338d589 10/14: Call set_partial_mortality() OAOO, Greg Chicares, 2020/09/06
- [lmi-commits] [lmi] master 915e4ef 03/14: Avoid reading back from ledger in class AccountValue, Greg Chicares, 2020/09/06
- [lmi-commits] [lmi] master 540e3ca 04/14: Simplify, Greg Chicares, 2020/09/06
- [lmi-commits] [lmi] master 73d5f2b 06/14: Refactor for terseness, Greg Chicares, 2020/09/06
- [lmi-commits] [lmi] master 2bcf8d3 08/14: Move commentary outside function body,
Greg Chicares <=
- [lmi-commits] [lmi] master 7b9b0cf 11/14: Resolve a marked defect [339], Greg Chicares, 2020/09/06
- [lmi-commits] [lmi] master 3cbd888 12/14: Improve documentation, Greg Chicares, 2020/09/06
- [lmi-commits] [lmi] master 3ff6e18 13/14: Add and use trivial const accessors, Greg Chicares, 2020/09/06
- [lmi-commits] [lmi] master 1f2d652 05/14: Calculate and store partial-mortality tpx along with lx, Greg Chicares, 2020/09/06
- [lmi-commits] [lmi] master a1d6c16 09/14: Improve documentation, Greg Chicares, 2020/09/06
- [lmi-commits] [lmi] master 59860e3 14/14: Move partial mortality into base class, Greg Chicares, 2020/09/06