lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master b4eb422 02/14: Rename a variable


From: Greg Chicares
Subject: [lmi-commits] [lmi] master b4eb422 02/14: Rename a variable
Date: Sun, 6 Sep 2020 07:50:36 -0400 (EDT)

branch: master
commit b4eb4222b08dbc0cea56292e9abec23e47424155
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>

    Rename a variable
    
    Soon, a congener will be established for the actuarial quantity "lx".
    "lx" is the mot juste: it's not "tpx" because it's multiplied by a
    "radix", and "Lx" is something different. However, a name like
    "partial_mortality_l" may too easily be misread as ending in "_1";
    "partial_mortality_lx" is less easily misread. For concinnity, then,
    "q" should be "qx".
---
 account_value.hpp |  2 +-
 ihs_acctval.cpp   | 12 ++++++------
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/account_value.hpp b/account_value.hpp
index f3705f2..55b5ec0 100644
--- a/account_value.hpp
+++ b/account_value.hpp
@@ -583,7 +583,7 @@ class LMI_SO AccountValue final
     double  YearsTotalSpecAmtLoad;
     double  YearsTotalSepAcctLoad;
 
-    std::vector<double> partial_mortality_q;
+    std::vector<double> partial_mortality_qx;
 
     // For experience rating.
     double  CoiRetentionRate;
diff --git a/ihs_acctval.cpp b/ihs_acctval.cpp
index 29b6ff4..c0b9dfd 100644
--- a/ihs_acctval.cpp
+++ b/ihs_acctval.cpp
@@ -424,7 +424,7 @@ void AccountValue::InitializeLife(mcenum_run_basis a_Basis)
         (   lmi::ssize(InvariantValues().InforceLives)
         ==  1 + BasicValues::GetLength()
         );
-    partial_mortality_q.resize(BasicValues::GetLength());
+    partial_mortality_qx.resize(BasicValues::GetLength());
     // TODO ?? 'InvariantValues().InforceLives' may be thought of as
     // counting potential inforce lives: it does not reflect lapses.
     // It should either reflect lapses or be renamed. Meanwhile,
@@ -436,8 +436,8 @@ void AccountValue::InitializeLife(mcenum_run_basis a_Basis)
         InvariantValues().InforceLives[0] = inforce_lives;
         for(int j = 0; j < BasicValues::GetLength(); ++j)
             {
-            partial_mortality_q[j] = GetPartMortQ(j);
-            inforce_lives *= 1.0 - partial_mortality_q[j];
+            partial_mortality_qx[j] = GetPartMortQ(j);
+            inforce_lives *= 1.0 - partial_mortality_qx[j];
             InvariantValues().InforceLives[1 + j] = inforce_lives;
             }
         }
@@ -1098,9 +1098,9 @@ void AccountValue::SetClaims()
     TxSetDeathBft();
     TxSetTermAmt();
 
-    YearsGrossClaims       = partial_mortality_q[Year] * DBReflectingCorr;
-    YearsAVRelOnDeath      = partial_mortality_q[Year] * TotalAccountValue();
-    YearsLoanRepaidOnDeath = partial_mortality_q[Year] * (RegLnBal + PrfLnBal);
+    YearsGrossClaims       = partial_mortality_qx[Year] * DBReflectingCorr;
+    YearsAVRelOnDeath      = partial_mortality_qx[Year] * TotalAccountValue();
+    YearsLoanRepaidOnDeath = partial_mortality_qx[Year] * (RegLnBal + 
PrfLnBal);
     YearsDeathProceeds = material_difference
         (YearsGrossClaims
         ,YearsLoanRepaidOnDeath



reply via email to

[Prev in Thread] Current Thread [Next in Thread]