[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [4847] Fix defect introduced 20050114T1947Z
From: |
Greg Chicares |
Subject: |
[lmi-commits] [4847] Fix defect introduced 20050114T1947Z |
Date: |
Wed, 21 Apr 2010 11:27:46 +0000 |
Revision: 4847
http://svn.sv.gnu.org/viewvc/?view=rev&root=lmi&revision=4847
Author: chicares
Date: 2010-04-21 11:27:45 +0000 (Wed, 21 Apr 2010)
Log Message:
-----------
Fix defect introduced 20050114T1947Z
Modified Paths:
--------------
lmi/trunk/ChangeLog
lmi/trunk/ihs_avmly.cpp
lmi/trunk/stratified_charges.cpp
lmi/trunk/stratified_charges.hpp
lmi/trunk/stratified_charges.xpp
Modified: lmi/trunk/ChangeLog
===================================================================
--- lmi/trunk/ChangeLog 2010-04-21 00:28:26 UTC (rev 4846)
+++ lmi/trunk/ChangeLog 2010-04-21 11:27:45 UTC (rev 4847)
@@ -24942,3 +24942,15 @@
stratified_charges.xpp
Fix defect introduced 20070410T0149Z.
+20100421T1127Z <address@hidden> [756]
+
+ ihs_avmly.cpp
+ stratified_charges.cpp
+ stratified_charges.hpp
+ stratified_charges.xpp
+Fix defect introduced 20050114T1947Z, from an original file predating
+the lmi epoch. This happens to have no effect because of an early exit
+ // guaranteed M&E is not dynamic
+ return;
+in 'ihs_avmly.cpp'; whether that is correct is a different question.
+
Modified: lmi/trunk/ihs_avmly.cpp
===================================================================
--- lmi/trunk/ihs_avmly.cpp 2010-04-21 00:28:26 UTC (rev 4846)
+++ lmi/trunk/ihs_avmly.cpp 2010-04-21 11:27:45 UTC (rev 4847)
@@ -2151,13 +2151,11 @@
}
}
-// TODO ?? Dynamic M&E should be different for guar vs. curr.
// TODO ?? Implement tiered comp and tiered management fee.
// Annual separate-account rates.
-// double guar_m_and_e =
StratifiedCharges_->tiered_guaranteed_m_and_e(assets);
- double m_and_e_rate = StratifiedCharges_->tiered_current_m_and_e(assets);
+ double m_and_e_rate = StratifiedCharges_->tiered_m_and_e(GenBasis_,
assets);
double imf_rate =
StratifiedCharges_->tiered_investment_management_fee(assets);
if(0.0 != imf_rate)
{
Modified: lmi/trunk/stratified_charges.cpp
===================================================================
--- lmi/trunk/stratified_charges.cpp 2010-04-21 00:28:26 UTC (rev 4846)
+++ lmi/trunk/stratified_charges.cpp 2010-04-21 11:27:45 UTC (rev 4847)
@@ -211,7 +211,7 @@
,double assets
,double premium
,double special_limit
- )
+ ) const
{
switch(basis)
{
@@ -291,15 +291,47 @@
;
}
+double stratified_charges::tiered_m_and_e(mcenum_gen_basis basis, double
assets) const
+{
+ switch(basis)
+ {
+ case mce_gen_curr:
+ {
+ return tiered_curr_m_and_e(assets);
+ }
+ break;
+ case mce_gen_guar:
+ {
+ return tiered_guar_m_and_e(assets);
+ }
+ break;
+ case mce_gen_mdpt:
+ {
+ fatal_error()
+ << "Dynamic separate-account M&E not supported with "
+ << "midpoint expense basis, because variable products "
+ << "are not subject to the illustration reg."
+ << LMI_FLUSH
+ ;
+ }
+ break;
+ default:
+ {
+ fatal_error() << "Case '" << basis << "' not found." << LMI_FLUSH;
+ }
+ }
+ throw "Unreachable--silences a compiler diagnostic.";
+}
+
//============================================================================
-double stratified_charges::tiered_current_m_and_e(double assets) const
+double stratified_charges::tiered_curr_m_and_e(double assets) const
{
stratified_entity const& z = raw_entity(e_curr_m_and_e_tiered_by_assets);
return tiered_rate<double>() (assets, z.limits(), z.values());
}
//============================================================================
-double stratified_charges::tiered_guaranteed_m_and_e(double assets) const
+double stratified_charges::tiered_guar_m_and_e(double assets) const
{
stratified_entity const& z = raw_entity(e_guar_m_and_e_tiered_by_assets);
return tiered_rate<double>() (assets, z.limits(), z.values());
Modified: lmi/trunk/stratified_charges.hpp
===================================================================
--- lmi/trunk/stratified_charges.hpp 2010-04-21 00:28:26 UTC (rev 4846)
+++ lmi/trunk/stratified_charges.hpp 2010-04-21 11:27:45 UTC (rev 4847)
@@ -120,15 +120,9 @@
,double assets
,double premium
,double special_limit
- );
+ ) const;
- // TODO ?? In the public interface, consider replacing these:
- // tiered_current_m_and_e()
- // tiered_guaranteed_m_and_e()
- // with a single tiered_m_and_e(mcenum_gen_basis basis, double assets).
-
- double tiered_current_m_and_e (double assets) const;
- double tiered_guaranteed_m_and_e (double assets) const;
+ double tiered_m_and_e(mcenum_gen_basis basis, double assets) const;
double tiered_asset_based_compensation (double assets) const;
double tiered_investment_management_fee (double assets) const;
@@ -175,6 +169,9 @@
double tiered_curr_sepacct_load(double assets, double premium) const;
double tiered_guar_sepacct_load(double assets, double premium) const;
+ double tiered_curr_m_and_e(double assets) const;
+ double tiered_guar_m_and_e(double assets) const;
+
std::map<e_stratified, stratified_entity> dictionary;
};
Modified: lmi/trunk/stratified_charges.xpp
===================================================================
--- lmi/trunk/stratified_charges.xpp 2010-04-21 00:28:26 UTC (rev 4846)
+++ lmi/trunk/stratified_charges.xpp 2010-04-21 11:27:45 UTC (rev 4847)
@@ -34,8 +34,8 @@
{e_curr_sepacct_load_banded_by_assets,e_topic_asset_banded,"Curr sep acct load
banded by assets","Current separate-account load, banded by present
separate-account assets. Enter breakpoints as total separate-account
assets.",}, \
{e_guar_sepacct_load_banded_by_assets,e_topic_asset_banded,"Guar sep acct load
banded by assets","Guaranteed separate-account load, banded by present
separate-account assets. Enter breakpoints as total separate-account
assets.",}, \
{e_topic_asset_tiered,e_stratified_first,"Asset-tiered charges","Charges that
are tiered by assets.",}, \
-{e_curr_m_and_e_tiered_by_assets,e_topic_asset_tiered,"Current M&E","Current
M&&E, tiered by present assets. Enter breakpoints as increments, e.g. first
50,000,000, next 50,000,000, and so on.",}, \
-{e_guar_m_and_e_tiered_by_assets,e_topic_asset_tiered,"Guaranteed
M&E","Guaranteed M&&E, tiered by present assets. Enter breakpoints as
increments, e.g. first 50,000,000, next 50,000,000, and so on.",}, \
+{e_curr_m_and_e_tiered_by_assets,e_topic_asset_tiered,"Current M&E","Current
M&&E, tiered by present separate-account assets. Enter breakpoints as
increments, e.g. first 50,000,000, next 50,000,000, and so on.",}, \
+{e_guar_m_and_e_tiered_by_assets,e_topic_asset_tiered,"Guaranteed
M&E","Guaranteed M&&E, tiered by present separate-account assets. Enter
breakpoints as increments, e.g. first 50,000,000, next 50,000,000, and so
on.",}, \
{e_asset_based_comp_tiered_by_assets,e_topic_asset_tiered,"Compensation","Compensation,
tiered by present assets. Enter breakpoints as increments, e.g. first
50,000,000, next 50,000,000, and so on.",}, \
{e_investment_mgmt_fee_tiered_by_assets,e_topic_asset_tiered,"Investment
management","Investment management, tiered by present assets. Enter breakpoints
as increments, e.g. first 50,000,000, next 50,000,000, and so on.",}, \
{e_curr_sepacct_load_tiered_by_assets,e_topic_asset_tiered,"Curr sep acct load
tiered by assets","Current separate-account load, tiered by present
separate-account assets. Enter breakpoints as increments, e.g. first
50,000,000, next 50,000,000, and so on.",}, \
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [lmi-commits] [4847] Fix defect introduced 20050114T1947Z,
Greg Chicares <=