From 148dec1010627e997d989be1040d8c8087855b93 Mon Sep 17 00:00:00 2001 From: Kenneth Hsu Date: Sun, 31 Mar 2024 14:36:28 -0700 Subject: [PATCH] Added debugger --- chainladder/utils/utility_functions.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/chainladder/utils/utility_functions.py b/chainladder/utils/utility_functions.py index b7596197..bb9031c2 100644 --- a/chainladder/utils/utility_functions.py +++ b/chainladder/utils/utility_functions.py @@ -185,10 +185,14 @@ def parallelogram_olf( ) rate_changes = pd.Series(np.array(values), np.array(date)) + print("rate_changes:\n", rate_changes) rate_changes = rate_changes.reindex(date_idx, fill_value=0) + print("rate_changes:\n", rate_changes) cum_rate_changes = np.cumprod(1 + rate_changes.values) cum_rate_changes = pd.Series(cum_rate_changes, rate_changes.index) + # print("cum_rate_changes:\n", cum_rate_changes) crl = cum_rate_changes[-1] + # print("crl:", crl) if not vertical_line: rolling_num = { @@ -209,6 +213,8 @@ def parallelogram_olf( cum_avg_rate_leaps = ( cum_avg_rate_leaps + cum_avg_rate_leaps.shift(1).values ) / 2 + # print("cum_avg_rate_non_leaps\n", cum_avg_rate_non_leaps) + # print("cum_avg_rate_leaps\n", cum_avg_rate_leaps) dropdates_num = { "M": 12,