lmi
[Top][All Lists]
Advanced

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

[lmi] 7702 interest rates for 145 products


From: Greg Chicares
Subject: [lmi] 7702 interest rates for 145 products
Date: Fri, 2 Apr 2021 14:37:52 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.9.0

Here are all unique sets of 7702 interest rates for all 145 products lmi 
supports
(no proprietary information is revealed, obviously):

ic_usual_       ic_glp_ ic_gsp_ Em_     ig_usual_       ig_glp_ ig_gsp_
0.02    0.02    0.04    0.009999538     0.020000000     0.020000000     
0.040000000
0.03    0.03    0.04    0.030000003     0.030000003     0.030000003     
0.040000000
0.04    0.0375  0.0575  0.030000373     0.040000000     0.037500000     
0.057500000
0.04    0.038   0.058   0.030000373     0.040000000     0.038000000     
0.058000000
0.04    0.0385  0.0585  0.030000373     0.040000000     0.038500000     
0.058500000
0.04    0.04    0.06    0.000000000     0.000000000     0.000000000     
0.000000000
0.04    0.04    0.06    0.009999538     0.040000000     0.040000000     
0.060000000
0.04    0.04    0.06    0.015000149     0.040000000     0.040000000     
0.060000000
0.04    0.04    0.06    0.024999555     0.040000000     0.040000000     
0.060000000
0.04    0.04    0.06    0.030000003     0.040000000     0.040000000     
0.060000000
0.04    0.04    0.06    0.030000373     0.040000000     0.040000000     
0.060000000
0.04    0.04    0.06    0.039999505     0.040000000     0.040000000     
0.060000000

This is intended only as an acceptance-testing aid. It was extracted from the
output of this command:

  wine /opt/lmi/bin/lmi_cli_shared.exe --accept --ash_nazg 
--data_path=/opt/lmi/data --product_test |sort -u

using the throwaway patch below, which incidentally shows that these rates
don't actually vary by duration for any of these products.

--8<----8<----8<----8<----8<----8<----8<----8<----8<--
diff --git a/i7702.cpp b/i7702.cpp
index 808b6611a..c1b95ae68 100644
--- a/i7702.cpp
+++ b/i7702.cpp
@@ -339,6 +339,17 @@ void i7702::initialize()
             ;
         std::cout << oss.str() << std::endl;
         }
+        {
+        std::ostringstream oss;
+        oss.precision(17);
+        oss << std::fixed;
+        oss
+            << ic_usual_[0] << " ic_usual_[0] "
+            << ic_glp_  [0] << " ic_glp_  [0] "
+            << ic_gsp_  [0] << " ic_gsp_  [0] "
+            ;
+        std::cout << oss.str();
+        }
 
     // Convert all to monthly.
     assign(ic_usual_, apply_unary(i_upper_12_over_12_from_i<double>(), 
ic_usual_));
@@ -352,21 +363,26 @@ void i7702::initialize()
         ig_gsp_   <<= Max(ic_gsp_  , Em_);
         }
 
-    if(trace_)
+//  if(trace_)
         {
         std::ostringstream oss;
         oss.precision(17);
         oss << std::fixed;
         oss
-            << "monthly rates\n"
-            << ic_usual_[0] << " ic_usual_[0]\n"
-            << ic_glp_  [0] << " ic_glp_  [0]\n"
-            << ic_gsp_  [0] << " ic_gsp_  [0]\n"
-            << Em_[0] << " Em_[0]\n"
-            << ig_usual_[0] << " ig_usual_[0]\n"
-            << ig_glp_  [0] << " ig_glp_  [0]\n"
-            << ig_gsp_  [0] << " ig_gsp_  [0]\n"
+            << i_from_i_upper_12_over_12<double>()(Em_      [0]) << " Em_      
[0] "
+            << i_from_i_upper_12_over_12<double>()(ig_usual_[0]) << " 
ig_usual_[0] "
+            << i_from_i_upper_12_over_12<double>()(ig_glp_  [0]) << " ig_glp_  
[0] "
+            << i_from_i_upper_12_over_12<double>()(ig_gsp_  [0]) << " ig_gsp_  
[0] "
+            << "\n"
             ;
         std::cout << oss.str() << std::endl;
         }
+
+    LMI_ASSERT(each_equal(ic_usual_, ic_usual_.front()));
+    LMI_ASSERT(each_equal(ic_glp_  , ic_glp_  .front()));
+    LMI_ASSERT(each_equal(ic_gsp_  , ic_gsp_  .front()));
+    LMI_ASSERT(each_equal(Em_      , Em_      .front()));
+    LMI_ASSERT(each_equal(ig_usual_, ig_usual_.front()));
+    LMI_ASSERT(each_equal(ig_glp_  , ig_glp_  .front()));
+    LMI_ASSERT(each_equal(ig_gsp_  , ig_gsp_  .front()));
 }
diff --git a/main_cli.cpp b/main_cli.cpp
index 78e0bc529..5f2efb5ef 100644
--- a/main_cli.cpp
+++ b/main_cli.cpp
@@ -190,21 +190,21 @@ void product_test()
 
     ce_product_name c;
     std::vector<std::string> const& p = c.all_strings();
-    std::vector<std::string> const& s = all_strings_state();
+//  std::vector<std::string> const& s = all_strings_state();
     for(auto const& i : p)
         {
         std::cout << "Testing product " << i << std::endl;
         input["ProductName"        ] = i;
-        for(auto const& j : s)
+//      for(auto const& j : s)
             {
-            input["StateOfJurisdiction"] = j;
+//          input["StateOfJurisdiction"] = j;
             try
                 {
                 z("eraseme", input);
                 }
             catch(...)
                 {
-                std::cout << i << ", " << j << ":" << std::endl;
+                std::cout << i << ":" << std::endl;
                 report_exception();
                 }
             }
--8<----8<----8<----8<----8<----8<----8<----8<----8<--


reply via email to

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