Skip to content

Commit

Permalink
Added debugger
Browse files Browse the repository at this point in the history
  • Loading branch information
kennethshsu committed Mar 31, 2024
1 parent 13a1f22 commit 148dec1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions chainladder/utils/utility_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand All @@ -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,
Expand Down

0 comments on commit 148dec1

Please sign in to comment.