lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [lmi] master 0ed1720 3/4: Add several 7702 vectors to ledg


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 0ed1720 3/4: Add several 7702 vectors to ledger
Date: Thu, 25 Feb 2021 08:16:54 -0500 (EST)

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

    Add several 7702 vectors to ledger
    
    These vectors, though unlikely ever to be used as report columns, will
    be useful for acceptance testing.
---
 basicvalues.cpp           |  9 +++++++--
 ihs_acctval.cpp           |  2 ++
 ledger_evaluator.cpp      | 16 ++++++++++++++++
 ledger_invariant.cpp      |  5 +++++
 ledger_invariant.hpp      |  5 +++++
 ledger_invariant_init.cpp |  9 +++++++++
 6 files changed, 44 insertions(+), 2 deletions(-)

diff --git a/basicvalues.cpp b/basicvalues.cpp
index af7e020..fe411c8 100644
--- a/basicvalues.cpp
+++ b/basicvalues.cpp
@@ -148,8 +148,13 @@ void BasicValues::Init()
     WDFee      = round_withdrawal().c(database().query<double>(DB_WdFee     ));
     database().query_into(DB_WdFeeRate , WDFeeRate );
 
-// The antediluvian branch leaves FundData_, StratifiedCharges_, and
-// ProductData initialized to null pointers.
+// The antediluvian branch leaves these members initialized to null pointers:
+//   product_
+//   lingo_
+//   FundData_
+//   RoundingRules_
+//   StratifiedCharges_
+//   i7702_
 }
 
 //============================================================================
diff --git a/ihs_acctval.cpp b/ihs_acctval.cpp
index e89f5ab..5d0f0ff 100644
--- a/ihs_acctval.cpp
+++ b/ihs_acctval.cpp
@@ -1171,6 +1171,8 @@ void AccountValue::FinalizeYear()
     VariantValues().CSVNet      [Year] = dblize(csv_net);
     VariantValues().CV7702      [Year] = dblize(cv_7702);
 
+    InvariantValues().Dcv       [Year] = Dcv;
+
     // Update death benefit. 'DBReflectingCorr' currently equals the
     // death benefit as of the beginning of the twelfth month, but its
     // end-of-year value (as of the end of the twelfth month) is
diff --git a/ledger_evaluator.cpp b/ledger_evaluator.cpp
index 6d8749d..9604e9c 100644
--- a/ledger_evaluator.cpp
+++ b/ledger_evaluator.cpp
@@ -193,6 +193,7 @@ title_map_t static_titles()
     ,{"DacTaxLoad_Guaranteed"           , "Guar DAC\nTax\nLoad"}
     ,{"DacTaxRsv_Current"               , "Curr DAC\nTax\nReserve"}
     ,{"DacTaxRsv_Guaranteed"            , "Guar DAC\nTax\nReserve"}
+    ,{"Dcv"                             , "Deemed\nCash\nValue"}
     ,{"DeathProceedsPaid_Current"       , "Curr Death\nProceeds\nPaid"}
     ,{"DeathProceedsPaid_Guaranteed"    , "Guar Death\nProceeds\nPaid"}
     ,{"Duration"                        , "Duration"}
@@ -213,6 +214,10 @@ title_map_t static_titles()
     ,{"HoneymoonValueSpread"            , "Honeymoon\nValue\nSpread"}
     ,{"IndvTaxBracket"                  , "EE Tax\nBracket"}
     ,{"InforceLives"                    , "BOY\nLives\nInforce"}
+    ,{"Irc7702ig"                       , "7702 i\nfor NAAR\nDiscount"}
+    ,{"Irc7702Gross"                    , "7702 i\nGross"}
+    ,{"Irc7702NetGLP"                   , "7702 i\nNet for\nGLP"}
+    ,{"Irc7702NetGSP"                   , "7702 i\nNet for\nGSP"}
     ,{"IrrCsv_Current"                  , "Curr IRR\non CSV"}
     ,{"IrrCsv_Guaranteed"               , "Guar IRR\non CSV"}
     ,{"IrrDb_Current"                   , "Curr IRR\non DB"}
@@ -325,6 +330,7 @@ mask_map_t static_masks()
     ,{"DacTaxLoad_Guaranteed"           , "999,999,999"}
     ,{"DacTaxRsv_Current"               , "999,999,999"}
     ,{"DacTaxRsv_Guaranteed"            , "999,999,999"}
+    ,{"Dcv"                             , "999,999,999"}
     ,{"DeathProceedsPaid_Current"       , "999,999,999"}
     ,{"DeathProceedsPaid_Guaranteed"    , "999,999,999"}
     ,{"Duration"                        ,         "999"}
@@ -345,6 +351,10 @@ mask_map_t static_masks()
     ,{"HoneymoonValueSpread"            ,      "99.99%"}
     ,{"IndvTaxBracket"                  ,      "99.99%"}
     ,{"InforceLives"                    , "999,999,999"}
+    ,{"Irc7702ig"                       ,      "99.99%"}
+    ,{"Irc7702Gross"                    ,      "99.99%"}
+    ,{"Irc7702NetGLP"                   ,      "99.99%"}
+    ,{"Irc7702NetGSP"                   ,      "99.99%"}
     ,{"IrrCsv_Current"                  ,  "100000.00%"}
     ,{"IrrCsv_Guaranteed"               ,  "100000.00%"}
     ,{"IrrDb_Current"                   ,  "100000.00%"}
@@ -558,6 +568,11 @@ format_map_t static_formats()
     ,{"IndvTaxBracket"                  , f4}
     ,{"InforceHMVector"                 , f4}
 
+    ,{"Irc7702ig"                       , f4}
+    ,{"Irc7702Gross"                    , f4}
+    ,{"Irc7702NetGLP"                   , f4}
+    ,{"Irc7702NetGSP"                   , f4}
+
     ,{"IrrCsv_Current"                  , f4}
     ,{"IrrCsv_CurrentZero"              , f4}
     ,{"IrrCsv_Guaranteed"               , f4}
@@ -608,6 +623,7 @@ format_map_t static_formats()
     ,{"Composite"                       , f1}
     ,{"DacTaxLoad"                      , f1}
     ,{"DacTaxRsv"                       , f1}
+    ,{"Dcv"                             , f1}
     ,{"DeathProceedsPaid"               , f1}
     ,{"EOYDeathBft"                     , f1}
     ,{"EeGrossPmt"                      , f1}
diff --git a/ledger_invariant.cpp b/ledger_invariant.cpp
index 1ba0878..5b66bc0 100644
--- a/ledger_invariant.cpp
+++ b/ledger_invariant.cpp
@@ -96,6 +96,7 @@ void LedgerInvariant::Alloc(int len)
     // EOY vectors.
     EndYearVectors  ["TermSpecAmt"                ] = &TermSpecAmt             
   ;
     EndYearVectors  ["SpecAmt"                    ] = &SpecAmt                 
   ;
+    EndYearVectors  ["Dcv"                        ] = &Dcv                     
   ;
 
     // Forborne vectors.
     ForborneVectors ["Salary"                     ] = &Salary                  
   ;
@@ -109,6 +110,10 @@ void LedgerInvariant::Alloc(int len)
     OtherVectors    ["AddonCompOnAssets"          ] = &AddonCompOnAssets       
   ;
     OtherVectors    ["AddonCompOnPremium"         ] = &AddonCompOnPremium      
   ;
     OtherVectors    ["CorridorFactor"             ] = &CorridorFactor          
   ;
+    OtherVectors    ["Irc7702ig"                  ] = &Irc7702ig               
   ;
+    OtherVectors    ["Irc7702Gross"               ] = &Irc7702Gross            
   ;
+    OtherVectors    ["Irc7702NetGLP"              ] = &Irc7702NetGLP           
   ;
+    OtherVectors    ["Irc7702NetGSP"              ] = &Irc7702NetGSP           
   ;
     OtherVectors    ["AnnLoanDueRate"             ] = &AnnLoanDueRate          
   ;
     OtherVectors    ["CurrMandE"                  ] = &CurrMandE               
   ;
     OtherVectors    ["TotalIMF"                   ] = &TotalIMF                
   ;
diff --git a/ledger_invariant.hpp b/ledger_invariant.hpp
index 69f7ef4..b78e2fa 100644
--- a/ledger_invariant.hpp
+++ b/ledger_invariant.hpp
@@ -84,6 +84,7 @@ class LMI_SO LedgerInvariant final
     // EOY vectors.
     std::vector<double> TermSpecAmt;
     std::vector<double> SpecAmt;
+    std::vector<double> Dcv;
 
     // Forborne vectors.
     std::vector<double> Salary;
@@ -97,6 +98,10 @@ class LMI_SO LedgerInvariant final
     std::vector<double> AddonCompOnAssets;
     std::vector<double> AddonCompOnPremium;
     std::vector<double> CorridorFactor;
+    std::vector<double> Irc7702ig;
+    std::vector<double> Irc7702Gross;
+    std::vector<double> Irc7702NetGLP;
+    std::vector<double> Irc7702NetGSP;
     std::vector<double> AnnLoanDueRate;
     // TODO ?? M&E varies by basis (cf. 'GuarMaxMandE' below), so it
     // belongs in the variant ledger.
diff --git a/ledger_invariant_init.cpp b/ledger_invariant_init.cpp
index 418dbfd..3268dd7 100644
--- a/ledger_invariant_init.cpp
+++ b/ledger_invariant_init.cpp
@@ -32,6 +32,7 @@
 #include "dbnames.hpp"
 #include "death_benefits.hpp"
 #include "fund_data.hpp"
+#include "i7702.hpp"
 #include "interest_rates.hpp"
 #include "lingo.hpp"
 #include "lmi.hpp"                      // is_antediluvian_fork()
@@ -119,6 +120,7 @@ void LedgerInvariant::Init(BasicValues const* b)
         TermSpecAmt            .assign(Length, 0.0);
         }
     SpecAmt                    = dblize(b->DeathBfts_->specamt());
+//  Dcv                        = DYNAMIC
 
     // Forborne vectors.
 
@@ -134,6 +136,13 @@ void LedgerInvariant::Init(BasicValues const* b)
     AddonCompOnAssets          = b->yare_input_.ExtraCompensationOnAssets ;
     AddonCompOnPremium         = b->yare_input_.ExtraCompensationOnPremium;
     CorridorFactor             = b->GetCorridorFactor();
+    if(!is_antediluvian_fork())
+        {
+        Irc7702ig                  = b->i7702_->ig();
+        Irc7702Gross               = b->i7702_->gross();
+        Irc7702NetGLP              = b->i7702_->net_glp();
+        Irc7702NetGSP              = b->i7702_->net_gsp();
+        }
 
     AnnLoanDueRate = b->InterestRates_->RegLnDueRate
         (mce_gen_curr



reply via email to

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