lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [lmi] master 2d6f27b 2/4: Add a yearly-varying fixed loan


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 2d6f27b 2/4: Add a yearly-varying fixed loan rate to a (renamed) exotic product
Date: Wed, 26 Sep 2018 19:35:13 -0400 (EDT)

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

    Add a yearly-varying fixed loan rate to a (renamed) exotic product
    
    Renamed 'sample2quo' to 'sample2xyz', because it can serve exotic
    purposes other than weird "split-premium" group quotes. Added another
    exotic feature--a varying fixed loan rate--in order to demonstrate
    a problem (soon).
    
    Note on argot: loan rates may be either "fixed" (fully specified in the
    contract when it is issued) or "variable" (declared from time, with
    reference to a published financial index, as prescribed by regulation).
    Thus, if the contract specifies a rate of 6% for the first policy year
    and 5% thereafter, that is a "fixed" rate: although it varies by year,
    it is emphatically not a "variable loan rate" as defined by regulation.
    
    Similarly, in C++, this is a type-specifier:
      bool
    and this:
      bool // Boolean type.
    is the same type-specifier, elaborated with a comment, so it's an
    elaborated type-specifier, but it is not an elaborated-type-specifier.
---
 dbdict.cpp       | 9 +++++++--
 product_data.cpp | 9 +++++----
 2 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/dbdict.cpp b/dbdict.cpp
index b2d1944..e02c0e4 100644
--- a/dbdict.cpp
+++ b/dbdict.cpp
@@ -975,12 +975,17 @@ void DBDictionary::write_database_files()
     z.Add(database_entity(DB_LedgerType          , 
mce_individual_private_placement));
     z.WriteDB(AddDataDir("sample2ipp.database"));
 
+    // Exotica.
+    z.Add(database_entity(DB_LedgerType          , mce_finra));
     // Certain group-quote columns are available only when these two
     // entities are 'true':
     z.Add(database_entity(DB_SplitMinPrem        , true));
     z.Add(database_entity(DB_TermIsNotRider      , true));
-    z.Add(database_entity(DB_LedgerType          , mce_ill_reg));
-    z.WriteDB(AddDataDir("sample2quo.database"));
+    // This fixed loan rate varies by duration.
+    int dims_1111113[e_number_of_axes] = {1, 1, 1, 1, 1, 1, 3};
+    double loanrate[3] = {0.06, 0.05, 0.04};
+    z.Add(database_entity(DB_FixedLoanRate, e_number_of_axes, dims_1111113, 
loanrate));
+    z.WriteDB(AddDataDir("sample2xyz.database"));
 }
 
 /// Initialize the built-in database for the antediluvian branch.
diff --git a/product_data.cpp b/product_data.cpp
index c3723a7..c5e2bf1 100644
--- a/product_data.cpp
+++ b/product_data.cpp
@@ -435,8 +435,9 @@ void product_data::redintegrate_ex_post
 ///   sample2finra mce_finra
 ///   sample2gpp   mce_group_private_placement
 ///   sample2ipp   mce_individual_private_placement
-/// and one for group premium quotes with every possible column:
-///   sample2quo   mce_ill_reg
+/// and one for exotica:
+///   sample2xyz   mce_finra
+///
 /// "*Filename" members are names of actual lmi product files, or
 /// basenames of mortality-table databases, and their values must
 /// nominate actual files. Member 'InsCoDomicile' is used to
@@ -575,8 +576,8 @@ void product_data::write_policy_files()
 
     z.save(AddDataDir("sample2naic.policy"));
 
-    z.DatabaseFilename           = glossed_string("sample2quo.database");
-    z.save(AddDataDir("sample2quo.policy"));
+    z.DatabaseFilename           = glossed_string("sample2xyz.database");
+    z.save(AddDataDir("sample2xyz.policy"));
 
     z.DatabaseFilename           = glossed_string("sample2finra.database");
     z.save(AddDataDir("sample2finra.policy"));



reply via email to

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