[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 651b683 3/3: Add optional display of 7702 int
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master 651b683 3/3: Add optional display of 7702 interest rates |
Date: |
Sun, 14 Mar 2021 19:46:05 -0400 (EDT) |
branch: master
commit 651b683113a796ff20629ebf30053622c08f5aa3
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>
Add optional display of 7702 interest rates
Use
--pyx=show_7702i
to see the tableau explained in the documentation.
---
i7702.cpp | 37 +++++++++++++++++++++++++++++++++++++
1 file changed, 37 insertions(+)
diff --git a/i7702.cpp b/i7702.cpp
index 6144b7f..dbc05ce 100644
--- a/i7702.cpp
+++ b/i7702.cpp
@@ -24,13 +24,17 @@
#include "i7702.hpp"
#include "assert_lmi.hpp"
+#include "contains.hpp" // 7702 !! pyx
#include "database.hpp"
#include "et_vector.hpp"
+#include "global_settings.hpp" // 7702 !! pyx
#include "math_functions.hpp"
#include "miscellany.hpp" // each_equal(), minmax
#include "ssize_lmi.hpp"
#include "stratified_charges.hpp"
+#include <iostream> // 7702 !! pyx
+
/// Here's how lmi determines §7702 and §7702A interest rates.
///
/// All these variables are vectors that may vary by year, except
@@ -400,6 +404,39 @@ void i7702::initialize()
,(Max(A1_, Max(Bvlr_, Cvlr_)) - Dvlr_) * use_vlr_
)
);
+
+ // 7702 !! temporary--for acceptance testing
+ if(contains(global_settings::instance().pyx(), "show_7702i"))
+ {
+ std::cout
+ << "statutory rates {GLP,GSP}\n"
+ << A0_ << " A0_\n"
+ << A1_ << " A1_\n"
+ << Bgen_[0] << "\t"
+ << Cgen_[0] << "\t"
+ << Dgen_[0] << "\tif "
+ << use_gen_[0] << " general account\n"
+ << Bsep_[0] << "\t"
+ << Csep_[0] << "\t"
+ << Dsep_[0] << "\tif "
+ << use_sep_[0] << " separate account\n"
+ << Bflr_[0] << "\t"
+ << Cflr_[0] << "\t"
+ << Dflr_[0] << "\tif "
+ << use_flr_[0] << " fixed loan rate\n"
+ << Bvlr_[0] << "\t"
+ << Cvlr_[0] << "\t"
+ << Dvlr_[0] << "\tif "
+ << use_vlr_[0] << " variable loan rate\n"
+ << "monthly NAAR discount\n"
+ << Em_[0] << " Em_[0]\n"
+ << ic_usual_[0] << " ic_usual_[0]\n"
+ << ic_glp_ [0] << " ic_glp_ [0]\n"
+ << ic_gsp_ [0] << " ic_gsp_ [0]\n"
+ << std::endl
+ ;
+ }
+
// Convert all to monthly.
assign(ic_usual_, apply_unary(i_upper_12_over_12_from_i<double>(),
ic_usual_));
assign(ic_glp_ , apply_unary(i_upper_12_over_12_from_i<double>(), ic_glp_
));