From 13919db0235583ccad96b7997bdcbd81b505ec68 Mon Sep 17 00:00:00 2001
From: Reinhold Kainhofer <reinhold@kainhofer.com>
Date: Wed, 8 Dec 2021 15:37:14 +0100
Subject: [PATCH] For endowments, sumInsured shall be constant over the whole
 contract, even though the death benefit might be only a fraction of the
 sumInsured

The actual death benefit ist stored in a time series cf$death, so cf$sumInsured shall represent the real, contractual sumInsured over the whole contract period.
---
 R/InsuranceTarif.R | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/R/InsuranceTarif.R b/R/InsuranceTarif.R
index a5d791e..8b60d14 100644
--- a/R/InsuranceTarif.R
+++ b/R/InsuranceTarif.R
@@ -527,7 +527,7 @@ InsuranceTarif = R6Class(
         }
         if (self$tariffType == "endowment" || self$tariffType == "wholelife" || self$tariffType == "endowment + dread-disease") {
           cf$death = c(rep(0, deferralPeriod), deathCF, 0)
-          cf$sumInsured = c(rep(0, deferralPeriod), deathCF, 1);
+          # cf$sumInsured = c(rep(0, deferralPeriod), deathCF, 1);
         }
         if (self$tariffType == "endowment + dread-disease") {
           cf$disease = c(
-- 
GitLab