lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [lmi] master b1a3517 3/3: Code AK and SD premium-tax rates


From: Greg Chicares
Subject: [lmi-commits] [lmi] master b1a3517 3/3: Code AK and SD premium-tax rates once and only once
Date: Tue, 9 May 2017 06:01:25 -0400 (EDT)

branch: master
commit b1a35179c9465031551294e9a14228be13b12eb1
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>

    Code AK and SD premium-tax rates once and only once
    
    As had already been done with premium_tax_rates_for_life_insurance(),
    make tiered premium-tax rates available for proprietary product files,
    which can now incorporate (and update) them by reference rather than
    by laborious copying and pasting.
---
 stratified_charges.cpp | 68 ++++++++++++++++++++++++++++++--------------------
 stratified_charges.hpp |  6 ++++-
 2 files changed, 46 insertions(+), 28 deletions(-)

diff --git a/stratified_charges.cpp b/stratified_charges.cpp
index e71ebd7..f9547d2 100644
--- a/stratified_charges.cpp
+++ b/stratified_charges.cpp
@@ -609,33 +609,9 @@ void stratified_charges::write_strata_files()
     foo.datum("GuarSepAcctLoadTieredByAssets"  ).values_.push_back(0.0);
     foo.datum("GuarSepAcctLoadTieredByAssets"  ).limits_.push_back(dbl_inf);
 
-    // AK parameters and citations as of 2017-05.
-    // AK 21.09.210(m):
-    //   
http://codes.findlaw.com/ak/title-21-insurance/ak-st-sect-21-09-210.html
-
-    // SD parameters and citations as of 2011-05.
-    // SD 10-44-2(2) and 58-6-70:
-    //   
http://legis.state.sd.us/statutes/DisplayStatute.aspx?Type=Statute&Statute=10-44-2
-    //   
http://legis.state.sd.us/statutes/DisplayStatute.aspx?Statute=58-6&Type=Statute
-    // SD Chapter 260 (HB 1200), signed 2008-02-19, amended 58-6-70 by
-    // removing the former million-dollar first-year-premium threshold:
-    //   
http://legis.state.sd.us/sessions/2008/SessionLaws/DisplayChapter.aspx?Chapter=260
-
-    foo.datum("TieredAKPremTax").values_.push_back (0.02700);
-    foo.datum("TieredAKPremTax").values_.push_back (0.00080);
-    foo.datum("TieredAKPremTax").limits_.push_back(100000.0);
-    foo.datum("TieredAKPremTax").limits_.push_back(dbl_inf);
-    foo.datum("TieredAKPremTax").gloss_ = "AK 21.09.210(m)";
-
-    // DE: not yet implemented.
-    foo.datum("TieredDEPremTax").values_.push_back (0.0);
-    foo.datum("TieredDEPremTax").limits_.push_back(dbl_inf);
-
-    foo.datum("TieredSDPremTax").values_.push_back (0.02500);
-    foo.datum("TieredSDPremTax").values_.push_back (0.00080);
-    foo.datum("TieredSDPremTax").limits_.push_back(100000.0);
-    foo.datum("TieredSDPremTax").limits_.push_back(dbl_inf);
-    foo.datum("TieredSDPremTax").gloss_ = "SD 10-44-2(2) and 58-6-70";
+    foo.datum("TieredAKPremTax") = StatutoryAKPremTax();
+    foo.datum("TieredDEPremTax") = StatutoryDEPremTax();
+    foo.datum("TieredSDPremTax") = StatutorySDPremTax();
 
     foo.save(AddDataDir("sample.strata"));
 }
@@ -658,3 +634,41 @@ void save(stratified_charges const& z, fs::path const& 
path)
     z.xml_serializable<stratified_charges>::save(path);
 }
 
+/// AK parameters and citations as of 2017-05.
+/// AK 21.09.210(m):
+///   http://codes.findlaw.com/ak/title-21-insurance/ak-st-sect-21-09-210.html
+
+stratified_entity const& StatutoryAKPremTax()
+{
+    static std::vector<double> const values = {0.02700, 0.00080};
+    static std::vector<double> const limits = {100000.0, infinity<double>()};
+    static stratified_entity const z(limits, values, "AK 21.09.210(m)");
+    return z;
+}
+
+/// DE: not yet implemented.
+
+stratified_entity const& StatutoryDEPremTax()
+{
+    static std::vector<double> const values = {0.0};
+    static std::vector<double> const limits = {infinity<double>()};
+    static stratified_entity const z(limits, values, "DE [not implemented]");
+    return z;
+}
+
+/// SD parameters and citations as of 2011-05.
+/// SD 10-44-2(2) and 58-6-70:
+///   
http://legis.state.sd.us/statutes/DisplayStatute.aspx?Type=Statute&Statute=10-44-2
+///   
http://legis.state.sd.us/statutes/DisplayStatute.aspx?Statute=58-6&Type=Statute
+/// SD Chapter 260 (HB 1200), signed 2008-02-19, amended 58-6-70 by
+/// removing the former million-dollar first-year-premium threshold:
+///   
http://legis.state.sd.us/sessions/2008/SessionLaws/DisplayChapter.aspx?Chapter=260
+
+stratified_entity const& StatutorySDPremTax()
+{
+    static std::vector<double> const values = {0.02500, 0.00080};
+    static std::vector<double> const limits = {100000.0, infinity<double>()};
+    static stratified_entity const z(limits, values, "SD 10-44-2(2), 58-6-70");
+    return z;
+}
+
diff --git a/stratified_charges.hpp b/stratified_charges.hpp
index 2f1d965..97f8527 100644
--- a/stratified_charges.hpp
+++ b/stratified_charges.hpp
@@ -1,4 +1,4 @@
-// Rates that depend on the amount they're muliplied by.
+// Rates that depend on the amount they're multiplied by.
 //
 // Copyright (C) 1998, 2001, 2002, 2003, 2005, 2006, 2007, 2008, 2009, 2010, 
2011, 2012, 2013, 2014, 2015, 2016, 2017 Gregory W. Chicares.
 //
@@ -211,5 +211,9 @@ class LMI_SO stratified_charges final
 void LMI_SO load(stratified_charges      &, fs::path const&);
 void LMI_SO save(stratified_charges const&, fs::path const&);
 
+stratified_entity const& LMI_SO StatutoryAKPremTax();
+stratified_entity const& LMI_SO StatutoryDEPremTax();
+stratified_entity const& LMI_SO StatutorySDPremTax();
+
 #endif // stratified_charges_hpp
 



reply via email to

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