From 9f52cfd0f4966cd3730403032095f7d6d8f1e2b2 Mon Sep 17 00:00:00 2001 From: Kainhofer Reinhold <reinhold.kainhofer@generali.com> Date: Tue, 8 Sep 2020 22:33:19 +0200 Subject: [PATCH] Add alphaRefundPeriod parameter to indicate how long acquisition costs are refunded in case of surrender / premium waiver --- R/InsuranceParameters.R | 5 ++++- R/InsuranceTarif.R | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/R/InsuranceParameters.R b/R/InsuranceParameters.R index 2cd20fd..4403f76 100644 --- a/R/InsuranceParameters.R +++ b/R/InsuranceParameters.R @@ -293,6 +293,8 @@ InsuranceContract.Values = list( #' \item{\code{$premiumFrequencyLoading}}{Loading on the premium for premium #' payment frequencies of more than once a year. Format is #' \code{list("1" = 0.0, "2" = 0.0, "4" = 0.0, "12" = 0.0)}} +#' \item{\code{$alphaRefundPeriod}}{How long the acquisition costs should be +#' (partially) refunded in case of surrender or premium waiver.} #' } #' #' @@ -412,7 +414,8 @@ InsuranceContract.ParameterDefaults = list( partnerRebate = 0, # Partner rabate on premium (including loading and other rebates) if more than one similar contract is concluded extraChargeGrossPremium = 0, # extra charges on gross premium (smoker, leisure activities, BMI too high, etc.) benefitFrequencyLoading = list("1" = 0.0, "2" = 0.0, "4" = 0.0, "12" = 0.0), # TODO: Properly implement this as a function - premiumFrequencyLoading = list("1" = 0.0, "2" = 0.0, "4" = 0.0, "12" = 0.0) # TODO: Properly implement this as a function + premiumFrequencyLoading = list("1" = 0.0, "2" = 0.0, "4" = 0.0, "12" = 0.0), # TODO: Properly implement this as a function + alphaRefundPeriod = 5 # How long acquisition costs should be refunded in case of surrender ), Features = list( # Special cases for the calculations betaGammaInZillmer = FALSE, # Whether beta and gamma-costs should be included in the Zillmer premium calculation diff --git a/R/InsuranceTarif.R b/R/InsuranceTarif.R index 991091f..20b31e6 100644 --- a/R/InsuranceTarif.R +++ b/R/InsuranceTarif.R @@ -988,7 +988,7 @@ InsuranceTarif = R6Class( if (params$ContractState$alphaRefunded) { alphaRefund = 0 } else { - r = min(params$ContractData$policyPeriod, 5); + r = min(params$ContractData$policyPeriod, params$Loadings$alphaRefundPeriod); ZillmerSoFar = Reduce("+", values$absCashFlows$Zillmer, accumulate = TRUE); ZillmerTotal = sum(values$absCashFlows$Zillmer); len = length(ZillmerSoFar); -- GitLab