[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [5206] Move premium-tax rates to a more appropriate place
From: |
Greg Chicares |
Subject: |
[lmi-commits] [5206] Move premium-tax rates to a more appropriate place |
Date: |
Tue, 14 Jun 2011 12:14:53 +0000 |
Revision: 5206
http://svn.sv.gnu.org/viewvc/?view=rev&root=lmi&revision=5206
Author: chicares
Date: 2011-06-14 12:14:53 +0000 (Tue, 14 Jun 2011)
Log Message:
-----------
Move premium-tax rates to a more appropriate place
Modified Paths:
--------------
lmi/trunk/Makefile.am
lmi/trunk/dbdict.cpp
lmi/trunk/objects.make
lmi/trunk/premium_tax.cpp
lmi/trunk/premium_tax.hpp
Modified: lmi/trunk/Makefile.am
===================================================================
--- lmi/trunk/Makefile.am 2011-06-13 13:44:15 UTC (rev 5205)
+++ lmi/trunk/Makefile.am 2011-06-14 12:14:53 UTC (rev 5206)
@@ -84,6 +84,7 @@
endif
# tests
+# SOMEDAY !! The 'getopt' and 'regex' tests in 'objects.make' are missing here.
TESTS = \
test_account_value \
test_actuarial_table \
@@ -641,6 +642,7 @@
mvc_model.cpp \
null_stream.cpp \
path_utility.cpp \
+ premium_tax.cpp \
product_names.cpp \
single_cell_document.cpp \
tn_range_types.cpp \
@@ -788,19 +790,28 @@
test_product_file_SOURCES = \
$(common_test_objects) \
data_directory.cpp \
+ database.cpp \
+ datum_base.cpp \
dbdict.cpp \
dbnames.cpp \
dbvalue.cpp \
expm1.cpp \
+ facets.cpp \
fund_data.cpp \
global_settings.cpp \
+ lmi.cpp \
+ mc_enum.cpp \
+ mc_enum_types.cpp \
+ mc_enum_types_aux.cpp \
miscellany.cpp \
path_utility.cpp \
+ premium_tax.cpp \
product_data.cpp \
product_file_test.cpp \
rounding_rules.cpp \
stratified_charges.cpp \
- timer.cpp
+ timer.cpp \
+ xml_lmi.cpp
test_product_file_CXXFLAGS = $(AM_CXXFLAGS)
test_product_file_LDADD = \
$(BOOST_LIBS)
Modified: lmi/trunk/dbdict.cpp
===================================================================
--- lmi/trunk/dbdict.cpp 2011-06-13 13:44:15 UTC (rev 5205)
+++ lmi/trunk/dbdict.cpp 2011-06-14 12:14:53 UTC (rev 5206)
@@ -39,6 +39,7 @@
#include "mc_enum_type_enums.hpp"
#include "miscellany.hpp"
#include "oecumenic_enumerations.hpp"
+#include "premium_tax.hpp" // premium_tax_rates_for_life_insurance()
#include "xml_lmi.hpp"
#include "xml_serialize.hpp"
@@ -47,6 +48,8 @@
#include <boost/filesystem/operations.hpp>
#include <boost/filesystem/path.hpp>
+#include <vector>
+
template class xml_serializable<DBDictionary>;
std::string DBDictionary::cached_filename_;
@@ -679,44 +682,13 @@
Add(database_entity(DB_SurrChgPremMult , 0.0));
Add(database_entity(DB_SurrChgAmort , 0.0));
-/// Premium-tax rates as of 2011-05 (retaliation performed elsewhere).
-///
-/// Exact values are a matter of interpretation, because some states
-/// impose various assessments in addition to their nominal tax rates.
-///
-/// AK and SD have a tiered premium tax that lmi handles; DE has one
-/// that it does not. As elsewhere in lmi, tiered and non-tiered
-/// charges are calculated separately and added together; therefore,
-/// the AK and SD values in this table are zero.
-///
-/// Fictitious state XX may be used where no premium tax applies, as
-/// for offshore business.
- int premium_tax_dimensions[e_number_of_axes] = {1, 1, 1, 1, 1, 53, 1};
- double const tiered = 0.0;
- double premium_tax_rates[53] =
- // AL AK AZ AR CA CO CT
- {0.0230, tiered, 0.0200, 0.0250, 0.0235, 0.0200, 0.0175
- // DE DC FL GA HI ID
- ,0.0200, 0.0200, 0.0175, 0.0225, 0.0275, 0.0150
- // IL IN IA KS KY LA ME
- ,0.0050, 0.0130, 0.0100, 0.0200, 0.0150, 0.0225, 0.0200
- // MD MA MI MN MS MO
- ,0.0200, 0.0200, 0.0125, 0.0150, 0.0300, 0.0200
- // MT NE NV NH NJ NM NY
- ,0.0275, 0.0100, 0.0350, 0.0125, 0.0210, 0.03003, 0.0150
- // NC ND OH OK OR PA
- ,0.0190, 0.0200, 0.0140, 0.0225, 0.0002, 0.0200
- // PR RI SC SD TN TX UT
- ,0.0400, 0.0200, 0.0075, tiered, 0.0175, 0.0175, 0.0225
- // VT VA WA WV WI WY XX
- ,0.0200, 0.0225, 0.0200, 0.0300, 0.0200, 0.0075, 0.0000
- };
+ int ptd[e_number_of_axes] = {1, 1, 1, 1, 1, 53, 1};
+ std::vector<int> premium_tax_dimensions(ptd, ptd + e_number_of_axes);
Add
(database_entity
(DB_PremTaxRate
- ,e_number_of_axes
,premium_tax_dimensions
- ,premium_tax_rates
+ ,premium_tax_rates_for_life_insurance()
)
);
@@ -835,9 +807,8 @@
Add
(database_entity
(DB_PremTaxLoad
- ,e_number_of_axes
,premium_tax_dimensions
- ,premium_tax_rates
+ ,premium_tax_rates_for_life_insurance()
)
);
Add(database_entity(DB_AllowHoneymoon , true));
Modified: lmi/trunk/objects.make
===================================================================
--- lmi/trunk/objects.make 2011-06-13 13:44:15 UTC (rev 5205)
+++ lmi/trunk/objects.make 2011-06-14 12:14:53 UTC (rev 5206)
@@ -694,6 +694,7 @@
mvc_model.o \
null_stream.o \
path_utility.o \
+ premium_tax.o \
product_names.o \
single_cell_document.o \
timer.o \
@@ -828,6 +829,7 @@
$(common_test_objects) \
$(xmlwrapp_objects) \
data_directory.o \
+ database.o \
datum_base.o \
dbdict.o \
dbnames.o \
@@ -836,10 +838,13 @@
facets.o \
fund_data.o \
global_settings.o \
+ lmi.o \
mc_enum.o \
mc_enum_types.o \
+ mc_enum_types_aux.o \
miscellany.o \
path_utility.o \
+ premium_tax.o \
product_data.o \
product_file_test.o \
rounding_rules.o \
Modified: lmi/trunk/premium_tax.cpp
===================================================================
--- lmi/trunk/premium_tax.cpp 2011-06-13 13:44:15 UTC (rev 5205)
+++ lmi/trunk/premium_tax.cpp 2011-06-14 12:14:53 UTC (rev 5206)
@@ -37,7 +37,6 @@
#include "stratified_charges.hpp"
#include <algorithm> // std::max()
-#include <vector>
namespace {
/// Determine whether premium tax is retaliatory.
@@ -300,6 +299,78 @@
return z;
}
+/// Premium-tax rates for life insurance without retaliation.
+///
+/// A single table suffices for every domicile, because retaliation is
+/// explicitly performed elsewhere.
+///
+/// Exact values are a matter of interpretation, because some states
+/// impose various assessments in addition to their nominal tax rates.
+///
+/// AK and SD have a tiered premium tax that lmi handles; DE has one
+/// that it does not. As elsewhere in lmi, tiered and non-tiered
+/// charges are calculated separately and added together; therefore,
+/// the AK and SD values in this table are zero.
+///
+/// Fictitious state XX may be used where no premium tax applies, as
+/// for offshore business.
+
+std::vector<double> const& premium_tax_rates_for_life_insurance()
+{
+ static double const tiered = 0.0;
+ static int const n = 53;
+ static double const d[n] =
+ // AL AK AZ AR CA CO CT
+ {0.0230, tiered, 0.0200, 0.0250, 0.0235, 0.0200, 0.0175
+ // DE DC FL GA HI ID
+ ,0.0200, 0.0200, 0.0175, 0.0225, 0.0275, 0.0150
+ // IL IN IA KS KY LA ME
+ ,0.0050, 0.0130, 0.0100, 0.0200, 0.0150, 0.0225, 0.0200
+ // MD MA MI MN MS MO
+ ,0.0200, 0.0200, 0.0125, 0.0150, 0.0300, 0.0200
+ // MT NE NV NH NJ NM NY
+ ,0.0275, 0.0100, 0.0350, 0.0125, 0.0210, 0.03003, 0.0150
+ // NC ND OH OK OR PA
+ ,0.0190, 0.0200, 0.0140, 0.0225, 0.0002, 0.0200
+ // PR RI SC SD TN TX UT
+ ,0.0400, 0.0200, 0.0075, tiered, 0.0175, 0.0175, 0.0225
+ // VT VA WA WV WI WY XX
+ ,0.0200, 0.0225, 0.0200, 0.0300, 0.0200, 0.0075, 0.0000
+ };
+ static std::vector<double> const v(d, d + n);
+ return v;
+}
+
+// Placeholder for annuity rates--for now, just a commented-out copy
+// of the life-insurance implementation.
+#if 0
+std::vector<double> const& premium_tax_rates_for_annuities()
+{
+ static double const tiered = 0.0;
+ static int const n = 53;
+ static double const d[n] =
+ // AL AK AZ AR CA CO CT
+ {0.0230, tiered, 0.0200, 0.0250, 0.0235, 0.0200, 0.0175
+ // DE DC FL GA HI ID
+ ,0.0200, 0.0200, 0.0175, 0.0225, 0.0275, 0.0150
+ // IL IN IA KS KY LA ME
+ ,0.0050, 0.0130, 0.0100, 0.0200, 0.0150, 0.0225, 0.0200
+ // MD MA MI MN MS MO
+ ,0.0200, 0.0200, 0.0125, 0.0150, 0.0300, 0.0200
+ // MT NE NV NH NJ NM NY
+ ,0.0275, 0.0100, 0.0350, 0.0125, 0.0210, 0.03003, 0.0150
+ // NC ND OH OK OR PA
+ ,0.0190, 0.0200, 0.0140, 0.0225, 0.0002, 0.0200
+ // PR RI SC SD TN TX UT
+ ,0.0400, 0.0200, 0.0075, tiered, 0.0175, 0.0175, 0.0225
+ // VT VA WA WV WI WY XX
+ ,0.0200, 0.0225, 0.0200, 0.0300, 0.0200, 0.0075, 0.0000
+ };
+ static std::vector<double> const v(d, d + n);
+ return v;
+}
+#endif // 0
+
/// Lowest premium-tax load, for 7702 and 7702A purposes.
double lowest_premium_tax_load
Modified: lmi/trunk/premium_tax.hpp
===================================================================
--- lmi/trunk/premium_tax.hpp 2011-06-13 13:44:15 UTC (rev 5205)
+++ lmi/trunk/premium_tax.hpp 2011-06-14 12:14:53 UTC (rev 5206)
@@ -30,6 +30,8 @@
#include "obstruct_slicing.hpp"
#include "uncopyable_lmi.hpp"
+#include <vector>
+
class product_database;
class stratified_charges;
@@ -82,6 +84,10 @@
double ytd_load_in_domicile_;
};
+std::vector<double> const& premium_tax_rates_for_life_insurance();
+
+std::vector<double> const& premium_tax_rates_for_annuities();
+
double lowest_premium_tax_load
(mcenum_state tax_state
,mcenum_state domicile
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [lmi-commits] [5206] Move premium-tax rates to a more appropriate place,
Greg Chicares <=