[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [5712] Add data needed for group roster to ledger
From: |
Greg Chicares |
Subject: |
[lmi-commits] [5712] Add data needed for group roster to ledger |
Date: |
Sun, 21 Apr 2013 22:11:18 +0000 |
Revision: 5712
http://svn.sv.gnu.org/viewvc/?view=rev&root=lmi&revision=5712
Author: chicares
Date: 2013-04-21 22:11:17 +0000 (Sun, 21 Apr 2013)
Log Message:
-----------
Add data needed for group roster to ledger
Modified Paths:
--------------
lmi/trunk/ihs_acctval.cpp
lmi/trunk/ledger_invariant.cpp
lmi/trunk/ledger_invariant.hpp
lmi/trunk/ledger_variant.cpp
lmi/trunk/ledger_variant.hpp
lmi/trunk/loads.cpp
lmi/trunk/yare_input.cpp
lmi/trunk/yare_input.hpp
Modified: lmi/trunk/ihs_acctval.cpp
===================================================================
--- lmi/trunk/ihs_acctval.cpp 2013-04-21 09:46:16 UTC (rev 5711)
+++ lmi/trunk/ihs_acctval.cpp 2013-04-21 22:11:17 UTC (rev 5712)
@@ -962,6 +962,15 @@
ActualSpecAmt = InvariantValues().SpecAmt[Year];
TermSpecAmt = InvariantValues().TermSpecAmt[Year];
+ // Most other yearly values are posted to InvariantValues() in
+ // FinalizeYear(), but it seems clearer to post this one here
+ // where it's calculated along with 'MlyNoLapsePrem'.
+ InvariantValues().ModalMinimumPremium[Year] = GetModalMinPrem
+ (Year
+ ,InvariantValues().ErMode[Year].value()
+ ,InvariantValues().SpecAmt[Year]
+ );
+
// No-lapse premium generally changes whenever specamt changes for
// any reason (e.g., elective increases or decreases, DBO changes,
// and withdrawals). Target premium may change similarly, or may
Modified: lmi/trunk/ledger_invariant.cpp
===================================================================
--- lmi/trunk/ledger_invariant.cpp 2013-04-21 09:46:16 UTC (rev 5711)
+++ lmi/trunk/ledger_invariant.cpp 2013-04-21 22:11:17 UTC (rev 5712)
@@ -46,6 +46,7 @@
#include "mc_enum_types_aux.hpp" // mc_str()
#include "miscellany.hpp"
#include "outlay.hpp"
+#include "premium_tax.hpp"
#include "product_data.hpp"
#include <algorithm>
@@ -108,9 +109,11 @@
BegYearVectors ["Outlay" ] = &Outlay ;
BegYearVectors ["GptForceout" ] = &GptForceout ;
BegYearVectors ["NaarForceout" ] = &NaarForceout ;
+ BegYearVectors ["ModalMinimumPremium" ] = &ModalMinimumPremium ;
EndYearVectors ["TermSpecAmt" ] = &TermSpecAmt ;
EndYearVectors ["SpecAmt" ] = &SpecAmt ;
+ // SOMEDAY !! This contradicts the "ProducerCompensation" comment in the
header.
BegYearVectors ["ProducerCompensation" ] = &ProducerCompensation ;
OtherVectors ["IndvTaxBracket" ] = &IndvTaxBracket ;
@@ -140,10 +143,14 @@
ScalableScalars ["Dumpin" ] = &Dumpin ;
ScalableScalars ["External1035Amount" ] = &External1035Amount ;
ScalableScalars ["Internal1035Amount" ] = &Internal1035Amount ;
+ ScalableScalars ["InforceUnloanedAV" ] = &InforceUnloanedAV ;
+ ScalableScalars ["InforceTaxBasis" ] = &InforceTaxBasis ;
OtherScalars ["MaleProportion" ] = &MaleProportion ;
OtherScalars ["NonsmokerProportion" ] = &NonsmokerProportion ;
OtherScalars ["GuarMaxMandE" ] = &GuarMaxMandE ;
+ OtherScalars ["InitDacTaxRate" ] = &InitDacTaxRate ;
+ OtherScalars ["InitPremTaxRate" ] = &InitPremTaxRate ;
OtherScalars ["GenderDistinct" ] = &GenderDistinct ;
OtherScalars ["GenderBlended" ] = &GenderBlended ;
OtherScalars ["SmokerDistinct" ] = &SmokerDistinct ;
@@ -173,17 +180,19 @@
OtherScalars ["AllowDbo3" ] = &AllowDbo3 ;
OtherScalars ["InitAnnLoanDueRate" ] = &InitAnnLoanDueRate ;
OtherScalars ["IsInforce" ] = &IsInforce ;
- OtherScalars ["CountryCOIMultiplier" ] = &CountryCOIMultiplier ;
+ OtherScalars ["CurrentCoiMultiplier" ] = &CurrentCoiMultiplier ;
OtherScalars ["NoLapseAlwaysActive" ] = &NoLapseAlwaysActive ;
OtherScalars ["NoLapseMinDur" ] = &NoLapseMinDur ;
OtherScalars ["NoLapseMinAge" ] = &NoLapseMinAge ;
OtherScalars ["Has1035ExchCharge" ] = &Has1035ExchCharge ;
OtherScalars ["EffDateJdn" ] = &EffDateJdn ;
+ OtherScalars ["DateOfBirthJdn" ] = &DateOfBirthJdn ;
OtherScalars ["GenAcctAllocation" ] = &GenAcctAllocation ;
OtherScalars ["SupplementalReport" ] = &SupplementalReport ;
Strings ["PolicyMktgName" ] = &PolicyMktgName ;
Strings ["PolicyLegalName" ] = &PolicyLegalName ;
+ Strings ["ProductName" ] = &ProductName ;
Strings ["PolicyForm" ] = &PolicyForm ;
Strings ["InsCoShortName" ] = &InsCoShortName ;
Strings ["InsCoName" ] = &InsCoName ;
@@ -351,6 +360,7 @@
// Scalars of type not compatible with double.
EffDate = obj.EffDate ;
+ DateOfBirth = obj.DateOfBirth ;
FullyInitialized = obj.FullyInitialized ;
}
@@ -416,16 +426,23 @@
// Internal1035Amount;
// Dumpin =
+ InforceUnloanedAV =
+ b->yare_input_.InforceGeneralAccountValue
+ + b->yare_input_.InforceSeparateAccountValue
+ ;
+ InforceTaxBasis = b->yare_input_.InforceTaxBasis ;
+
// Certain data members, including but almost certainly not
// limited to these, should not be initialized to any non-zero
// value here. Actual values are inserted in account-value
// processing, subject to various restrictions that often cause
// them to differ from input values. Notably, values need to be
// zero after lapse.
-// NetWD =
-// NewCashLoan =
-// GptForceout =
-// NaarForceout =
+// NetWD =
+// NewCashLoan =
+// GptForceout =
+// NaarForceout =
+// ModalMinimumPremium =
// ProducerCompensation =
if(b->yare_input_.TermRider)
@@ -459,8 +476,7 @@
std::vector<double> coimult;
b->Database_->Query(coimult, DB_CurrCoiMultiplier);
- // This will soon be renamed:
- CountryCOIMultiplier =
+ CurrentCoiMultiplier =
coimult [b->yare_input_.InforceYear]
* b->yare_input_.CurrentCoiMultiplier[b->yare_input_.InforceYear]
* b->yare_input_.CountryCoiMultiplier
@@ -529,6 +545,7 @@
NoLapseMinAge = b->Database_->Query(DB_NoLapseMinAge);
Has1035ExchCharge = b->Database_->Query(DB_Has1035ExchCharge);
+ // SOMEDAY !! Things indexed with '[0]' should probably use inforce year
instead.
InitBaseSpecAmt = b->DeathBfts_->specamt()[0];
InitTermSpecAmt = TermSpecAmt[0];
ChildRiderAmount = b->yare_input_.ChildRiderAmount;
@@ -537,7 +554,7 @@
// InitPrem = 0;
// GuarPrem = 0;
// InitSevenPayPrem =
-// InitTgtPrem =
+// InitTgtPrem =
MaleProportion = b->yare_input_.MaleProportion;
NonsmokerProportion = b->yare_input_.NonsmokerProportion;
@@ -556,6 +573,8 @@
)
);
GuarMaxMandE = guar_m_and_e_rate[0];
+ InitDacTaxRate =
b->Loads_->dac_tax_load()[b->yare_input_.InforceYear];
+ InitPremTaxRate = b->PremiumTax_->maximum_load_rate();
// GenderDistinct = 0;
GenderBlended = b->yare_input_.BlendGender;
// SmokerDistinct = 0;
@@ -587,6 +606,7 @@
if(b->ProductData_)
{
product_data const& p = *b->ProductData_;
+ ProductName = b->yare_input_.ProductName
;
PolicyMktgName = p.datum("PolicyMktgName"
);
PolicyLegalName = p.datum("PolicyLegalName"
);
PolicyForm = p.datum("PolicyForm"
);
@@ -746,6 +766,8 @@
EffDate =
calendar_date(b->yare_input_.EffectiveDate).str();
EffDateJdn =
calendar_date(b->yare_input_.EffectiveDate).julian_day_number();
+ DateOfBirth = calendar_date(b->yare_input_.DateOfBirth).str();
+ DateOfBirthJdn =
calendar_date(b->yare_input_.DateOfBirth).julian_day_number();
DefnLifeIns = (*b->Input_)["DefinitionOfLifeInsurance"].str();
DefnMaterialChange = (*b->Input_)["DefinitionOfMaterialChange"].str();
AvoidMec = (*b->Input_)["AvoidMecMethod"].str();
@@ -835,6 +857,8 @@
EffDate = a_Addend.EffDate;
EffDateJdn = a_Addend.EffDateJdn;
+ DateOfBirth = a_Addend.DateOfBirth;
+ DateOfBirthJdn = a_Addend.DateOfBirthJdn;
Age = std::min(Age, a_Addend.Age);
RetAge = std::min(RetAge, a_Addend.RetAge); // TODO ??
Does this make sense?
EndtAge = std::max(EndtAge, a_Addend.EndtAge);
@@ -855,6 +879,7 @@
// This would necessarily vary by life:
// ContractNumber = "";
+ ProductName = a_Addend.ProductName;
PolicyForm = a_Addend.PolicyForm;
PolicyMktgName = a_Addend.PolicyMktgName;
PolicyLegalName = a_Addend.PolicyLegalName;
@@ -949,7 +974,9 @@
UseExperienceRating = a_Addend.UseExperienceRating;
UsePartialMort = a_Addend.UsePartialMort;
PartMortTableName = a_Addend.PartMortTableName;
- GuarMaxMandE = a_Addend.GuarMaxMandE;
+ GuarMaxMandE = std::max(GuarMaxMandE ,
a_Addend.GuarMaxMandE );
+ InitDacTaxRate = std::max(InitDacTaxRate ,
a_Addend.InitDacTaxRate );
+ InitPremTaxRate = std::max(InitPremTaxRate,
a_Addend.InitPremTaxRate);
AvgFund = a_Addend.AvgFund;
CustomFund = a_Addend.CustomFund;
FundNumbers = a_Addend.FundNumbers;
Modified: lmi/trunk/ledger_invariant.hpp
===================================================================
--- lmi/trunk/ledger_invariant.hpp 2013-04-21 09:46:16 UTC (rev 5711)
+++ lmi/trunk/ledger_invariant.hpp 2013-04-21 22:11:17 UTC (rev 5712)
@@ -89,6 +89,7 @@
std::vector<double> Outlay;
std::vector<double> GptForceout;
std::vector<double> NaarForceout;
+ std::vector<double> ModalMinimumPremium;
// EOY vectors.
std::vector<double> TermSpecAmt;
@@ -153,11 +154,15 @@
double Dumpin;
double External1035Amount;
double Internal1035Amount;
+ double InforceUnloanedAV;
+ double InforceTaxBasis;
// Nonscalable scalars.
double MaleProportion;
double NonsmokerProportion;
double GuarMaxMandE;
+ double InitDacTaxRate;
+ double InitPremTaxRate;
double GenderDistinct;
double GenderBlended;
double SmokerDistinct;
@@ -186,15 +191,17 @@
double PostHoneymoonSpread;
double AllowDbo3;
double IsInforce;
- double CountryCOIMultiplier;
+ double CurrentCoiMultiplier;
double NoLapseAlwaysActive;
double NoLapseMinDur;
double NoLapseMinAge;
double Has1035ExchCharge;
double EffDateJdn;
+ double DateOfBirthJdn;
double GenAcctAllocation;
double SupplementalReport;
+ std::string ProductName;
std::string PolicyForm;
std::string PolicyMktgName;
std::string PolicyLegalName;
@@ -318,11 +325,12 @@
// Special-case strings.
- // 'Effdate' is special because date formatting might be
+ // Calendar dates are special because date formatting might be
// customized or treated differently by different platforms.
- // Therefore, for CRC checking, data member 'EffDateJdn' holds
- // the corresponding unformatted julian day number.
+ // Therefore, they are represented elsewhere as JDNs, and only the
+ // JDNs are used in UpdateCRC() and Spew().
std::string EffDate;
+ std::string DateOfBirth;
private:
void Alloc(int len);
@@ -330,7 +338,7 @@
void Destroy();
void Init();
- std::string StatePostalAbbrev;
+ std::string StatePostalAbbrev; // SOMEDAY !! Rename to
'StateOfJurisdiction'.
std::string PremiumTaxState;
// Nonscalable scalars.
Modified: lmi/trunk/ledger_variant.cpp
===================================================================
--- lmi/trunk/ledger_variant.cpp 2013-04-21 09:46:16 UTC (rev 5711)
+++ lmi/trunk/ledger_variant.cpp 2013-04-21 22:11:17 UTC (rev 5712)
@@ -33,6 +33,7 @@
#include "database.hpp" // Used only for initial loan rate.
#include "dbnames.hpp" // Used only for initial loan rate.
#include "interest_rates.hpp"
+#include "loads.hpp"
#include "mc_enum_types_aux.hpp" // mc_str()
#include "outlay.hpp"
@@ -151,6 +152,8 @@
OtherScalars ["InitAnnGenAcctInt" ] = &InitAnnGenAcctInt ;
OtherScalars ["InitAnnSepAcctGrossInt" ] = &InitAnnSepAcctGrossInt ;
OtherScalars ["InitAnnSepAcctNetInt" ] = &InitAnnSepAcctNetInt ;
+ OtherScalars ["InitTgtPremHiLoadRate" ] = &InitTgtPremHiLoadRate ;
+ OtherScalars ["InitMlyPolFee" ] = &InitMlyPolFee ;
LedgerBase::Alloc();
@@ -273,6 +276,9 @@
[0]
;
+ InitTgtPremHiLoadRate =
bv.Loads_->target_premium_load_maximum_premium_tax()[bv.yare_input_.InforceYear];
+ InitMlyPolFee = bv.Loads_->monthly_policy_fee(GenBasis_)
[bv.yare_input_.InforceYear];
+
FullyInitialized = true;
}
@@ -297,6 +303,8 @@
InitAnnGenAcctInt = a_Addend.InitAnnGenAcctInt;
InitAnnSepAcctGrossInt = a_Addend.InitAnnSepAcctGrossInt;
InitAnnSepAcctNetInt = a_Addend.InitAnnSepAcctNetInt;
+ InitTgtPremHiLoadRate = std::max(InitTgtPremHiLoadRate,
a_Addend.InitTgtPremHiLoadRate);
+ InitMlyPolFee = std::max(InitMlyPolFee ,
a_Addend.InitMlyPolFee );
InitAnnLoanCredRate = a_Addend.InitAnnLoanCredRate;
// ET !! This is of the form 'x = (lengthof x) take y'.
for(int j = 0; j < a_Addend.Length; j++)
Modified: lmi/trunk/ledger_variant.hpp
===================================================================
--- lmi/trunk/ledger_variant.hpp 2013-04-21 09:46:16 UTC (rev 5711)
+++ lmi/trunk/ledger_variant.hpp 2013-04-21 22:11:17 UTC (rev 5712)
@@ -154,6 +154,8 @@
double InitAnnGenAcctInt;
double InitAnnSepAcctGrossInt;
double InitAnnSepAcctNetInt;
+ double InitTgtPremHiLoadRate; // Rate on first dollar, at maximum premium
tax rate.
+ double InitMlyPolFee; // Nonscalable: policy parameter (unlike
'PolicyFee').
// Special cases.
int Length;
Modified: lmi/trunk/loads.cpp
===================================================================
--- lmi/trunk/loads.cpp 2013-04-21 09:46:16 UTC (rev 5711)
+++ lmi/trunk/loads.cpp 2013-04-21 22:11:17 UTC (rev 5712)
@@ -374,7 +374,8 @@
assign_midpoint(specified_amount_load_[mce_gen_mdpt],
specified_amount_load_[mce_gen_guar], specified_amount_load_[mce_gen_curr]);
}
- premium_tax_load_.push_back(0.0);
- dac_tax_load_ .push_back(0.0);
+ premium_tax_load_ .resize(database.length());
+ dac_tax_load_ .resize(database.length());
+ target_premium_load_maximum_premium_tax_.resize(database.length());
}
Modified: lmi/trunk/yare_input.cpp
===================================================================
--- lmi/trunk/yare_input.cpp 2013-04-21 09:46:16 UTC (rev 5711)
+++ lmi/trunk/yare_input.cpp 2013-04-21 22:11:17 UTC (rev 5712)
@@ -51,6 +51,7 @@
AccidentalDeathBenefit = z.AccidentalDeathBenefit
.value();
TermRider = z.TermRider
.value();
TermRiderAmount = z.TermRiderAmount
.value();
+ DateOfBirth = z.DateOfBirth
.value();
SubstandardTable = z.SubstandardTable
.value();
ProductName = z.ProductName
.value();
Dumpin = z.Dumpin
.value();
Modified: lmi/trunk/yare_input.hpp
===================================================================
--- lmi/trunk/yare_input.hpp 2013-04-21 09:46:16 UTC (rev 5711)
+++ lmi/trunk/yare_input.hpp 2013-04-21 22:11:17 UTC (rev 5712)
@@ -74,7 +74,7 @@
// double TotalSpecifiedAmount ;
// double TermRiderProportion ;
// bool TermRiderUseProportion ;
-// calendar_date DateOfBirth ;
+ calendar_date DateOfBirth ;
mcenum_table_rating SubstandardTable ;
std::string ProductName ;
double Dumpin ;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [lmi-commits] [5712] Add data needed for group roster to ledger,
Greg Chicares <=